class Safemode::Blankslate

Public Class Methods

allow(*names) click to toggle source
# File lib/safemode/blankslate.rb, line 24
def allow(*names)
  @allowed_methods = allowed_methods + names.map{|name| name.to_s}
  @allowed_methods.uniq!
end
allowed?(name) click to toggle source
# File lib/safemode/blankslate.rb, line 29
def allowed?(name)
  allowed_methods.include? name.to_s
end
allowed_methods() click to toggle source
# File lib/safemode/blankslate.rb, line 20
def allowed_methods
  @allowed_methods ||= []
end
inherited(subclass) click to toggle source
# File lib/safemode/blankslate.rb, line 12
def inherited(subclass)
  subclass.init_allowed_methods(@allowed_methods)
end
init_allowed_methods(allowed_methods) click to toggle source
# File lib/safemode/blankslate.rb, line 16
def init_allowed_methods(allowed_methods)
  @allowed_methods = allowed_methods
end
method_added(name) click to toggle source
# File lib/safemode/blankslate.rb, line 10
def method_added(name) end