Sha256: f2c599d67a99f5d12f583fae2205e43b07fa053985cc0d89151514cf41f5f94e

Contents?: true

Size: 470 Bytes

Versions: 2

Compression:

Stored size: 470 Bytes

Contents

module Blocks
  module ViewAdditions
    module ClassMethods
      def blocks
        return @blocks if @blocks
        @blocks = Blocks::Base.new(self)
        @blocks.blocks.merge! @controller_blocks.blocks if @controller_blocks
        @blocks
      end

      def call_if_proc(*args)
        Blocks::ProcWithArgs.call(*args)
      end

      def call_each_hash_value_if_proc(*args)
        Blocks::ProcWithArgs.call_each_hash_value(*args)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blocks-2.2.1 lib/blocks/view_additions.rb
blocks-2.2.0 lib/blocks/view_additions.rb