Class: String

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

Instance Method Summary collapse

Instance Method Details

#data_typeObject



5
6
7
# File 'lib/identify_datatype.rb', line 5

def data_type
  Datatypes::Classify.new(:object => self).identify
end

#to_dObject



9
10
11
12
# File 'lib/identify_datatype.rb', line 9

def to_d
  require 'date'
  Date.parse(self).to_time.to_i
end