Class: SmartfoxJruby::SfsWorker::Request
- Inherits:
-
Object
- Object
- SmartfoxJruby::SfsWorker::Request
- Defined in:
- lib/smartfox_jruby/sfs_worker.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, data = {}) ⇒ Request
constructor
A new instance of Request.
- #to_extension_request ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, data = {}) ⇒ Request
Returns a new instance of Request.
67 68 69 70 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 67 def initialize(name, data = {}) @name = name @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
65 66 67 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 65 def data @data end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
64 65 66 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 64 def name @name end |
Instance Method Details
#to_extension_request ⇒ Object
72 73 74 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 72 def to_extension_request ExtensionRequest.new(@name.to_s, @data) end |
#to_s ⇒ Object
76 77 78 |
# File 'lib/smartfox_jruby/sfs_worker.rb', line 76 def to_s "Req[#{@name}]#{data.to_json}" end |