Class: Freelancer::Models::StatusConfirmation
- Inherits:
-
Object
- Object
- Freelancer::Models::StatusConfirmation
- Includes:
- JSONMapper
- Defined in:
- lib/freelancer/models/status_confirmation.rb
Instance Method Summary collapse
-
#method_missing(id, *args) ⇒ Object
Method missing method for handling additional data on a status confirmation transparently.
- #success? ⇒ Boolean
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(id, *args) ⇒ Object
Method missing method for handling additional data on a status confirmation transparently. This will check the JSON model associated with the current status confirmation and see if the missing method name is available as a key at the root level of the JSON model.
17 18 19 20 21 22 23 24 |
# File 'lib/freelancer/models/status_confirmation.rb', line 17 def method_missing(id, *args) if !json_data.nil? && json_data.key?(id.to_sym) return json_data[id.to_sym] end raise NoMethodError end |
Instance Method Details
#success? ⇒ Boolean
10 |
# File 'lib/freelancer/models/status_confirmation.rb', line 10 def success?; return self.success; end |