Class: Cinii::Item::Article

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

Instance Attribute Summary collapse

Attributes inherited from Base

#date, #id, #link, #see_also, #title, #type

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ Article

Returns a new instance of Article.



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/cinii/item/article.rb', line 10

def initialize(item)
  @creator          = item['dc:creator'].map { |c| c['@value'] }
  @publisher        = item['dc:publisher']
  @publication_date = item['prism:publicationDate']
  @publication_name = item['prism:publicationName']
  @issn             = item['prism:issn']
  @volume           = item['prism:volume']
  @number           = item['prism:number']
  @starting_page    = item['prism:startingPage']
  @ending_page      = item['prism:endingPage']
  @page_range       = item['prism:pageRange']
  @description      = item['description']

  super(item)
end

Instance Attribute Details

#creatorObject (readonly)

Returns the value of attribute creator.



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

def creator
  @creator
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#ending_pageObject (readonly)

Returns the value of attribute ending_page.



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

def ending_page
  @ending_page
end

#issnObject (readonly)

Returns the value of attribute issn.



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

def issn
  @issn
end

#numberObject (readonly)

Returns the value of attribute number.



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

def number
  @number
end

#page_rangeObject (readonly)

Returns the value of attribute page_range.



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

def page_range
  @page_range
end

#publication_dateObject (readonly)

Returns the value of attribute publication_date.



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

def publication_date
  @publication_date
end

#publication_nameObject (readonly)

Returns the value of attribute publication_name.



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

def publication_name
  @publication_name
end

#publisherObject (readonly)

Returns the value of attribute publisher.



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

def publisher
  @publisher
end

#starting_pageObject (readonly)

Returns the value of attribute starting_page.



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

def starting_page
  @starting_page
end

#volumeObject (readonly)

Returns the value of attribute volume.



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

def volume
  @volume
end