Class: Cinii::Item::Dissertation
- Defined in:
- lib/cinii/item/dissertation.rb
Instance Attribute Summary collapse
-
#creator ⇒ Object
readonly
Returns the value of attribute creator.
-
#degree_name ⇒ Object
readonly
Returns the value of attribute degree_name.
-
#dissertation_number ⇒ Object
readonly
Returns the value of attribute dissertation_number.
-
#publisher ⇒ Object
readonly
Returns the value of attribute publisher.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from Base
#date, #id, #link, #see_also, #title, #type
Instance Method Summary collapse
-
#initialize(item) ⇒ Dissertation
constructor
A new instance of Dissertation.
Constructor Details
#initialize(item) ⇒ Dissertation
Returns a new instance of Dissertation.
8 9 10 11 12 13 14 15 16 |
# File 'lib/cinii/item/dissertation.rb', line 8 def initialize(item) @creator = item['dc:creator'].map { |c| c['@value'] } @publisher = item['dc:publisher'] @degree_name = item['ndl:degreeName'] @dissertation_number = item['ndl:dissertationNumber'] @source = item['dc:source']&.map { |c| { id: c['@id'], title: c['dc:title']} } super(item) end |
Instance Attribute Details
#creator ⇒ Object (readonly)
Returns the value of attribute creator.
6 7 8 |
# File 'lib/cinii/item/dissertation.rb', line 6 def creator @creator end |
#degree_name ⇒ Object (readonly)
Returns the value of attribute degree_name.
6 7 8 |
# File 'lib/cinii/item/dissertation.rb', line 6 def degree_name @degree_name end |
#dissertation_number ⇒ Object (readonly)
Returns the value of attribute dissertation_number.
6 7 8 |
# File 'lib/cinii/item/dissertation.rb', line 6 def dissertation_number @dissertation_number end |
#publisher ⇒ Object (readonly)
Returns the value of attribute publisher.
6 7 8 |
# File 'lib/cinii/item/dissertation.rb', line 6 def publisher @publisher end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
6 7 8 |
# File 'lib/cinii/item/dissertation.rb', line 6 def source @source end |