Class: Cult::EventTask
Constant Summary collapse
- EVENT_TYPES =
[:sync]
- EVENT_RE =
/^(#{EVENT_TYPES.join('|')})(?:\-P(\d+))?\-?/
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#pass ⇒ Object
readonly
Returns the value of attribute pass.
Attributes inherited from Task
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(role, path) ⇒ EventTask
constructor
A new instance of EventTask.
Methods inherited from Task
all_for_role, collection_name, #file_mode, #relative_path, spawn
Methods included from SingletonInstances
Methods included from Transferable
#binary?, #collection_name, #contents, #file_mode, included, #name, #remote_path, #role_relative_path
Constructor Details
#initialize(role, path) ⇒ EventTask
Returns a new instance of EventTask.
97 98 99 100 101 |
# File 'lib/cult/task.rb', line 97 def initialize(role, path) super @event = event_name(name) @pass = pass_name(name) end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
89 90 91 |
# File 'lib/cult/task.rb', line 89 def event @event end |
#pass ⇒ Object (readonly)
Returns the value of attribute pass.
90 91 92 |
# File 'lib/cult/task.rb', line 90 def pass @pass end |
Class Method Details
.valid_name?(basename) ⇒ Boolean
92 93 94 |
# File 'lib/cult/task.rb', line 92 def self.valid_name?(basename) !! basename.match(EVENT_RE) end |