Class: Canard::Abilities
- Inherits:
-
Object
- Object
- Canard::Abilities
- Defined in:
- lib/canard/abilities.rb
Class Attribute Summary collapse
-
.default_path ⇒ Object
Returns the value of attribute default_path.
- .definition_paths ⇒ Object
-
.definitions ⇒ Object
readonly
Returns the value of attribute definitions.
Class Method Summary collapse
Class Attribute Details
.default_path ⇒ Object
Returns the value of attribute default_path.
9 10 11 |
# File 'lib/canard/abilities.rb', line 9 def default_path @default_path end |
.definition_paths ⇒ Object
15 16 17 |
# File 'lib/canard/abilities.rb', line 15 def definition_paths @definition_paths ||= [@default_path] end |
.definitions ⇒ Object (readonly)
Returns the value of attribute definitions.
13 14 15 |
# File 'lib/canard/abilities.rb', line 13 def definitions @definitions end |
Class Method Details
.for(name, &block) ⇒ Object
19 20 21 22 |
# File 'lib/canard/abilities.rb', line 19 def for(name, &block) raise ArgumentError.new('No block of ability definitions given') unless block_given? @definitions[name.to_sym] = block end |