Class: Virtus::TypeDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/virtus/attribute/builder.rb

Overview

Extracts the actual type primitive from input type

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ TypeDefinition

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of TypeDefinition.



49
50
51
52
# File 'lib/virtus/attribute/builder.rb', line 49

def initialize(type)
  @type = type
  initialize_primitive
end

Instance Attribute Details

#primitiveObject (readonly)



46
47
48
# File 'lib/virtus/attribute/builder.rb', line 46

def primitive
  @primitive
end

#typeObject (readonly)



46
47
48
# File 'lib/virtus/attribute/builder.rb', line 46

def type
  @type
end

Instance Method Details

#pending?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


55
56
57
# File 'lib/virtus/attribute/builder.rb', line 55

def pending?
  @pending
end