Exception: Yay::NotAllowedError

Inherits:
Error
  • Object
show all
Defined in:
lib/yay/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Error

#position

Instance Method Summary collapse

Methods inherited from Error

#printable_position

Constructor Details

#initialize(action, path) ⇒ NotAllowedError

Returns a new instance of NotAllowedError.



37
38
39
40
# File 'lib/yay/errors.rb', line 37

def initialize action, path
  @action = action
  @path   = path
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



34
35
36
# File 'lib/yay/errors.rb', line 34

def action
  @action
end

#pathObject (readonly)

Returns the value of attribute path.



35
36
37
# File 'lib/yay/errors.rb', line 35

def path
  @path
end

Instance Method Details

#printable_messageObject



42
43
44
# File 'lib/yay/errors.rb', line 42

def printable_message
  return "You can't #{action} from here"
end