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.
107 108 109 110 |
# File 'lib/gem_changelog_diff/cache.rb', line 107 def initialize(body, code) @body = body @code = code end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
105 106 107 |
# File 'lib/gem_changelog_diff/cache.rb', line 105 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
105 106 107 |
# File 'lib/gem_changelog_diff/cache.rb', line 105 def code @code end |
Instance Method Details
#[](_header) ⇒ Object
118 119 120 |
# File 'lib/gem_changelog_diff/cache.rb', line 118 def [](_header) nil end |
#is_a?(klass) ⇒ Boolean
112 113 114 115 116 |
# File 'lib/gem_changelog_diff/cache.rb', line 112 def is_a?(klass) return true if klass == Net::HTTPSuccess && @code.start_with?("2") super end |