class AttrPouch::Config
Public Class Methods
new()
click to toggle source
# File lib/attr_pouch.rb, line 232 def initialize @encoders = {} @decoders = {} end
Public Instance Methods
decode(type, &block)
click to toggle source
# File lib/attr_pouch.rb, line 249 def decode(type, &block) Field.decode(type, &block) end
encode(type, &block)
click to toggle source
# File lib/attr_pouch.rb, line 245 def encode(type, &block) Field.encode(type, &block) end
infer_type(&block)
click to toggle source
# File lib/attr_pouch.rb, line 237 def infer_type(&block) if block_given? Field.infer_type(&block) else raise ArgumentError, "Expected block to infer types with" end end