Class: DS::Extractor::Genre
- Defined in:
- lib/ds/extractor/genre.rb
Instance Attribute Summary collapse
-
#source_authority_uri ⇒ Object
Returns the value of attribute source_authority_uri.
-
#vocab ⇒ Object
Returns the value of attribute vocab.
Attributes inherited from BaseTerm
Instance Method Summary collapse
-
#initialize(as_recorded:, source_authority_uri: nil, vocab: nil) ⇒ void
constructor
Initializes a new Genre object.
-
#to_a ⇒ Array<String>
Returns an array containing the recorded data, vocab, and source authority URI.
-
#to_h ⇒ Hash<Symbol,String>
Returns a hash representation of the Genre object.
Methods inherited from BaseTerm
Constructor Details
#initialize(as_recorded:, source_authority_uri: nil, vocab: nil) ⇒ void
Initializes a new Genre object.
16 17 18 19 20 21 22 23 24 |
# File 'lib/ds/extractor/genre.rb', line 16 def initialize( as_recorded:, source_authority_uri: nil, vocab: nil ) @source_authority_uri = @vocab = vocab super(as_recorded: as_recorded) end |
Instance Attribute Details
#source_authority_uri ⇒ Object
Returns the value of attribute source_authority_uri.
8 9 10 |
# File 'lib/ds/extractor/genre.rb', line 8 def @source_authority_uri end |
#vocab ⇒ Object
Returns the value of attribute vocab.
7 8 9 |
# File 'lib/ds/extractor/genre.rb', line 7 def vocab @vocab end |
Instance Method Details
#to_a ⇒ Array<String>
Returns an array containing the recorded data, vocab, and source authority URI.
28 29 30 |
# File 'lib/ds/extractor/genre.rb', line 28 def to_a [as_recorded, vocab, ] end |
#to_h ⇒ Hash<Symbol,String>
Returns a hash representation of the Genre object.
35 36 37 38 39 40 41 42 |
# File 'lib/ds/extractor/genre.rb', line 35 def to_h { genre_as_recorded: as_recorded, as_recorded: as_recorded, source_authority_uri: , vocab: vocab } end |