Class: UIC::StateMachine
- Inherits:
-
Object
- Object
- UIC::StateMachine
- Includes:
- FileBacked
- Defined in:
- lib/ruic/statemachine.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from FileBacked
Instance Method Summary collapse
- #errors ⇒ Object
- #errors? ⇒ Boolean
-
#initialize(xml) ⇒ StateMachine
constructor
A new instance of StateMachine.
Methods included from FileBacked
#file_found?, #filename, #path_to
Constructor Details
#initialize(xml) ⇒ StateMachine
Returns a new instance of StateMachine.
3 4 5 |
# File 'lib/ruic/statemachine.rb', line 3 def initialize( xml ) @doc = Nokogiri.XML( xml ) end |
Instance Method Details
#errors ⇒ Object
11 12 13 |
# File 'lib/ruic/statemachine.rb', line 11 def errors file_found? ? [] : ["File not found: '#{file}'"] end |
#errors? ⇒ Boolean
7 8 9 |
# File 'lib/ruic/statemachine.rb', line 7 def errors? !errors.empty? end |