Exception: OsCtl::Repo::BadHttpResponse

Inherits:
StandardError
  • Object
show all
Defined in:
lib/osctl/repo/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ BadHttpResponse

Returns a new instance of BadHttpResponse.



18
19
20
21
# File 'lib/osctl/repo/exceptions.rb', line 18

def initialize(code)
  @code = code.to_i
  super("HTTP server returned #{code}")
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



16
17
18
# File 'lib/osctl/repo/exceptions.rb', line 16

def code
  @code
end