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 = Hash.new) ⇒ TimeoutStart

Returns a new instance of TimeoutStart.



145
146
147
148
149
# File 'lib/roby/coordination/models/script.rb', line 145

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

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



143
144
145
# File 'lib/roby/coordination/models/script.rb', line 143

def event
  @event
end

#secondsObject (readonly)

Returns the value of attribute seconds.



142
143
144
# File 'lib/roby/coordination/models/script.rb', line 142

def seconds
  @seconds
end

Instance Method Details

#new(script) ⇒ Object



151
152
153
154
155
156
157
# File 'lib/roby/coordination/models/script.rb', line 151

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

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