lib/maintain/value.rb in maintain-0.2.14 vs lib/maintain/value.rb in maintain-0.2.15

- old
+ new

@@ -23,10 +23,14 @@ def ===(value) (compare_value == compare_value_for(value)) || super end + def as_json(options = nil) + value + end + def class value.class end def initialize(state, value = nil) @@ -57,11 +61,15 @@ def value @value end - # private + def value_for(state) + state_value_for(state, :value) + end + + private def compare_value @compare_value ||= compare_value_for(@value) end def compare_value_for(state) @@ -113,12 +121,8 @@ nil end else state end - end - - def value_for(state) - state_value_for(state, :value) end end end \ No newline at end of file