Class: Dry::Ability::Key

Inherits:
String
  • Object
show all
Defined in:
lib/dry/ability/key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nsedObject (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