module MuchFactory::TypeConverter
Public Class Methods
binary(input)
click to toggle source
# File lib/much-factory.rb, line 125 def self.binary(input) input end
boolean(input)
click to toggle source
# File lib/much-factory.rb, line 121 def self.boolean(input) !!input end
date(input)
click to toggle source
# File lib/much-factory.rb, line 117 def self.date(input) Date.parse(input.to_s) end
datetime(input)
click to toggle source
# File lib/much-factory.rb, line 109 def self.datetime(input) DateTime.parse(input.to_s) # rubocop:disable Style/DateTime end
float(input)
click to toggle source
# File lib/much-factory.rb, line 105 def self.float(input) input.to_f end
integer(input)
click to toggle source
# File lib/much-factory.rb, line 101 def self.integer(input) input.to_i end
string(input)
click to toggle source
# File lib/much-factory.rb, line 97 def self.string(input) input.to_s end
time(input)
click to toggle source
# File lib/much-factory.rb, line 113 def self.time(input) Time.parse(input.to_s) end