class Samsara::HttpRequest
Attributes
attributes[RW]
Public Class Methods
build_from(controller)
click to toggle source
# File lib/samsara/http_request.rb, line 4 def self.build_from(controller) self.new(extract_attributes_from controller) end
extract_attributes_from(controller)
click to toggle source
# File lib/samsara/http_request.rb, line 8 def self.extract_attributes_from(controller) { url: controller.request.filtered_path, params: controller.request.filtered_parameters, method: controller.request.method } end
new(attributes = {})
click to toggle source
# File lib/samsara/http_request.rb, line 16 def initialize(attributes = {}) @attributes = attributes end
Public Instance Methods
method()
click to toggle source
# File lib/samsara/http_request.rb, line 20 def method attributes[:method] end
params()
click to toggle source
# File lib/samsara/http_request.rb, line 28 def params attributes[:params] end
url()
click to toggle source
# File lib/samsara/http_request.rb, line 24 def url attributes[:url] end