Module: CanTango::Permits::License::Loader
- Included in:
- CanTango::Permits::License
- Defined in:
- lib/cantango/permits/license/loader.rb
Instance Method Summary collapse
Instance Method Details
#load_rules(name = nil) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/cantango/permits/license/loader.rb', line 4 def load_rules name = nil return if !licenses || licenses..empty? name ||= self.class.to_s.gsub(/License$/, "").underscore return if licenses.[name].nil? licenses.[name].can_eval do || instance_eval end licenses.[name].cannot_eval do || instance_eval end end |