Module: NCore::FindSingle

Extended by:
ActiveSupport::Concern
Defined in:
lib/ncore/methods/find_single.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#idObject



18
19
20
# File 'lib/ncore/methods/find_single.rb', line 18

def id
  'singleton'
end

#reload(find_params = {}) ⇒ Object



22
23
24
25
26
27
# File 'lib/ncore/methods/find_single.rb', line 22

def reload(find_params={})
  params = parse_request_params(find_params).reverse_merge credentials: api_creds
  parsed, @api_creds = request(:get, resource_path, params)
  @attribs = {}.with_indifferent_access
  load(parsed)
end