Class: Eye::Reason

Inherits:
Object show all
Defined in:
lib/eye/reason.rb

Direct Known Subclasses

Flapping, StartingGuard, User

Defined Under Namespace

Classes: Flapping, StartingGuard, User

Instance Method Summary collapse

Constructor Details

#initialize(mes = nil) ⇒ Reason

Returns a new instance of Reason.



3
4
5
# File 'lib/eye/reason.rb', line 3

def initialize(mes = nil)
  @message = mes
end

Instance Method Details

#to_sObject



7
8
9
# File 'lib/eye/reason.rb', line 7

def to_s
  @message.to_s
end

#user?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/eye/reason.rb', line 11

def user?
  self.class == User
end