Class: Brewby::Outputs::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/brewby/outputs/test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Test

Returns a new instance of Test.



5
6
7
8
# File 'lib/brewby/outputs/test.rb', line 5

def initialize options = {}
  @on = false
  @name = options[:name]
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/brewby/outputs/test.rb', line 4

def name
  @name
end

Instance Method Details

#offObject



14
15
16
# File 'lib/brewby/outputs/test.rb', line 14

def off
  @on = false
end

#onObject



10
11
12
# File 'lib/brewby/outputs/test.rb', line 10

def on
  @on = true
end

#on?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/brewby/outputs/test.rb', line 18

def on?
  @on
end