Class: Fortnox::API::Repository::Base
- Defined in:
- lib/fortnox/api/repositories/base.rb
Constant Summary
Constants inherited from Base
Base::DEFAULT_HEADERS, Base::HTTP_METHODS
Instance Attribute Summary collapse
-
#keys_filtered_on_save ⇒ Object
readonly
Returns the value of attribute keys_filtered_on_save.
-
#mapper ⇒ Object
readonly
Returns the value of attribute mapper.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(keys_filtered_on_save: [ :url ]) ⇒ Base
constructor
A new instance of Base.
Methods included from Savers
Methods included from Loaders
#all, #escape, #find, #find_one_by, #only, #search, #to_query
Methods included from ClassMethods
#get_access_token, #set_headers
Constructor Details
#initialize(keys_filtered_on_save: [ :url ]) ⇒ Base
Returns a new instance of Base.
15 16 17 18 19 20 |
# File 'lib/fortnox/api/repositories/base.rb', line 15 def initialize( keys_filtered_on_save: [ :url ] ) super() @keys_filtered_on_save = keys_filtered_on_save @mapper = Registry[ Mapper::Base.canonical_name_sym( self.class::MODEL )].new end |
Instance Attribute Details
#keys_filtered_on_save ⇒ Object (readonly)
Returns the value of attribute keys_filtered_on_save.
13 14 15 |
# File 'lib/fortnox/api/repositories/base.rb', line 13 def keys_filtered_on_save @keys_filtered_on_save end |
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
13 14 15 |
# File 'lib/fortnox/api/repositories/base.rb', line 13 def mapper @mapper end |