Class: Lokal::Options
- Inherits:
-
Object
- Object
- Lokal::Options
- Defined in:
- lib/lokal.rb
Instance Attribute Summary collapse
-
#basic_auth ⇒ Object
Returns the value of attribute basic_auth.
-
#cidr_allow ⇒ Object
Returns the value of attribute cidr_allow.
-
#cidr_deny ⇒ Object
Returns the value of attribute cidr_deny.
-
#header_key ⇒ Object
Returns the value of attribute header_key.
-
#request_header_add ⇒ Object
Returns the value of attribute request_header_add.
-
#request_header_remove ⇒ Object
Returns the value of attribute request_header_remove.
-
#response_header_add ⇒ Object
Returns the value of attribute response_header_add.
-
#response_header_remove ⇒ Object
Returns the value of attribute response_header_remove.
Instance Method Summary collapse
-
#initialize ⇒ Options
constructor
A new instance of Options.
- #to_h ⇒ Object
Constructor Details
#initialize ⇒ Options
Returns a new instance of Options.
222 223 224 225 226 227 228 229 230 231 |
# File 'lib/lokal.rb', line 222 def initialize @basic_auth = [] @cidr_allow = [] @cidr_deny = [] @request_header_add = [] @request_header_remove = [] @response_header_add = [] @response_header_remove = [] @header_key = [] end |
Instance Attribute Details
#basic_auth ⇒ Object
Returns the value of attribute basic_auth.
219 220 221 |
# File 'lib/lokal.rb', line 219 def basic_auth @basic_auth end |
#cidr_allow ⇒ Object
Returns the value of attribute cidr_allow.
219 220 221 |
# File 'lib/lokal.rb', line 219 def cidr_allow @cidr_allow end |
#cidr_deny ⇒ Object
Returns the value of attribute cidr_deny.
219 220 221 |
# File 'lib/lokal.rb', line 219 def cidr_deny @cidr_deny end |
#header_key ⇒ Object
Returns the value of attribute header_key.
219 220 221 |
# File 'lib/lokal.rb', line 219 def header_key @header_key end |
#request_header_add ⇒ Object
Returns the value of attribute request_header_add.
219 220 221 |
# File 'lib/lokal.rb', line 219 def request_header_add @request_header_add end |
#request_header_remove ⇒ Object
Returns the value of attribute request_header_remove.
219 220 221 |
# File 'lib/lokal.rb', line 219 def request_header_remove @request_header_remove end |
#response_header_add ⇒ Object
Returns the value of attribute response_header_add.
219 220 221 |
# File 'lib/lokal.rb', line 219 def response_header_add @response_header_add end |
#response_header_remove ⇒ Object
Returns the value of attribute response_header_remove.
219 220 221 |
# File 'lib/lokal.rb', line 219 def response_header_remove @response_header_remove end |
Instance Method Details
#to_h ⇒ Object
233 234 235 236 237 |
# File 'lib/lokal.rb', line 233 def to_h instance_variables.each_with_object({}) do |var, hash| hash[var.to_s.delete('@')] = instance_variable_get(var) end end |