Class: BigDoor::NamedLevel
- Inherits:
-
Object
- Object
- BigDoor::NamedLevel
- Includes:
- ClassMethods
- Defined in:
- lib/big-door/named_level.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params) ⇒ NamedLevel
constructor
A new instance of NamedLevel.
Methods included from ClassMethods
app_key, included, #parse_out_classes, #perform_request, #remote_id, secret_key
Constructor Details
#initialize(params) ⇒ NamedLevel
Returns a new instance of NamedLevel.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/big-door/named_level.rb', line 5 def initialize(params) params.each_pair do |key, val| self.class.class_eval do next if self.instance_methods.include?(key) self.instance_eval do attr_accessor key end end instance_variable_set("@#{key}", val) end end |
Class Method Details
.all ⇒ Object
17 18 19 |
# File 'lib/big-door/named_level.rb', line 17 def self.all perform_request('get', 'named_level') end |
.find(params = {}) ⇒ Object
21 22 23 |
# File 'lib/big-door/named_level.rb', line 21 def self.find(params={}) results = perform_request('get', 'named_level', params) end |