Class: SSLCheck::Errors::GenericError

Inherits:
Object
  • Object
show all
Defined in:
lib/sslcheck/generic_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ GenericError

Returns a new instance of GenericError.



5
6
7
8
9
# File 'lib/sslcheck/generic_error.rb', line 5

def initialize(opts={})
  self.name    = opts[:name]
  self.type    = opts[:type]
  self.message = opts[:message]
end

Instance Attribute Details

#messageObject

Returns the value of attribute message.



4
5
6
# File 'lib/sslcheck/generic_error.rb', line 4

def message
  @message
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/sslcheck/generic_error.rb', line 4

def name
  @name
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/sslcheck/generic_error.rb', line 4

def type
  @type
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/sslcheck/generic_error.rb', line 10

def to_s
  "[#{self.name}] #{self.message}"
end