Class: ProjectSimulator::SayAction

Inherits:
Object
  • Object
show all
Defined in:
lib/projectsimulator.rb

Instance Method Summary collapse

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

#callObject



393
394
395
# File 'lib/projectsimulator.rb', line 393

def call()
  "say: %s" % @s
end

#to_nodeObject



397
398
399
# File 'lib/projectsimulator.rb', line 397

def to_node()
  Rexle::Element.new(:action, attributes: {type: :say, text: @s})
end

#to_rowxObject



401
402
403
# File 'lib/projectsimulator.rb', line 401

def to_rowx()
  "action: say %s" %  @s
end