Class: Watchcat::AccessMode

Inherits:
Object
  • Object
show all
Defined in:
lib/watchcat/kind.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mode) ⇒ AccessMode

Returns a new instance of AccessMode.



120
121
122
# File 'lib/watchcat/kind.rb', line 120

def initialize(mode)
  @mode = mode
end

Instance Attribute Details

#modeObject

Returns the value of attribute mode.



118
119
120
# File 'lib/watchcat/kind.rb', line 118

def mode
  @mode
end

Instance Method Details

#execute_mode?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/watchcat/kind.rb', line 124

def execute_mode?
  @mode == "execute"
end

#read_mode?Boolean

Returns:

  • (Boolean)


128
129
130
# File 'lib/watchcat/kind.rb', line 128

def read_mode?
  @mode == "read"
end

#write_mode?Boolean

Returns:

  • (Boolean)


132
133
134
# File 'lib/watchcat/kind.rb', line 132

def write_mode?
  @mode == "write"
end