Class: Dry::Ability::Key
- Inherits:
-
String
- Object
- String
- Dry::Ability::Key
- Defined in:
- lib/dry/ability/key.rb
Instance Attribute Summary collapse
-
#nsed ⇒ Object
(also: #namespaced)
readonly
Returns the value of attribute nsed.
Instance Method Summary collapse
-
#initialize(key, nsfn) ⇒ Key
constructor
A new instance of Key.
Constructor Details
#initialize(key, nsfn) ⇒ Key
Returns a new instance of Key.
12 13 14 15 16 |
# File 'lib/dry/ability/key.rb', line 12 def initialize(key, nsfn) string = COERC[key] @nsed = nsfn[string].freeze super(string) end |
Instance Attribute Details
#nsed ⇒ Object (readonly) Also known as: namespaced
Returns the value of attribute nsed.
9 10 11 |
# File 'lib/dry/ability/key.rb', line 9 def nsed @nsed end |