Sha256: 77593f004f1f0528bfb78c8b647489f8de2f5ac692710c49f006e95d662f0b67

Contents?: true

Size: 478 Bytes

Versions: 5

Compression:

Stored size: 478 Bytes

Contents

module Representable
  # Using this module only makes sense with Decorator representers.
  module Cached
    module BuildDefinition
      def build_definition(*)
        super.tap do |definition|
          binding_builder = format_engine::Binding

          map << binding_builder.build(definition)
        end
      end
    end

    def self.included(includer)
      includer.extend(BuildDefinition)
    end

    def representable_map(*)
      self.class.map
    end
  end
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/representable-3.2.0/lib/representable/cached.rb
fluent-plugin-google-cloud-logging-on-prem-0.1.0 vendor/ruby/3.1.0/gems/representable-3.2.0/lib/representable/cached.rb
representable-3.2.0 lib/representable/cached.rb
representable-3.1.1 lib/representable/cached.rb
representable-3.1.0 lib/representable/cached.rb