Module: RestPack::Resource::Single

Defined in:
lib/restpack-resource/resource/single.rb

Instance Method Summary collapse

Instance Method Details

#single_resource(options = {}) ⇒ Object

Raises:



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/restpack-resource/resource/single.rb', line 4

def single_resource(options = {})
  raise InvalidArguments, "id must be specified" unless options[:id]
  
  options.reverse_merge!(
    :includes => []
  )
  
  resource_normalise_options!(options)
  resource_validate_options!(options)
  #TODO: GJ: other validations
  
  get_single_resource(options)
end