Class: QDB::Base
- Inherits:
-
Object
- Object
- QDB::Base
- Defined in:
- lib/cinch/plugins/qdb/base.rb
Defined Under Namespace
Classes: Quote
Instance Attribute Summary (collapse)
-
- (Object) id_path_template
readonly
Returns the value of attribute id_path_template.
-
- (Object) latest_path
readonly
Returns the value of attribute latest_path.
-
- (Object) name
readonly
Returns the value of attribute name.
-
- (Object) random_path
readonly
Returns the value of attribute random_path.
-
- (Object) shortname
readonly
Returns the value of attribute shortname.
-
- (Object) url
readonly
Returns the value of attribute url.
Instance Method Summary (collapse)
- - (Object) by_id(id)
-
- (Base) initialize
constructor
A new instance of Base.
-
- (Object) latest
This can be overridden if needed.
-
- (Object) random
This can be overridden if needed.
Constructor Details
- (Base) initialize
A new instance of Base
16 17 |
# File 'lib/cinch/plugins/qdb/base.rb', line 16 def initialize end |
Instance Attribute Details
- (Object) id_path_template (readonly)
Returns the value of attribute id_path_template
12 13 14 |
# File 'lib/cinch/plugins/qdb/base.rb', line 12 def id_path_template @id_path_template end |
- (Object) latest_path (readonly)
Returns the value of attribute latest_path
12 13 14 |
# File 'lib/cinch/plugins/qdb/base.rb', line 12 def latest_path @latest_path end |
- (Object) name (readonly)
Returns the value of attribute name
12 13 14 |
# File 'lib/cinch/plugins/qdb/base.rb', line 12 def name @name end |
- (Object) random_path (readonly)
Returns the value of attribute random_path
12 13 14 |
# File 'lib/cinch/plugins/qdb/base.rb', line 12 def random_path @random_path end |
- (Object) shortname (readonly)
Returns the value of attribute shortname
12 13 14 |
# File 'lib/cinch/plugins/qdb/base.rb', line 12 def shortname @shortname end |
- (Object) url (readonly)
Returns the value of attribute url
12 13 14 |
# File 'lib/cinch/plugins/qdb/base.rb', line 12 def url @url end |
Instance Method Details
- (Object) by_id(id)
19 |
# File 'lib/cinch/plugins/qdb/base.rb', line 19 def by_id(id); raise "#{__method__} must be overridden."; end |
- (Object) latest
This can be overridden if needed.
25 26 27 |
# File 'lib/cinch/plugins/qdb/base.rb', line 25 def latest # This can be overridden if needed. self.by_id(@url + @latest_path) end |
- (Object) random
This can be overridden if needed.
21 22 23 |
# File 'lib/cinch/plugins/qdb/base.rb', line 21 def random # This can be overridden if needed. self.by_id(@url + @random_path) end |