Sha256: e6fddcf65d1d851e245dacfee6903bf2d73e6b71283ea91ed6912d855003ad93

Contents?: true

Size: 380 Bytes

Versions: 8

Compression:

Stored size: 380 Bytes

Contents

module MagicLamp
  class RenderCatcher
    include Callbacks

    attr_accessor :render_argument

    def render(first_arg, *args)
      self.render_argument = first_arg
    end

    def first_render_argument(&block)
      execute_callbacks_around { instance_eval(&block) }
      render_argument
    end

    def method_missing(method, *args, &block)
      self
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
magic_lamp-1.8.1 lib/magic_lamp/render_catcher.rb
magic_lamp-1.8.0 lib/magic_lamp/render_catcher.rb
magic_lamp-1.7.0 lib/magic_lamp/render_catcher.rb
magic_lamp-1.6.2 lib/magic_lamp/render_catcher.rb
magic_lamp-1.6.1 lib/magic_lamp/render_catcher.rb
magic_lamp-1.6.0 lib/magic_lamp/render_catcher.rb
magic_lamp-1.5.2 lib/magic_lamp/render_catcher.rb
magic_lamp-1.5.1 lib/magic_lamp/render_catcher.rb