Sha256: af8cdf53baac9b33f7320d9981dc8f8bd35fab0358494de7c10720674ada15cc

Contents?: true

Size: 369 Bytes

Versions: 9

Compression:

Stored size: 369 Bytes

Contents

$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
require 'mustache'

class MethodMissing < Mustache
  self.template = '[ {{#list}}{{.}} {{/list}}]'

  def method_missing(name, *args, &block)
    return (0..10).to_a if name == :list
    return super
  end

  def respond_to?(method)
    method == :list
  end
end

if $0 == __FILE__
  puts MethodMissing.to_html
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
mustache-0.99.8 test/fixtures/method_missing.rb
mustache-0.99.7 test/fixtures/method_missing.rb
mustache-0.99.6 test/fixtures/method_missing.rb
mustache-0.99.5 test/fixtures/method_missing.rb
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/mustache-0.99.4/test/fixtures/method_missing.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/mustache-0.99.4/test/fixtures/method_missing.rb
mustache-bibanon-0.99.5 test/fixtures/method_missing.rb
mustache-0.99.4 test/fixtures/method_missing.rb
mustache-0.99.3 test/fixtures/method_missing.rb