Class: ArduinoBuildNotifier::Arduino::Board

Inherits:
Object
  • Object
show all
Defined in:
lib/arduino_build_notifier/arduino/board.rb

Instance Method Summary collapse

Constructor Details

#initialize(success, failure, building, error) ⇒ Board

Returns a new instance of Board.



4
5
6
7
8
9
10
# File 'lib/arduino_build_notifier/arduino/board.rb', line 4

def initialize(success, failure, building, error)
  @indicators = {}
  @indicators[:success]  = success
  @indicators[:failure]  = failure
  @indicators[:building] = building
  @indicators[:error]    = error
end

Instance Method Details

#buildingObject



22
23
24
25
# File 'lib/arduino_build_notifier/arduino/board.rb', line 22

def building
  turn_off_indicators
  @indicators[:building].on
end

#errorObject



27
28
29
30
# File 'lib/arduino_build_notifier/arduino/board.rb', line 27

def error
  turn_off_indicators
  @indicators[:error].on
end

#failureObject



17
18
19
20
# File 'lib/arduino_build_notifier/arduino/board.rb', line 17

def failure
  turn_off_indicators
  @indicators[:failure].on
end

#successObject



12
13
14
15
# File 'lib/arduino_build_notifier/arduino/board.rb', line 12

def success
  turn_off_indicators
  @indicators[:success].on
end