Class: Rules
Instance Method Summary
collapse
Instance Method Details
#eql?(other) ⇒ Boolean
12
13
14
|
# File 'lib/jirametrics/rules.rb', line 12
def eql?(other)
(other.class == self.class) && (other.state == state)
end
|
20
21
22
|
# File 'lib/jirametrics/rules.rb', line 20
def hash
2 end
|
4
5
6
|
# File 'lib/jirametrics/rules.rb', line 4
def ignore
@ignore = true
end
|
#ignored? ⇒ Boolean
8
9
10
|
# File 'lib/jirametrics/rules.rb', line 8
def ignored?
@ignore == true
end
|
24
25
26
27
28
29
30
31
32
|
# File 'lib/jirametrics/rules.rb', line 24
def inspect
result = String.new
result << "#{self.class}("
result << instance_variables.collect do |variable|
"#{variable}=#{instance_variable_get(variable).inspect}"
end.join(', ')
result << ')'
result
end
|
16
17
18
|
# File 'lib/jirametrics/rules.rb', line 16
def state
instance_variables.map { |variable| instance_variable_get variable }
end
|