module Restroom::ClassMethods
Attributes
base_path[R]
endpoint[R]
Public Instance Methods
connection()
click to toggle source
# File lib/restroom.rb, line 53 def connection @connection ||= Faraday.new endpoint do |config| stack(config) config.adapter Faraday.default_adapter end end
default_response_filter()
click to toggle source
# File lib/restroom.rb, line 46 def default_response_filter Proc.new { |mode, response| response } end
model()
click to toggle source
# File lib/restroom.rb, line 38 def model self end
resource_path()
click to toggle source
# File lib/restroom.rb, line 34 def resource_path base_path end
response_filter()
click to toggle source
# File lib/restroom.rb, line 42 def response_filter default_response_filter end
restroom(endpoint, base_path: nil, &block)
click to toggle source
# File lib/restroom.rb, line 28 def restroom(endpoint, base_path: nil, &block) @endpoint = endpoint @base_path = base_path Context.new(host: self, parent: self, &block) end
stack()
click to toggle source
# File lib/restroom.rb, line 50 def stack end