Class: Nomen::Reference

Inherits:
Object
  • Object
show all
Defined in:
lib/nomen/reference.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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/nomen/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_nomenclatureObject (readonly)

Returns the value of attribute foreign_nomenclature


3
4
5
# File 'lib/nomen/reference.rb', line 3

def foreign_nomenclature
  @foreign_nomenclature
end

#propertyObject (readonly)

Returns the value of attribute property


3
4
5
# File 'lib/nomen/reference.rb', line 3

def property
  @property
end

#setObject (readonly)

Returns the value of attribute set


3
4
5
# File 'lib/nomen/reference.rb', line 3

def set
  @set
end

Instance Method Details

#nomenclatureObject


13
14
15
# File 'lib/nomen/reference.rb', line 13

def nomenclature
  @property.nomenclature
end