Class: Moneybird::Service::Administration
- Inherits:
-
Object
- Object
- Moneybird::Service::Administration
- Includes:
- Traits::FindAll, Traits::Service
- Defined in:
- lib/moneybird/service/administration.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#preloaded_data ⇒ Object
readonly
Returns the value of attribute preloaded_data.
Instance Method Summary collapse
- #find(id) ⇒ Object
-
#initialize(client) ⇒ Administration
constructor
A new instance of Administration.
Methods included from Traits::Service
Methods included from Traits::FindAll
#all, #each, #each_page, #first, #first_page, #map
Constructor Details
#initialize(client) ⇒ Administration
Returns a new instance of Administration.
8 9 10 11 |
# File 'lib/moneybird/service/administration.rb', line 8 def initialize(client) @client = client @preloaded_data = nil end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/moneybird/service/administration.rb', line 6 def client @client end |
#preloaded_data ⇒ Object (readonly)
Returns the value of attribute preloaded_data.
6 7 8 |
# File 'lib/moneybird/service/administration.rb', line 6 def preloaded_data @preloaded_data end |
Instance Method Details
#find(id) ⇒ Object
13 14 15 |
# File 'lib/moneybird/service/administration.rb', line 13 def find(id) all.find{ |administration| administration.id.to_i == id } end |