Class: Roby::Coordination::Models::Script::TimeoutStart

Inherits:
Object
  • Object
show all
Defined in:
lib/roby/coordination/models/script.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(seconds, options = {}) ⇒ TimeoutStart

Returns a new instance of TimeoutStart.



183
184
185
186
187
# File 'lib/roby/coordination/models/script.rb', line 183

def initialize(seconds, options = {})
    @seconds = seconds
    options = Kernel.validate_options options, emit: nil
    @event = options[:emit]
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



181
182
183
# File 'lib/roby/coordination/models/script.rb', line 181

def event
  @event
end

#secondsObject (readonly)

Returns the value of attribute seconds.



181
182
183
# File 'lib/roby/coordination/models/script.rb', line 181

def seconds
  @seconds
end

Instance Method Details

#new(script) ⇒ Object



189
190
191
192
193
194
195
# File 'lib/roby/coordination/models/script.rb', line 189

def new(script)
    event = if self.event
                script.instance_for(self.event)
            end

    Coordination::TaskScript::TimeoutStart.new(self, event)
end