Exception: Ubcbooker::Error::UnsupportedDepartment

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(department = "unknown") ⇒ UnsupportedDepartment

Returns a new instance of UnsupportedDepartment.



5
6
7
8
9
# File 'lib/ubcbooker/error.rb', line 5

def initialize(department = "unknown")
  @message = "\"#{department}\" is an unsupported department\n".red <<
    "Check supported departments with `ubcbooker -l`"
  super
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/ubcbooker/error.rb', line 4

def message
  @message
end