Class: Primalize::Single::String

Inherits:
Object
  • Object
show all
Includes:
Type
Defined in:
lib/primalize/single.rb

Constant Summary

Constants included from Type

Type::DEFAULT_COERCION

Instance Method Summary collapse

Methods included from Type

#coerce

Constructor Details

#initialize(&coercion) ⇒ String

Returns a new instance of String.



213
214
215
# File 'lib/primalize/single.rb', line 213

def initialize &coercion
  @coercion = coercion
end

Instance Method Details

#===(value) ⇒ Object



217
218
219
# File 'lib/primalize/single.rb', line 217

def === value
  ::String === value
end

#inspectObject



221
222
223
# File 'lib/primalize/single.rb', line 221

def inspect
  'string'
end