Class: RocketSMS::Did
- Inherits:
-
Object
- Object
- RocketSMS::Did
- Defined in:
- lib/rocket_sms/did.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ Did
constructor
A new instance of Did.
- #method_missing(sym, *args, &block) ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(params) ⇒ Did
Returns a new instance of Did.
6 7 8 |
# File 'lib/rocket_sms/did.rb', line 6 def initialize(params) @params = OpenStruct.new(params) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
20 21 22 |
# File 'lib/rocket_sms/did.rb', line 20 def method_missing(sym, *args, &block) @params.send(sym, *args, &block) end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
4 5 6 |
# File 'lib/rocket_sms/did.rb', line 4 def params @params end |
Class Method Details
Instance Method Details
#to_json ⇒ Object
10 11 12 |
# File 'lib/rocket_sms/did.rb', line 10 def to_json MultiJson.dump(@params.marshal_dump) end |