class Acl9::Dsl::Generators::BooleanMethod
Public Instance Methods
Source
# File lib/acl9/controller_extensions/generators.rb, line 122 def install_on(controller_class, opts) debug_dump(controller_class) if opts[:debug] _add_method(controller_class) if opts[:helper] controller_class.send(:helper_method, @method_name) end end
Protected Instance Methods
Source
# File lib/acl9/controller_extensions/generators.rb, line 150 def _object_ref(object) "(options[:#{object}] || #{super})" end
Source
# File lib/acl9/controller_extensions/generators.rb, line 134 def to_method_code <<-RUBY def #{@method_name}(*args) options = args.extract_options! unless args.size <= 1 raise ArgumentError, "call #{@method_name} with 0, 1 or 2 arguments" end self.action_name = args.first.to_s if args.present? return #{allowance_expression} end RUBY end