Class: Net::HTTPExt::Response::Headers
- Defined in:
- lib/vex/base/net/http_ext.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(response) ⇒ Headers
constructor
A new instance of Headers.
- #method_missing(sym, *args, &block) ⇒ Object
Constructor Details
#initialize(response) ⇒ Headers
Returns a new instance of Headers.
23 24 25 |
# File 'lib/vex/base/net/http_ext.rb', line 23 def initialize(response) @headers = response.instance_variable_get "@header" end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
27 28 29 30 |
# File 'lib/vex/base/net/http_ext.rb', line 27 def method_missing(sym, *args, &block) return super unless args.empty? && !block_given? self[sym] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
21 22 23 |
# File 'lib/vex/base/net/http_ext.rb', line 21 def code @code end |