Sha256: 60dac1842cd8e0ffc802ce73ced5a49014d832c324dc10b603b687371be709b3

Contents?: true

Size: 625 Bytes

Versions: 3

Compression:

Stored size: 625 Bytes

Contents

# BasePresenter

The gem adds "Presenter" functionality into Rails application.

## Installation

Add this line to your application's Gemfile:

    gem 'base_presenter'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install base_presenter

## Usage

In director root_rails/app/presenters create file example_presenter.rb with content

    class ExamplePresenter < BasePresenter
      presents :example
      delegate :name, :example

      def name
        "Name"
      end
    end

and in file show.html.erb

    <% present @example do |presenter| %>
      Name: <%= presenter.name %>
    <% end %>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
base_presenter-0.0.4 README.md
base_presenter-0.0.3 README.md
base_presenter-0.0.2 README.md