Class: Cinii::Item::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/cinii/item/base.rb

Direct Known Subclasses

Article, Author, Book, Dissertation, Library

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dateObject (readonly)

Returns the value of attribute date.



6
7
8
# File 'lib/cinii/item/base.rb', line 6

def date
  @date
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/cinii/item/base.rb', line 6

def id
  @id
end

Returns the value of attribute link.



6
7
8
# File 'lib/cinii/item/base.rb', line 6

def link
  @link
end

#see_alsoObject (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

#titleObject (readonly)

Returns the value of attribute title.



6
7
8
# File 'lib/cinii/item/base.rb', line 6

def title
  @title
end

#typeObject (readonly)

Returns the value of attribute type.



6
7
8
# File 'lib/cinii/item/base.rb', line 6

def type
  @type
end