Method: Superstore::Types::IntegerType#encode

Defined in:
lib/superstore/types/integer_type.rb

#encode(int) ⇒ Object

Raises:

  • (ArgumentError)


5
6
7
8
9
# File 'lib/superstore/types/integer_type.rb', line 5

def encode(int)
  raise ArgumentError.new("#{int.inspect} is not an Integer.") unless int.kind_of?(Integer)

  int
end