Class: ProjectSimulator::SayAction
- Inherits:
-
Object
- Object
- ProjectSimulator::SayAction
- Defined in:
- lib/projectsimulator.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(s, text: s) ⇒ SayAction
constructor
A new instance of SayAction.
- #to_node ⇒ Object
- #to_rowx ⇒ Object
Constructor Details
#initialize(s, text: s) ⇒ SayAction
Returns a new instance of SayAction.
389 390 391 |
# File 'lib/projectsimulator.rb', line 389 def initialize(s, text: s) @s = s end |
Instance Method Details
#call ⇒ Object
393 394 395 |
# File 'lib/projectsimulator.rb', line 393 def call() "say: %s" % @s end |
#to_node ⇒ Object
397 398 399 |
# File 'lib/projectsimulator.rb', line 397 def to_node() Rexle::Element.new(:action, attributes: {type: :say, text: @s}) end |
#to_rowx ⇒ Object
401 402 403 |
# File 'lib/projectsimulator.rb', line 401 def to_rowx() "action: say %s" % @s end |