Class: GemChangelogDiff::CachedResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/gem_changelog_diff/cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



108
109
110
# File 'lib/gem_changelog_diff/cache.rb', line 108

def body
  @body
end

#codeObject (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

Returns:

  • (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