Class: Onoma::Reference
- Inherits:
-
Object
- Object
- Onoma::Reference
- Defined in:
- lib/onoma/reference.rb
Instance Attribute Summary collapse
-
#foreign_nomenclature ⇒ Object
readonly
Returns the value of attribute foreign_nomenclature.
-
#property ⇒ Object
readonly
Returns the value of attribute property.
-
#set ⇒ Object
readonly
Returns the value of attribute set.
Instance Method Summary collapse
-
#initialize(set, property, foreign_nomenclature, type = :key) ⇒ Reference
constructor
A new instance of Reference.
- #nomenclature ⇒ Object
Constructor Details
#initialize(set, property, foreign_nomenclature, type = :key) ⇒ Reference
Returns a new instance of Reference.
5 6 7 8 9 10 11 |
# File 'lib/onoma/reference.rb', line 5 def initialize(set, property, foreign_nomenclature, type = :key) @set = set @type = type @property = property @foreign_nomenclature = foreign_nomenclature raise "Invalid nomenclature: #{@foreign_nomenclature.inspect}" unless @foreign_nomenclature.is_a?(Nomenclature) end |
Instance Attribute Details
#foreign_nomenclature ⇒ Object (readonly)
Returns the value of attribute foreign_nomenclature.
3 4 5 |
# File 'lib/onoma/reference.rb', line 3 def foreign_nomenclature @foreign_nomenclature end |
#property ⇒ Object (readonly)
Returns the value of attribute property.
3 4 5 |
# File 'lib/onoma/reference.rb', line 3 def property @property end |
#set ⇒ Object (readonly)
Returns the value of attribute set.
3 4 5 |
# File 'lib/onoma/reference.rb', line 3 def set @set end |
Instance Method Details
#nomenclature ⇒ Object
13 14 15 |
# File 'lib/onoma/reference.rb', line 13 def nomenclature @property.nomenclature end |