Class: UIC::StateMachine

Inherits:
Object
  • Object
show all
Includes:
FileBacked
Defined in:
lib/ruic/statemachine.rb

Direct Known Subclasses

Application::StateMachine

Instance Attribute Summary

Attributes included from FileBacked

#doc, #file

Instance Method Summary collapse

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

#errorsObject



11
12
13
# File 'lib/ruic/statemachine.rb', line 11

def errors
	file_found? ? [] : ["File not found: '#{file}'"]
end

#errors?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/ruic/statemachine.rb', line 7

def errors?
	!errors.empty?
end