Module: Monarchy::ActsAsResource::SupportMethods
- Defined in:
- lib/monarchy/acts_as_resource.rb
Instance Attribute Summary collapse
-
#acting_as_resource ⇒ Object
readonly
Returns the value of attribute acting_as_resource.
-
#automatic_hierarchy ⇒ Object
Returns the value of attribute automatic_hierarchy.
-
#parentize_name ⇒ Object
readonly
Returns the value of attribute parentize_name.
Instance Method Summary collapse
Instance Attribute Details
#acting_as_resource ⇒ Object (readonly)
Returns the value of attribute acting_as_resource.
26 27 28 |
# File 'lib/monarchy/acts_as_resource.rb', line 26 def acting_as_resource @acting_as_resource end |
#automatic_hierarchy ⇒ Object
Returns the value of attribute automatic_hierarchy.
25 26 27 |
# File 'lib/monarchy/acts_as_resource.rb', line 25 def automatic_hierarchy @automatic_hierarchy end |
#parentize_name ⇒ Object (readonly)
Returns the value of attribute parentize_name.
26 27 28 |
# File 'lib/monarchy/acts_as_resource.rb', line 26 def parentize_name @parentize_name end |
Instance Method Details
#default_role ⇒ Object
32 33 34 |
# File 'lib/monarchy/acts_as_resource.rb', line 32 def default_role @default_role ||= Monarchy.role_class.find_by(name: default_role_name) end |
#default_role_name ⇒ Object
28 29 30 |
# File 'lib/monarchy/acts_as_resource.rb', line 28 def default_role_name Monarchy.configuration.inherited_default_role end |