class Aviator::Request

Public Class Methods

new(session_data=nil) { |params| ... } click to toggle source
# File lib/aviator/core/request.rb, line 24
def initialize(session_data=nil)
  @session_data = session_data

  params = self.class.params_class.new if self.class.params_class

  if params
    yield(params) if block_given?
    validate_params(params)
  end

  @params = params
end

Public Instance Methods

anonymous?() click to toggle source
# File lib/aviator/core/request.rb, line 38
def anonymous?
  self.class.anonymous?
end
body?() click to toggle source
# File lib/aviator/core/request.rb, line 43
def body?
  self.class.body?
end
headers?() click to toggle source
# File lib/aviator/core/request.rb, line 48
def headers?
  self.class.headers?
end
optional_params() click to toggle source
# File lib/aviator/core/request.rb, line 58
def optional_params
  self.class.optional_params
end
params() click to toggle source
# File lib/aviator/core/request.rb, line 63
def params
  @params.dup
end
querystring?() click to toggle source
# File lib/aviator/core/request.rb, line 83
def querystring?
  self.class.querystring?
end
required_params() click to toggle source
# File lib/aviator/core/request.rb, line 68
def required_params
  self.class.required_params
end
session_data() click to toggle source
# File lib/aviator/core/request.rb, line 73
def session_data
  @session_data
end
session_data?() click to toggle source
# File lib/aviator/core/request.rb, line 78
def session_data?
  !session_data.nil?
end
url?() click to toggle source
# File lib/aviator/core/request.rb, line 88
def url?
  self.class.url?
end