Class: StaticResource::Connection

Inherits:
ActiveResource::Connection
  • Object
show all
Defined in:
lib/static_resource.rb

Instance Method Summary collapse

Constructor Details

#initialize(format = ActiveResource::Formats[:xml]) ⇒ Connection

Returns a new instance of Connection.



54
55
56
# File 'lib/static_resource.rb', line 54

def initialize(format = ActiveResource::Formats[:xml])
  self.format = format
end

Instance Method Details

#get(path, headers = {}) ⇒ Object



58
59
60
# File 'lib/static_resource.rb', line 58

def get(path, headers = {})
  format.decode(request(:get, path, nil))
end