Module: Dry::Types
- Defined in:
- lib/dry/types/pathname.rb
Class Method Summary collapse
Class Method Details
.Pathname(path) ⇒ Object
13 14 15 |
# File 'lib/dry/types/pathname.rb', line 13 def self.Pathname(path) path.is_a?(Pathname) ? path : Kernel::Pathname(path.to_s) end |
.register_if_needed(key, value) ⇒ Object
9 10 11 |
# File 'lib/dry/types/pathname.rb', line 9 def self.register_if_needed(key, value) register(key, value) unless registered?(key) end |