Module: Ahub::APIResource
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/ahub/modules/api_resource.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
16 17 18 |
# File 'lib/ahub/modules/api_resource.rb', line 16 def destroy raise NotImplementedError end |
#initialize(attrs) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/ahub/modules/api_resource.rb', line 20 def initialize(attrs) attrs.each_pair do |k,v| self.instance_variable_set("@#{k.to_s.underscore}", v) self.class.send(:define_method, k.to_s.underscore.to_sym) do instance_variable_get("@#{__method__}") end end end |
#update ⇒ Object
12 13 14 |
# File 'lib/ahub/modules/api_resource.rb', line 12 def update raise NotImplementedError end |