Class: EacRubyUtils::ActsAsImmutable::BooleanAccessor
- Inherits:
-
CommonAccessor
- Object
- BaseAccessor
- CommonAccessor
- EacRubyUtils::ActsAsImmutable::BooleanAccessor
- Defined in:
- lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
Constant Summary
Constants inherited from BaseAccessor
EacRubyUtils::ActsAsImmutable::BaseAccessor::FILTER_GET_METHOD_NAME_FORMAT, EacRubyUtils::ActsAsImmutable::BaseAccessor::FILTER_SET_METHOD_NAME_FORMAT
Instance Method Summary collapse
Methods inherited from CommonAccessor
#immutable_value_get, #immutable_value_set
Methods inherited from BaseAccessor
#duplicate_object, #immutable_value_get, #immutable_value_get_filtered, #immutable_value_get_filtered_method_name, #immutable_value_set_filtered, #immutable_value_set_filtered_method_name
Instance Method Details
#apply(klass) ⇒ Object
9 10 11 12 13 |
# File 'lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb', line 9 def apply(klass) super accessor = self klass.send(:define_method, "#{name}?") { send(accessor.name) } end |