Module: Humanoid::Extensions::Integer::Conversions

Included in:
Integer
Defined in:
lib/humanoid/extensions/integer/conversions.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#get(value) ⇒ Object



10
11
12
# File 'lib/humanoid/extensions/integer/conversions.rb', line 10

def get(value)
  value
end

#set(value) ⇒ Object



6
7
8
9
# File 'lib/humanoid/extensions/integer/conversions.rb', line 6

def set(value)
  return nil if value.blank?
  value =~ /\d/ ? value.to_i : value
end