Class: TaskLoop::LoopRule

Inherits:
Rule
  • Object
show all
Defined in:
lib/taskloop/rules/loop_rule.rb

Constant Summary

Constants inherited from Rule

Rule::UNIT

Instance Attribute Summary collapse

Attributes inherited from Rule

#unit

Instance Method Summary collapse

Constructor Details

#initialize(unit, count) ⇒ LoopRule

Returns a new instance of LoopRule.



6
7
8
9
# File 'lib/taskloop/rules/loop_rule.rb', line 6

def initialize(unit, count)
  super unit
  @count = count
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



4
5
6
# File 'lib/taskloop/rules/loop_rule.rb', line 4

def count
  @count
end

Instance Method Details

#descObject



17
18
19
# File 'lib/taskloop/rules/loop_rule.rb', line 17

def desc
  super + "; loop: #{count}"
end

#is_conform_rule?(last_exec_time) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
# File 'lib/taskloop/rules/loop_rule.rb', line 11

def is_conform_rule?(last_exec_time)
  # loop rule is different for other rules. It should based on task loop file.
  # So here returns false
  return false
end