Class: Watchcat::AccessMode
- Inherits:
-
Object
- Object
- Watchcat::AccessMode
- Defined in:
- lib/watchcat/kind.rb
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
Instance Method Summary collapse
- #execute_mode? ⇒ Boolean
-
#initialize(mode) ⇒ AccessMode
constructor
A new instance of AccessMode.
- #read_mode? ⇒ Boolean
- #write_mode? ⇒ Boolean
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
#mode ⇒ Object
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
124 125 126 |
# File 'lib/watchcat/kind.rb', line 124 def execute_mode? @mode == "execute" end |
#read_mode? ⇒ Boolean
128 129 130 |
# File 'lib/watchcat/kind.rb', line 128 def read_mode? @mode == "read" end |
#write_mode? ⇒ Boolean
132 133 134 |
# File 'lib/watchcat/kind.rb', line 132 def write_mode? @mode == "write" end |