Class: Dina::GeographicThesaurus
- Inherits:
-
Object
- Object
- Dina::GeographicThesaurus
- Defined in:
- lib/dina/components/geographic_thesaurus.rb
Instance Attribute Summary collapse
-
#additionalParents ⇒ Object
Returns the value of attribute additionalParents.
-
#preferredParent ⇒ Object
Returns the value of attribute preferredParent.
-
#preferredTerm ⇒ Object
Returns the value of attribute preferredTerm.
-
#source ⇒ Object
Returns the value of attribute source.
-
#subjectId ⇒ Object
Returns the value of attribute subjectId.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ GeographicThesaurus
constructor
A new instance of GeographicThesaurus.
- #to_hash ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ GeographicThesaurus
Returns a new instance of GeographicThesaurus.
9 10 11 12 13 14 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 9 def initialize(params = {}) params.each do |key, value| setter = "#{key}=" send(setter, value) if respond_to?(setter.to_sym, false) end end |
Instance Attribute Details
#additionalParents ⇒ Object
Returns the value of attribute additionalParents.
7 8 9 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 7 def additionalParents @additionalParents end |
#preferredParent ⇒ Object
Returns the value of attribute preferredParent.
6 7 8 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 6 def preferredParent @preferredParent end |
#preferredTerm ⇒ Object
Returns the value of attribute preferredTerm.
5 6 7 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 5 def preferredTerm @preferredTerm end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 3 def source @source end |
#subjectId ⇒ Object
Returns the value of attribute subjectId.
4 5 6 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 4 def subjectId @subjectId end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 19 20 |
# File 'lib/dina/components/geographic_thesaurus.rb', line 16 def to_hash hash = {} instance_variables.each { |var| hash[var.to_s.delete('@')] = instance_variable_get(var) } hash.deep_symbolize_keys end |