Class: TaskLoop::ScopeRule

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

Direct Known Subclasses

AfterScopeRule, BeforeScopeRule, BetweenScopeRule

Constant Summary collapse

SCOPE =
{
  :before    => 0,
  :between   => 1,
  :after     => 2,
}

Constants inherited from Rule

Rule::UNIT

Instance Attribute Summary collapse

Attributes inherited from Rule

#unit

Instance Method Summary collapse

Methods inherited from Rule

#is_conform_rule?

Constructor Details

#initialize(unit, scope) ⇒ ScopeRule

Returns a new instance of ScopeRule.



13
14
15
16
# File 'lib/taskloop/rules/scope_rule.rb', line 13

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

Instance Attribute Details

#scopeObject

Returns the value of attribute scope.



11
12
13
# File 'lib/taskloop/rules/scope_rule.rb', line 11

def scope
  @scope
end

Instance Method Details

#descObject



18
19
20
# File 'lib/taskloop/rules/scope_rule.rb', line 18

def desc
  super + "; scope: #{scope.to_s}"
end