Class: Definition
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#definition ⇒ Object
readonly
Returns the value of attribute definition.
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
Instance Method Summary collapse
- #<=>(other_def) ⇒ Object
-
#initialize(origin, expression, definition) ⇒ Definition
constructor
A new instance of Definition.
Constructor Details
#initialize(origin, expression, definition) ⇒ Definition
Returns a new instance of Definition.
26 27 28 29 30 31 |
# File 'lib/definition.rb', line 26 def initialize(origin, expression, definition) @origin = origin @expression = expression @definition = definition @color = nil end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
24 25 26 |
# File 'lib/definition.rb', line 24 def color @color end |
#definition ⇒ Object (readonly)
Returns the value of attribute definition.
23 24 25 |
# File 'lib/definition.rb', line 23 def definition @definition end |
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
23 24 25 |
# File 'lib/definition.rb', line 23 def expression @expression end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
23 24 25 |
# File 'lib/definition.rb', line 23 def origin @origin end |
Instance Method Details
#<=>(other_def) ⇒ Object
33 34 35 |
# File 'lib/definition.rb', line 33 def <=>(other_def) return @expression <=> other_def.expression end |