Class: FSR::App::UuidSetVar
- Inherits:
-
Application
- Object
- Application
- FSR::App::UuidSetVar
- Defined in:
- lib/fsr/app/uuid_setvar.rb
Constant Summary collapse
- SENDMSG_METHOD =
%q| def uuid_setvar(*args, &block) me = super(*args) api_call = "api uuid_setvar #{me.uuid} #{me.var} #{me.assignment}\n\n" send_data(api_call) @queue.unshift block if block_given? end |
Instance Attribute Summary collapse
-
#assignment ⇒ Object
readonly
Returns the value of attribute assignment.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
-
#var ⇒ Object
readonly
Returns the value of attribute var.
Instance Method Summary collapse
- #arguments ⇒ Object
-
#initialize(uuid, var, assignment) ⇒ UuidSetVar
constructor
A new instance of UuidSetVar.
- #sendmsg ⇒ Object
Methods inherited from Application
Constructor Details
#initialize(uuid, var, assignment) ⇒ UuidSetVar
Returns a new instance of UuidSetVar.
8 9 10 11 12 |
# File 'lib/fsr/app/uuid_setvar.rb', line 8 def initialize(uuid, var, assignment) @uuid = uuid # Unique channel ID @var = var # Channel variable you wish to 'set' @assignment = assignment end |
Instance Attribute Details
#assignment ⇒ Object (readonly)
Returns the value of attribute assignment.
6 7 8 |
# File 'lib/fsr/app/uuid_setvar.rb', line 6 def assignment @assignment end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
6 7 8 |
# File 'lib/fsr/app/uuid_setvar.rb', line 6 def uuid @uuid end |
#var ⇒ Object (readonly)
Returns the value of attribute var.
6 7 8 |
# File 'lib/fsr/app/uuid_setvar.rb', line 6 def var @var end |
Instance Method Details
#arguments ⇒ Object
14 15 16 |
# File 'lib/fsr/app/uuid_setvar.rb', line 14 def arguments [@uuid, @var, @assignment] end |
#sendmsg ⇒ Object
18 19 20 |
# File 'lib/fsr/app/uuid_setvar.rb', line 18 def sendmsg "call-command: execute\nexecute-app-name: %s\nexecute-app-arg: %s\nevent-lock:true\n\n" % [app_name, arguments.join(" ")] end |