Sha256: 55684f8401e0d4eab652af06e1dc7de54f8f2c08f9b3839a3cd0e3ad97de805b

Contents?: true

Size: 430 Bytes

Versions: 28

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/acts_as_immutable/common_accessor'
require 'eac_ruby_utils/patches/class/common_constructor'

module EacRubyUtils
  module ActsAsImmutable
    class BooleanAccessor < ::EacRubyUtils::ActsAsImmutable::CommonAccessor
      def apply(klass)
        super
        accessor = self
        klass.send(:define_method, "#{name}?") { send(accessor.name) }
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
eac_tools-0.70.0 sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_tools-0.69.1 sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_ruby_utils-0.117.1 lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_tools-0.69.0 sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_tools-0.68.0 sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_tools-0.67.1 sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_ruby_utils-0.117.0 lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb
eac_tools-0.67.0 sub/eac_ruby_utils/lib/eac_ruby_utils/acts_as_immutable/boolean_accessor.rb