Class: Lazybird::Tasks::Task
- Inherits:
-
Object
- Object
- Lazybird::Tasks::Task
- Defined in:
- lib/lazybird/tasks/task.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(command:, twitter_client: Lazybird::TwitterClient, **opts) ⇒ Task
constructor
A new instance of Task.
- #run ⇒ Object
Constructor Details
#initialize(command:, twitter_client: Lazybird::TwitterClient, **opts) ⇒ Task
Returns a new instance of Task.
8 9 10 11 12 13 |
# File 'lib/lazybird/tasks/task.rb', line 8 def initialize(command:, twitter_client: Lazybird::TwitterClient, **opts) # TODO define command on subclass @command = command @opts = opts @twitter_client = twitter_client end |
Instance Attribute Details
#command ⇒ Object (readonly)
Returns the value of attribute command.
6 7 8 |
# File 'lib/lazybird/tasks/task.rb', line 6 def command @command end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
6 7 8 |
# File 'lib/lazybird/tasks/task.rb', line 6 def opts @opts end |
Instance Method Details
#run ⇒ Object
15 16 17 |
# File 'lib/lazybird/tasks/task.rb', line 15 def run raise NotImplementedError end |