Class: InfluxReporter::ErrorMessage::Exception

Inherits:
Struct
  • Object
show all
Defined in:
lib/influx_reporter/error_message/exception.rb

Constant Summary collapse

SPLIT =
'::'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#moduleObject

Returns the value of attribute module

Returns:

  • (Object)

    the current value of module



5
6
7
# File 'lib/influx_reporter/error_message/exception.rb', line 5

def module
  @module
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



5
6
7
# File 'lib/influx_reporter/error_message/exception.rb', line 5

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



5
6
7
# File 'lib/influx_reporter/error_message/exception.rb', line 5

def value
  @value
end

Class Method Details

.from(exception) ⇒ Object



8
9
10
11
# File 'lib/influx_reporter/error_message/exception.rb', line 8

def self.from(exception)
  new exception.class.to_s, exception.message,
      exception.class.to_s.split(SPLIT)[0...-1].join(SPLIT)
end