Class: RubyFS::Response
- Inherits:
-
Object
- Object
- RubyFS::Response
- Extended by:
- Forwardable
- Defined in:
- lib/ruby_fs/response.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(headers = nil, content = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(headers = nil, content = nil) ⇒ Response
Returns a new instance of Response.
11 12 13 |
# File 'lib/ruby_fs/response.rb', line 11 def initialize(headers = nil, content = nil) @headers, @content = headers || {}, content || {} end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
5 6 7 |
# File 'lib/ruby_fs/response.rb', line 5 def content @content end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/ruby_fs/response.rb', line 5 def headers @headers end |
Instance Method Details
#==(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/ruby_fs/response.rb', line 15 def ==(other) other.is_a?(self.class) && [:headers, :content].all? do |att| other.send(att) == self.send(att) end end |