Class: Slash::SimpleResource

Inherits:
Resource show all
Defined in:
lib/slash/resource.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#connection, #headers, #params, #password, #proxy, #timeout, #uri, #user

Instance Method Summary collapse

Methods inherited from Resource

#[], #delete, #get, #head, new!, #post, #put, #request, #slash, #user_agent, #user_agent=

Constructor Details

#initialize(uri, options = {}) ⇒ SimpleResource

Returns a new instance of SimpleResource.



172
173
174
175
# File 'lib/slash/resource.rb', line 172

def initialize(uri, options = {})
  super(options[:connection] || create_connection, uri, options)
  self.format = options[:format]
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



170
171
172
# File 'lib/slash/resource.rb', line 170

def format
  @format
end