Class: WEEL::Status
- Inherits:
-
Object
- Object
- WEEL::Status
- Defined in:
- lib/weel.rb
Overview
}}}
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(id, message) ⇒ Status
constructor
{{{.
- #to_json(*a) ⇒ Object
- #update(id, message) ⇒ Object
Constructor Details
#initialize(id, message) ⇒ Status
{{{
247 248 249 250 |
# File 'lib/weel.rb', line 247 def initialize(id,) @id = id @message = end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
261 262 263 |
# File 'lib/weel.rb', line 261 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
261 262 263 |
# File 'lib/weel.rb', line 261 def @message end |
Instance Method Details
#to_json(*a) ⇒ Object
255 256 257 258 259 260 |
# File 'lib/weel.rb', line 255 def to_json(*a) { 'id' => @id, 'message' => @message }.to_json(*a) end |
#update(id, message) ⇒ Object
251 252 253 254 |
# File 'lib/weel.rb', line 251 def update(id,) @id = id @message = end |