Class: LightspeedRestaurantClient::Base
- Inherits:
-
Object
- Object
- LightspeedRestaurantClient::Base
show all
- Defined in:
- lib/lightspeed_restaurant/base.rb
Instance Method Summary
collapse
Constructor Details
#initialize(data = {}) ⇒ Base
3
4
5
|
# File 'lib/lightspeed_restaurant/base.rb', line 3
def initialize(data = {})
convert_to_obj(data)
end
|
Instance Method Details
#attributes ⇒ Object
7
8
9
10
11
|
# File 'lib/lightspeed_restaurant/base.rb', line 7
def attributes
instance_variables.each_with_object({}) do |instance_variable, h|
h[instance_variable[1..instance_variable.length]] = instance_variable_get(instance_variable)
end
end
|
#to_json ⇒ Object
13
14
15
|
# File 'lib/lightspeed_restaurant/base.rb', line 13
def to_json
attributes.to_json
end
|