Class: GemChangelogDiff::CachedResponse
- Inherits:
-
Object
- Object
- GemChangelogDiff::CachedResponse
- Defined in:
- lib/gem_changelog_diff/cache.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #[](_header) ⇒ Object
-
#initialize(body, code) ⇒ CachedResponse
constructor
A new instance of CachedResponse.
- #is_a?(klass) ⇒ Boolean
Constructor Details
#initialize(body, code) ⇒ CachedResponse
Returns a new instance of CachedResponse.
110 111 112 113 |
# File 'lib/gem_changelog_diff/cache.rb', line 110 def initialize(body, code) @body = body @code = code end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
108 109 110 |
# File 'lib/gem_changelog_diff/cache.rb', line 108 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
108 109 110 |
# File 'lib/gem_changelog_diff/cache.rb', line 108 def code @code end |
Instance Method Details
#[](_header) ⇒ Object
121 122 123 |
# File 'lib/gem_changelog_diff/cache.rb', line 121 def [](_header) nil end |
#is_a?(klass) ⇒ Boolean
115 116 117 118 119 |
# File 'lib/gem_changelog_diff/cache.rb', line 115 def is_a?(klass) return true if klass == Net::HTTPSuccess && @code.start_with?("2") super end |