Exception: Arf::Status::BadStatus
- Defined in:
- lib/arf/status.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, msg = nil) ⇒ BadStatus
constructor
A new instance of BadStatus.
Constructor Details
#initialize(code, msg = nil) ⇒ BadStatus
Returns a new instance of BadStatus.
68 69 70 71 72 |
# File 'lib/arf/status.rb', line 68 def initialize(code, msg = nil) @code = code.is_a?(Symbol) ? code : TO_SYMBOL[code] @msg = msg || STATUS_TEXT[@code] || "Unknown status" super(@msg) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
66 67 68 |
# File 'lib/arf/status.rb', line 66 def code @code end |