Sha256: d0e83ee9d4ec5f7853f1dd6cb5d3543975f0e19811b46a788e97ecbb1e5ec062

Contents?: true

Size: 308 Bytes

Versions: 2

Compression:

Stored size: 308 Bytes

Contents

module Raisin
  module Exposable
    extend ActiveSupport::Concern

    included do
      attr_reader :exposures
    end

    def initialize(*args)
      @exposures = []
    end

    def expose(name, &block)
      @exposures << [name, block]
    end

    def expose?
      !exposures.empty?
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
raisin-0.0.5 lib/raisin/exposable.rb
raisin-0.0.4 lib/raisin/exposable.rb