Module: Czar::Command

Defined in:
lib/czar/command.rb

Instance Method Summary collapse

Instance Method Details

#childrenObject



20
21
22
# File 'lib/czar/command.rb', line 20

def children
  @children ||= []
end

#completed?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/czar/command.rb', line 12

def completed?
  state == :complete
end

#executeObject



4
5
6
# File 'lib/czar/command.rb', line 4

def execute
  self.send self.state if self.respond_to? self.state
end

#resultObject



8
9
10
# File 'lib/czar/command.rb', line 8

def result
  internal[:result]
end

#stateObject



16
17
18
# File 'lib/czar/command.rb', line 16

def state
  @state ||= :start
end