class OO::Errors::LicenceMissing
Attributes
licence_key[R]
user_data[R]
Public Class Methods
new(attrs = {})
click to toggle source
Calls superclass method
# File lib/oo/errors/licence_missing.rb, line 6 def initialize(attrs = {}) @user_data = attrs[:user_data] @licence_key = attrs.fetch(:licence_key) super(error_message) end
Private Instance Methods
error_message()
click to toggle source
# File lib/oo/errors/licence_missing.rb, line 14 def error_message msg = "User " msg << "#{user_data} " unless user_data.nil? msg << "is missing permission '#{licence_key}'. " \ 'Therefore he is not allowed to perform this activity.' end