Class Stella::RequestTemplate

  1. lib/stella/testplan.rb

Methods

public class

  1. new

public instance

  1. freeze
  2. postprocess

External Aliases

params -> param
headers -> header

Attributes

callback [RW]

Public class methods

new (meth=nil, uri=nil, opts={}, &definition)
[show source]
# File lib/stella/testplan.rb, line 321
    def initialize(meth=nil, uri=nil, opts={}, &definition)
      @protocol = :http
      @http_method, @uri = meth, uri
      opts.each_pair { |n,v| self.send("#{n}=", v) if self.class.has_field?(n) }
      @params ||= {}
      @headers ||= {}
      @follow ||= false
      @callback = definition
    end

Public instance methods

freeze ()
[show source]
# File lib/stella/testplan.rb, line 339
    def freeze
      return if frozen?
      @id &&= Gibbler::Digest.new(@id || self.digest)
      super
      self
    end
postprocess ()
[show source]
# File lib/stella/testplan.rb, line 330
    def postprocess
      @id &&= Gibbler::Digest.new(@id)
      unless response_handler.nil?
        response_handler.keys.each do |range|
          proc = response_handler[range]
          response_handler[range] = Proc.from_string(proc) if proc.kind_of?(ProcString)
        end
      end
    end