Class: NilableString
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value = nil) ⇒ NilableString
constructor
A new instance of NilableString.
Methods inherited from Any
Constructor Details
#initialize(value = nil) ⇒ NilableString
Returns a new instance of NilableString.
40 |
# File 'lib/types/nilable_string.rb', line 40 def initialize(value = nil) = super(setup_value(value)) |
Class Method Details
.t(value) ⇒ Object
8 9 10 11 12 |
# File 'lib/types/nilable_string.rb', line 8 def t(value) raise RubytTypeError.new(NilableString, value.class) unless value.is_a? NilableString value end |