Class: Kao::Files::Models::Base

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Attributes, ActiveModel::Model
Defined in:
lib/kao/files/models/base.rb

Direct Known Subclasses

File

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Base

Returns a new instance of Base.



15
16
17
18
19
# File 'lib/kao/files/models/base.rb', line 15

def initialize(attributes = {})
  @api  ||= Kao::Files::Adapter::Api.new

  super(convert_to_snake_case(attributes))
end

Instance Attribute Details

#apiObject (readonly)

Returns the value of attribute api.



13
14
15
# File 'lib/kao/files/models/base.rb', line 13

def api
  @api
end