Class: Huebot::Program
- Inherits:
-
Object
- Object
- Huebot::Program
- Defined in:
- lib/huebot/program.rb
Defined Under Namespace
Classes: ParallelTransition, Transition
Instance Attribute Summary collapse
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#final_state ⇒ Object
Returns the value of attribute final_state.
-
#initial_state ⇒ Object
Returns the value of attribute initial_state.
-
#loop ⇒ Object
(also: #loop?)
Returns the value of attribute loop.
-
#loops ⇒ Object
Returns the value of attribute loops.
-
#name ⇒ Object
Returns the value of attribute name.
-
#transitions ⇒ Object
Returns the value of attribute transitions.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
-
#initialize ⇒ Program
constructor
A new instance of Program.
- #valid? ⇒ Boolean
Constructor Details
#initialize ⇒ Program
Returns a new instance of Program.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/huebot/program.rb', line 15 def initialize @name = nil @initial_state = nil @transitions = [] @final_state = nil @loop = false @loops = 0 @errors = [] @warnings = [] end |
Instance Attribute Details
#errors ⇒ Object
Returns the value of attribute errors.
12 13 14 |
# File 'lib/huebot/program.rb', line 12 def errors @errors end |
#final_state ⇒ Object
Returns the value of attribute final_state.
9 10 11 |
# File 'lib/huebot/program.rb', line 9 def final_state @final_state end |
#initial_state ⇒ Object
Returns the value of attribute initial_state.
7 8 9 |
# File 'lib/huebot/program.rb', line 7 def initial_state @initial_state end |
#loop ⇒ Object Also known as: loop?
Returns the value of attribute loop.
10 11 12 |
# File 'lib/huebot/program.rb', line 10 def loop @loop end |
#loops ⇒ Object
Returns the value of attribute loops.
11 12 13 |
# File 'lib/huebot/program.rb', line 11 def loops @loops end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/huebot/program.rb', line 6 def name @name end |
#transitions ⇒ Object
Returns the value of attribute transitions.
8 9 10 |
# File 'lib/huebot/program.rb', line 8 def transitions @transitions end |
#warnings ⇒ Object
Returns the value of attribute warnings.
13 14 15 |
# File 'lib/huebot/program.rb', line 13 def warnings @warnings end |
Instance Method Details
#valid? ⇒ Boolean
26 27 28 |
# File 'lib/huebot/program.rb', line 26 def valid? errors.empty? end |