Sha256: b2ad482d60a1017dffded82939aeead2aca78b2435d3bbb107232bd5ada07f3d
Contents?: true
Size: 1.2 KB
Versions: 2
Compression:
Stored size: 1.2 KB
Contents
module Octogate class TargetBuilder attr_reader :name def initialize(name) @name = name @url = nil @username = nil @password = nil @hook_type = [:push] @http_method = :get @parameter_type = :query @match = nil end def url(url) @url = url end def username(username) @username = username end def password(password) @password = password end def hook_type(types) @hook_type = Array(types) end def http_method(http_method) @http_method = http_method end def parameter_type(parameter_type) @parameter_type = parameter_type end def match(match_proc) @match = match_proc end def params(params) @params = params end def __to_target__ Target.new( name: @name, url: @url, username: @username, password: @password, hook_type: @hook_type, http_method: @http_method, parameter_type: @parameter_type, params: @params, match: @match, ) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octogate-0.4.0 | lib/octogate/target_builder.rb |
octogate-0.3.0 | lib/octogate/target_builder.rb |