Class: Mousetrap::Plan
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Methods inherited from Resource
[], #destroy, destroy_all, exists?, #exists?, #initialize, #new?, new_from_api
Constructor Details
This class inherits a constructor from Mousetrap::Resource
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/mousetrap/plan.rb', line 3 def code @code end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/mousetrap/plan.rb', line 3 def name @name end |
Class Method Details
.all ⇒ Object
7 8 9 10 11 |
# File 'lib/mousetrap/plan.rb', line 7 def self.all response = get_resources plural_resource_name return [] unless response['plans'] build_resources_from response end |