Class: Kanade::Converter::Fixnum

Inherits:
Base
  • Object
show all
Defined in:
lib/kanade/converter/fixnum.rb

Instance Method Summary collapse

Methods inherited from Base

configurable

Instance Method Details

#deserialize(term, _) ⇒ Object



9
10
11
12
# File 'lib/kanade/converter/fixnum.rb', line 9

def deserialize(term, _)
  return nil if term.nil?
  term.to_i
end

#serialize(term, _) ⇒ Object



5
6
7
8
# File 'lib/kanade/converter/fixnum.rb', line 5

def serialize(term, _)
  return nil if term.nil?
  term.to_i
end