Class: Cinii::Item::Base
- Inherits:
-
Object
- Object
- Cinii::Item::Base
- Defined in:
- lib/cinii/item/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#link ⇒ Object
readonly
Returns the value of attribute link.
-
#see_also ⇒ Object
readonly
Returns the value of attribute see_also.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(item) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(item) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 14 15 |
# File 'lib/cinii/item/base.rb', line 8 def initialize(item) @id = item['@id'] @type = item['@type'] @title = item['title'] @link = item['link']['@id'] @see_also = item['rdfs:seeAlso']['@id'] @date = item['dc:date'] end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
6 7 8 |
# File 'lib/cinii/item/base.rb', line 6 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/cinii/item/base.rb', line 6 def id @id end |
#link ⇒ Object (readonly)
Returns the value of attribute link.
6 7 8 |
# File 'lib/cinii/item/base.rb', line 6 def link @link end |
#see_also ⇒ Object (readonly)
Returns the value of attribute see_also.
6 7 8 |
# File 'lib/cinii/item/base.rb', line 6 def see_also @see_also end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/cinii/item/base.rb', line 6 def title @title end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
6 7 8 |
# File 'lib/cinii/item/base.rb', line 6 def type @type end |