Exception: CampfireExport::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/campfire_export.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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, message, code=nil)
  @resource = resource
  @message = message
  @code = code
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



114
115
116
# File 'lib/campfire_export.rb', line 114

def code
  @code
end

#messageObject

Returns the value of attribute message.



114
115
116
# File 'lib/campfire_export.rb', line 114

def message
  @message
end

#resourceObject

Returns the value of attribute resource.



114
115
116
# File 'lib/campfire_export.rb', line 114

def resource
  @resource
end

Instance Method Details

#to_sObject



121
122
123
# File 'lib/campfire_export.rb', line 121

def to_s
  "<#{resource}>: #{message}" + (code ? " (#{code})" : "")
end