Class: Natour::Species
- Inherits:
-
Object
- Object
- Natour::Species
- Includes:
- Comparable
- Defined in:
- lib/natour/species.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#name_de ⇒ Object
readonly
Returns the value of attribute name_de.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #hash ⇒ Object
-
#initialize(name, name_de) ⇒ Species
constructor
A new instance of Species.
Constructor Details
#initialize(name, name_de) ⇒ Species
Returns a new instance of Species.
6 7 8 9 |
# File 'lib/natour/species.rb', line 6 def initialize(name, name_de) @name = name @name_de = name_de end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/natour/species.rb', line 3 def name @name end |
#name_de ⇒ Object (readonly)
Returns the value of attribute name_de.
4 5 6 |
# File 'lib/natour/species.rb', line 4 def name_de @name_de end |
Instance Method Details
#<=>(other) ⇒ Object
13 14 15 16 |
# File 'lib/natour/species.rb', line 13 def <=>(other) [@name, @name_de] <=> [other.name, other.name_de] end |
#hash ⇒ Object
18 19 20 |
# File 'lib/natour/species.rb', line 18 def hash [@name, @name_de].hash end |