Sha256: 33e4dd079974904343a6a8e0c899f7a03259a776342e38b3ab827d5be293c9a6

Contents?: true

Size: 817 Bytes

Versions: 17

Compression:

Stored size: 817 Bytes

Contents

module ExtraActions
  def self.included(base)
    base.show_action(:funky_inherited_method)
  end
  
  def funky_inherited_method(foo, bar)
    "#{foo} #{bar}"
  end
end

module Awesome
  class ActionArgs < Merb::Controller
    def index(foo)
      foo.to_s
    end
  end
end

class ActionArgs < Merb::Controller
  include ExtraActions

  def nada
    "NADA"
  end
  
  def index(foo)
    foo
  end
  
  def multi(foo, bar)
    "#{foo} #{bar}"
  end
  
  def defaults(foo, bar = "bar")
    "#{foo} #{bar}"
  end
  
  def defaults_mixed(foo, bar ="bar", baz = "baz")
    "#{foo} #{bar} #{baz}"
  end
  
  define_method :dynamic_define_method do
    "mos def"
  end
    
  def with_default_nil(foo, bar = nil)
    "#{foo} #{bar}"
  end
  
  def with_default_array(foo, bar = [])
    "#{foo} #{bar.inspect}"
  end
  
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
merb-action-args-1.1.3 spec/controllers/action-args.rb
merb-action-args-1.1.2 spec/controllers/action-args.rb
merb-action-args-1.1.1 spec/controllers/action-args.rb
merb-action-args-1.1.0 spec/controllers/action-args.rb
merb-action-args-1.1.0.rc1 spec/controllers/action-args.rb
merb-action-args-1.1.0.pre spec/controllers/action-args.rb
merb-action-args-1.0.15 spec/controllers/action-args.rb
merb-action-args-1.0.14 spec/controllers/action-args.rb
merb-action-args-1.0.13 spec/controllers/action-args.rb
merb-action-args-1.0.12 spec/controllers/action-args.rb
merb-action-args-1.0.10 spec/controllers/action-args.rb
merb-action-args-1.0.11 spec/controllers/action-args.rb
merb-action-args-1.0.8 spec/controllers/action-args.rb
merb-action-args-1.0.7.1 spec/controllers/action-args.rb
merb-action-args-1.0.7 spec/controllers/action-args.rb
merb-action-args-1.0.8.1 spec/controllers/action-args.rb
merb-action-args-1.0.9 spec/controllers/action-args.rb