Class: Wasserstand::Waterway

Inherits:
Object
  • Object
show all
Extended by:
Finders
Defined in:
lib/wasserstand/waterway.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Finders

[]

Constructor Details

#initialize(name) ⇒ Waterway

Returns a new instance of Waterway.



13
14
15
16
# File 'lib/wasserstand/waterway.rb', line 13

def initialize(name)
  @name = name
  @levels = HashClod.new
end

Instance Attribute Details

#levelsObject (readonly)

Returns the value of attribute levels.



11
12
13
# File 'lib/wasserstand/waterway.rb', line 11

def levels
  @levels
end

#nameObject (readonly)

Returns the value of attribute name.



11
12
13
# File 'lib/wasserstand/waterway.rb', line 11

def name
  @name
end

Class Method Details

.allObject



6
7
8
# File 'lib/wasserstand/waterway.rb', line 6

def all
  Wasserstand.provider.waterways
end

Instance Method Details

#inspectObject



22
23
24
# File 'lib/wasserstand/waterway.rb', line 22

def inspect
  "#<#{self.class.name}: #{name} (#{levels.size} levels)>"
end

#to_sObject



18
19
20
# File 'lib/wasserstand/waterway.rb', line 18

def to_s
  name
end