Exception: CampfireExport::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- CampfireExport::Exception
- Defined in:
- lib/campfire_export.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(resource, message, code = nil) ⇒ Exception
constructor
A new instance of Exception.
- #to_s ⇒ Object
Constructor Details
#initialize(resource, message, code = nil) ⇒ Exception
Returns a new instance of Exception.
115 116 117 118 119 |
# File 'lib/campfire_export.rb', line 115 def initialize(resource, , code=nil) @resource = resource @message = @code = code end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
114 115 116 |
# File 'lib/campfire_export.rb', line 114 def code @code end |
#message ⇒ Object
Returns the value of attribute message.
114 115 116 |
# File 'lib/campfire_export.rb', line 114 def @message end |
#resource ⇒ Object
Returns the value of attribute resource.
114 115 116 |
# File 'lib/campfire_export.rb', line 114 def resource @resource end |
Instance Method Details
#to_s ⇒ Object
121 122 123 |
# File 'lib/campfire_export.rb', line 121 def to_s "<#{resource}>: #{}" + (code ? " (#{code})" : "") end |