Sha256: 7d8ebb50288027c5f2c4a1a940d6e1d64dc50c76cb03a8e46d25380c42809017
Contents?: true
Size: 524 Bytes
Versions: 4
Compression:
Stored size: 524 Bytes
Contents
module CanTango module Permits class Permit module ClassMethods def first_name clazz clazz.to_s.gsub(/^([A-Za-z]+).*/, '\1').underscore.to_sym # first part of class name end def type :abstract end def account_name clazz return nil if clazz.name == clazz.name.demodulize clazz.name.gsub(/::.*/,'').gsub(/(.*)Permits/, '\1').underscore.to_sym end def hash_key nil end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems