Sha256: 4eb694804c8b096d086ceb2a25083f910ad0b5996621aca6052bbd4b406aa1e9
Contents?: true
Size: 958 Bytes
Versions: 7
Compression:
Stored size: 958 Bytes
Contents
# ----------------------------------------------------------------------------- # Convenience for extracting actions out controller classes # Currently supported frameworks : Rails and Merb, more in the future... # ----------------------------------------------------------------------------- module Mole module Utils class Frameworks class << self # Retrieves the collection of callable actions from a Merb controller. def merb_actions( controller_class ) actions = [] controller_class.send( :callable_actions ).keys.each { |action| actions << action } end # Retrieves the collection of callable actions from a Rails controller def rails_actions( controller_class ) controller_class.send( :action_methods ) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems