Class: Realize::Type::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/realize/type/base.rb

Overview

Common code for all Type Transformer subclasses.

Direct Known Subclasses

Array, Boolean, String

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nullable: false) ⇒ Base

Returns a new instance of Base.



18
19
20
21
22
# File 'lib/realize/type/base.rb', line 18

def initialize(nullable: false)
  @nullable = nullable || false

  freeze
end

Instance Attribute Details

#nullableObject (readonly)

Returns the value of attribute nullable.



16
17
18
# File 'lib/realize/type/base.rb', line 16

def nullable
  @nullable
end