Class: FSR::App::FSSleep

Inherits:
Application show all
Defined in:
lib/fsr/app/fs_sleep.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Application

#app_name, #raw, #to_s

Constructor Details

#initialize(milliseconds) ⇒ FSSleep

Returns a new instance of FSSleep.



8
9
10
11
# File 'lib/fsr/app/fs_sleep.rb', line 8

def initialize(milliseconds)
  # milliseconds to sleep 
  @milliseconds = milliseconds
end

Instance Attribute Details

#millisecondsObject (readonly)

Returns the value of attribute milliseconds.



6
7
8
# File 'lib/fsr/app/fs_sleep.rb', line 6

def milliseconds
  @milliseconds
end

Instance Method Details

#argumentsObject



12
13
14
# File 'lib/fsr/app/fs_sleep.rb', line 12

def arguments
  [@milliseconds]
end

#sendmsgObject



16
17
18
# File 'lib/fsr/app/fs_sleep.rb', line 16

def sendmsg
  "call-command: execute\nexecute-app-name: sleep\nexecute-app-arg: %s\n\n" % [arguments.join(" ")]
end