Class: LexofficeClient::Model::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming, ActiveModel::Translation
Includes:
ActiveModel::Conversion, AttributeNamesConcern, SerializationConcern
Defined in:
lib/lexoffice_client/model/base.rb

Defined Under Namespace

Modules: AttributeNamesConcern, SerializationConcern

Instance Method Summary collapse

Methods included from SerializationConcern

#as_json, #to_json

Methods included from AttributeNamesConcern

#attributes, included

Constructor Details

#initialize(attributes = {}) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
# File 'lib/lexoffice_client/model/base.rb', line 10

def initialize(attributes = {})
  attributes.each do |k, v|
    send("#{k.to_s.underscore}=", v)
  end
end

Instance Method Details

#attributes=(attributes) ⇒ Object



16
17
18
19
20
# File 'lib/lexoffice_client/model/base.rb', line 16

def attributes=(attributes)
  attributes.each do |k, v|
    send("#{k.to_s.underscore}=", v)
  end
end