Class: Wasserstand::Waterway

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Waterway

Returns a new instance of Waterway.



36
37
38
39
# File 'lib/wasserstand/waterway.rb', line 36

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

Instance Attribute Details

#levelsObject (readonly)

Returns the value of attribute levels.



34
35
36
# File 'lib/wasserstand/waterway.rb', line 34

def levels
  @levels
end

#nameObject (readonly)

Returns the value of attribute name.



34
35
36
# File 'lib/wasserstand/waterway.rb', line 34

def name
  @name
end

Class Method Details

.[](name) ⇒ Object



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

def [](name)
  provider[name]
end

.allObject



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

def all
  provider.all
end

.find_by_name(regex) ⇒ Object



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

def find_by_name(regex)
  provider.find_by_name(regex)
end

Instance Method Details

#to_sObject



41
42
43
# File 'lib/wasserstand/waterway.rb', line 41

def to_s
  name
end