Sha256: 3114debc279fc2b7f0a05d910a00fd17714b0f4782c59c9972b7d9cf016269c1

Contents?: true

Size: 445 Bytes

Versions: 2

Compression:

Stored size: 445 Bytes

Contents

module Stachio
  class Proxy < Mustache
    self.raise_on_context_miss = true
    attr_accessor :proxied

    def initialize(proxied)
      self.proxied = proxied
    end

    def respond_to?(method, include_privates=false)
      return true if proxied.respond_to? method
      super
    end

    def method_missing(method, *args, &block)
      super unless proxied.respond_to?(method)
      proxied.send method, *args, &block
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stachio-0.0.2 lib/stachio/proxy.rb
stachio-0.0.1 lib/stachio/proxy.rb