Module: Apia::Scalars

Defined in:
lib/apia/scalars.rb,
lib/apia/scalars/date.rb,
lib/apia/scalars/base64.rb,
lib/apia/scalars/string.rb,
lib/apia/scalars/boolean.rb,
lib/apia/scalars/decimal.rb,
lib/apia/scalars/integer.rb,
lib/apia/scalars/unix_time.rb

Defined Under Namespace

Classes: Base64, Boolean, Date, Decimal, Integer, String, UnixTime

Class Method Summary collapse

Class Method Details

.fetch(item, default = nil) ⇒ Object



8
9
10
# File 'lib/apia/scalars.rb', line 8

def fetch(item, default = nil)
  all[item.to_sym] || default
end

.register(name, klass) ⇒ Object



12
13
14
# File 'lib/apia/scalars.rb', line 12

def register(name, klass)
  all[name.to_sym] = klass
end