Class: EacRubyUtils::Immutable::BooleanAccessor

Inherits:
CommonAccessor show all
Defined in:
lib/eac_ruby_utils/immutable/boolean_accessor.rb

Instance Method Summary collapse

Methods inherited from CommonAccessor

#immutable_value_get, #immutable_value_set

Methods inherited from BaseAccessor

#duplicate_object, #immutable_value_get

Instance Method Details

#apply(klass) ⇒ Object


9
10
11
12
13
# File 'lib/eac_ruby_utils/immutable/boolean_accessor.rb', line 9

def apply(klass)
  super
  accessor = self
  klass.send(:define_method, "#{name}?") { send(accessor.name) }
end