Sha256: ee776ff04d00b5350fbd824bf9a82ee7d57fd8eeca243261eb5bd1d00993b778

Contents?: true

Size: 404 Bytes

Versions: 5

Compression:

Stored size: 404 Bytes

Contents

require "active_support/concern"

module FlexStationData
  module Concerns
    module Presenter
      extend ActiveSupport::Concern

      def to_proc
        Proc.new(&method(:present))
      end

      class_methods do
        def present(*args, &block)
          new(*args).present(&block)
        end

        def to_proc
          Proc.new(&method(:present))
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
flex-station-data-1.0.0 lib/flex_station_data/concerns/presenter.rb
flex-station-data-0.3.2 lib/flex_station_data/concerns/presenter.rb
flex-station-data-0.3.1 lib/flex_station_data/concerns/presenter.rb
flex-station-data-0.3.0 lib/flex_station_data/concerns/presenter.rb
flex-station-data-0.2.0 lib/flex_station_data/concerns/presenter.rb