Class: TheShoveler::Job
- Inherits:
-
Object
- Object
- TheShoveler::Job
- Defined in:
- lib/theShoveler/job.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target, count) ⇒ Job
constructor
A new instance of Job.
- #run ⇒ Object
Constructor Details
#initialize(target, count) ⇒ Job
Returns a new instance of Job.
5 6 7 8 |
# File 'lib/theShoveler/job.rb', line 5 def initialize(target, count) @target = target @count = count end |
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count.
4 5 6 |
# File 'lib/theShoveler/job.rb', line 4 def count @count end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/theShoveler/job.rb', line 3 def target @target end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/theShoveler/job.rb', line 10 def run TheShoveler::logger.info 'pushing docs' puts count @count.times do |c| @target.add Document.new puts '.' end end |