Class: DS::Extractor::Subject
- Defined in:
- lib/ds/extractor/subject.rb
Instance Attribute Summary collapse
-
#source_authority_uri ⇒ Object
Returns the value of attribute source_authority_uri.
-
#subfield_codes ⇒ Object
Returns the value of attribute subfield_codes.
-
#vocab ⇒ Object
Returns the value of attribute vocab.
Attributes inherited from BaseTerm
Instance Method Summary collapse
-
#initialize(as_recorded:, subfield_codes: nil, vocab: nil, source_authority_uri: nil) ⇒ void
constructor
Initializes a new Subject instance with the provided parameters.
-
#to_a ⇒ Array<String>
Returns an array representation of the Subject instance.
-
#to_h ⇒ Hash<Symbol,String>
Returns a hash representation of the Subject instance.
Methods inherited from BaseTerm
Constructor Details
#initialize(as_recorded:, subfield_codes: nil, vocab: nil, source_authority_uri: nil) ⇒ void
Initializes a new Subject instance with the provided parameters.
19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/ds/extractor/subject.rb', line 19 def initialize( as_recorded:, subfield_codes: nil, vocab: nil, source_authority_uri: nil ) @subfield_codes = subfield_codes @vocab = vocab @source_authority_uri = super as_recorded: as_recorded end |
Instance Attribute Details
#source_authority_uri ⇒ Object
Returns the value of attribute source_authority_uri.
9 10 11 |
# File 'lib/ds/extractor/subject.rb', line 9 def @source_authority_uri end |
#subfield_codes ⇒ Object
Returns the value of attribute subfield_codes.
8 9 10 |
# File 'lib/ds/extractor/subject.rb', line 8 def subfield_codes @subfield_codes end |
#vocab ⇒ Object
Returns the value of attribute vocab.
10 11 12 |
# File 'lib/ds/extractor/subject.rb', line 10 def vocab @vocab end |
Instance Method Details
#to_a ⇒ Array<String>
Returns an array representation of the Subject instance.
Values are: [as_recorded, subfield_codes, vocab, ]
38 39 40 |
# File 'lib/ds/extractor/subject.rb', line 38 def to_a [as_recorded, subfield_codes, vocab, ] end |
#to_h ⇒ Hash<Symbol,String>
Returns a hash representation of the Subject instance.
Keys are :as_recorded, :subfield_codes, :vocab, :source_authority_uri
47 48 49 50 51 52 53 54 55 |
# File 'lib/ds/extractor/subject.rb', line 47 def to_h { subject_as_recorded: as_recorded, as_recorded: as_recorded, subfield_codes: subfield_codes, vocab: vocab, source_authority_uri: } end |