Class: CanTango::PermissionEngine::Loader::Base
- Inherits:
-
Object
- Object
- CanTango::PermissionEngine::Loader::Base
- Defined in:
- lib/cantango/permission_engine/loader/base.rb
Direct Known Subclasses
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#file_name ⇒ Object
Returns the value of attribute file_name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#file_name ⇒ Object
Returns the value of attribute file_name.
5 6 7 |
# File 'lib/cantango/permission_engine/loader/base.rb', line 5 def file_name @file_name end |
Class Method Details
.inherited(subclass) ⇒ Object
7 8 9 |
# File 'lib/cantango/permission_engine/loader/base.rb', line 7 def self.inherited subclass subclass.extend ClassMethods end |
Instance Method Details
#parser ⇒ Object
11 12 13 |
# File 'lib/cantango/permission_engine/loader/base.rb', line 11 def parser raise NotImplementedError end |
#yml_content ⇒ Object
15 16 17 18 19 |
# File 'lib/cantango/permission_engine/loader/base.rb', line 15 def yml_content YAML.load_file(file_name) rescue raise "Couldn't load permissions file: #{file_name}. Either disable Permission engine or add this file." end |