Class: FSR::App::Log

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

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Application

#app_name, #raw, #to_s

Constructor Details

#initialize(level = 1, text = "") ⇒ Log

Returns a new instance of Log.



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

def initialize(level = 1, text = "")
  @level = level
  @text = text
end

Instance Attribute Details

#levelObject (readonly)

Returns the value of attribute level.



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

def level
  @level
end

#textObject (readonly)

Returns the value of attribute text.



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

def text
  @text
end

Instance Method Details

#argumentsObject



13
14
15
# File 'lib/fsr/app/log.rb', line 13

def arguments
  [@level, @text]
end

#sendmsgObject



17
18
19
# File 'lib/fsr/app/log.rb', line 17

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