Class: Kiwi::Field

Inherits:
Object
  • Object
show all
Defined in:
lib/kiwi/field.rb

Constant Summary collapse

TYPE_BOOL =
-1
TYPE_BYTE =
-2
TYPE_INT =
-3
TYPE_UINT =
-4
TYPE_FLOAT =
-5
TYPE_STRING =
-6

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, type_id:, is_array:, value:) ⇒ Field

Returns a new instance of Field.



14
15
16
17
18
19
# File 'lib/kiwi/field.rb', line 14

def initialize(name:, type_id:, is_array:, value:)
  @name = name
  @type_id = type_id
  @is_array = is_array
  @value = value
end

Instance Attribute Details

#is_arrayObject (readonly)

Returns the value of attribute is_array.



12
13
14
# File 'lib/kiwi/field.rb', line 12

def is_array
  @is_array
end

#nameObject (readonly)

Returns the value of attribute name.



12
13
14
# File 'lib/kiwi/field.rb', line 12

def name
  @name
end

#type_idObject (readonly)

Returns the value of attribute type_id.



12
13
14
# File 'lib/kiwi/field.rb', line 12

def type_id
  @type_id
end

#valueObject (readonly)

Returns the value of attribute value.



12
13
14
# File 'lib/kiwi/field.rb', line 12

def value
  @value
end

Instance Method Details

#typeObject



21
22
23
# File 'lib/kiwi/field.rb', line 21

def type
  @type_id
end