module Phrasing

Constants

VERSION
WHITELIST

Public Class Methods

setup() { |self| ... } click to toggle source
# File lib/phrasing.rb, line 18
def self.setup
  yield self
end
whitelist() click to toggle source
# File lib/phrasing.rb, line 24
def self.whitelist
  if defined? @@whitelist
    @@whitelist + [WHITELIST]
  else
    [WHITELIST]
  end
end
whitelist=(whitelist) click to toggle source
# File lib/phrasing.rb, line 32
def self.whitelist=(whitelist)
  @@whitelist = whitelist
end
whitelisted?(klass, attribute) click to toggle source
# File lib/phrasing.rb, line 36
def self.whitelisted?(klass, attribute)
  allow_update_on_all_models_and_attributes == true || whitelist.include?("#{klass}.#{attribute}")
end