Sha256: 7e9de2348c5e3442358d6112dc48b5641e9ca98ce1f4e2469af8afab47453546

Contents?: true

Size: 330 Bytes

Versions: 1

Compression:

Stored size: 330 Bytes

Contents

module ActionPresenter
  class Base
    def initialize(object, template)
      @object, @template = object, template
    end

  private

    named_reader :template, as: :h

    def self.presents(name)
      named_reader :object, as: name
    end

    def method_missing(*args, &block)
      h.send(*args, &block)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
action_presenter-1.0 lib/action_presenter/base.rb