Exception: Xampl::XamplException

Inherits:
Exception
  • Object
show all
Defined in:
lib/xamplr/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, message = nil) ⇒ XamplException

Returns a new instance of XamplException.



32
33
34
35
# File 'lib/xamplr/exceptions.rb', line 32

def initialize(name, message=nil)
  @name = name
  @msg = message ? message : ""
end

Instance Attribute Details

#msgObject (readonly)

Returns the value of attribute msg.



30
31
32
# File 'lib/xamplr/exceptions.rb', line 30

def msg
  @msg
end

#nameObject (readonly)

Returns the value of attribute name.



30
31
32
# File 'lib/xamplr/exceptions.rb', line 30

def name
  @name
end

Instance Method Details

#messageObject



37
38
39
# File 'lib/xamplr/exceptions.rb', line 37

def message
  "XamplException #{@name} #{@msg}"
end