Class: Natour::Species

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/natour/species.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/natour/species.rb', line 3

def name
  @name
end

#name_deObject (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

#hashObject



18
19
20
# File 'lib/natour/species.rb', line 18

def hash
  [@name, @name_de].hash
end