Class: Momomoto::Datatype::Array::Integer

Inherits:
Base
  • Object
show all
Defined in:
lib/momomoto/datatype/array/integer.rb

Overview

datatype for text arrays

Instance Method Summary collapse

Methods inherited from Base

#compile_rule, #default_operator, #escape, #filter_set, #initialize, operator_sign

Methods inherited from Base

#compile_rule, #default, #default_operator, #equal, #escape, #filter_set, #initialize, #not_null?, operator_sign

Constructor Details

This class inherits a constructor from Momomoto::Datatype::Array::Base

Instance Method Details

#array_typeObject



8
9
10
# File 'lib/momomoto/datatype/array/integer.rb', line 8

def array_type
  "int"
end

#filter_get(value) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/momomoto/datatype/array/integer.rb', line 12

def filter_get( value )
  value = super( value )
  if value.instance_of?( ::Array )
    value = value.map{|v| Integer(v)}
  end
  value
end