Module: LexofficeClient::Model::Base::AttributeNamesConcern

Included in:
LexofficeClient::Model::Base
Defined in:
lib/lexoffice_client/model/base.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



23
24
25
# File 'lib/lexoffice_client/model/base.rb', line 23

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#attributesObject



52
53
54
55
56
# File 'lib/lexoffice_client/model/base.rb', line 52

def attributes
  self.class.attribute_names.each_with_object({}) do |attr_name, memo|
    memo[attr_name.to_sym] = send(attr_name)
  end
end