Class: Feriados::Rules::RuleBase
- Inherits:
-
Object
- Object
- Feriados::Rules::RuleBase
show all
- Defined in:
- lib/feriados/rules/rule_base.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(name = nil) ⇒ RuleBase
Returns a new instance of RuleBase.
6
7
8
|
# File 'lib/feriados/rules/rule_base.rb', line 6
def initialize(name = nil)
@name = name
end
|
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4
5
6
|
# File 'lib/feriados/rules/rule_base.rb', line 4
def name
@name
end
|
Instance Method Details
#==(other) ⇒ Object
18
19
20
|
# File 'lib/feriados/rules/rule_base.rb', line 18
def ==(other)
eql?(other)
end
|
#eql?(other) ⇒ Boolean
14
15
16
|
# File 'lib/feriados/rules/rule_base.rb', line 14
def eql?(other)
hash == other.hash
end
|
#hash ⇒ Object
10
11
12
|
# File 'lib/feriados/rules/rule_base.rb', line 10
def hash
state.hash
end
|