Class: Aniview::Interface::Item
- Inherits:
-
Object
- Object
- Aniview::Interface::Item
- Defined in:
- lib/aniview/interface/item.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attr ⇒ Object
Returns the value of attribute attr.
Instance Method Summary collapse
- #attributes ⇒ Object
- #cereal ⇒ Object
-
#initialize ⇒ Item
constructor
A new instance of Item.
Constructor Details
#initialize ⇒ Item
Returns a new instance of Item.
7 8 9 |
# File 'lib/aniview/interface/item.rb', line 7 def initialize() @attr = {} end |
Instance Attribute Details
#attr ⇒ Object
Returns the value of attribute attr.
5 6 7 |
# File 'lib/aniview/interface/item.rb', line 5 def attr @attr end |
Instance Method Details
#attributes ⇒ Object
11 12 13 |
# File 'lib/aniview/interface/item.rb', line 11 def attributes return @attr end |
#cereal ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/aniview/interface/item.rb', line 15 def cereal contents = "" @attr.each{ |a| contents += String(a[1]) } return "cereal-"+contents end |