module ARMS
Constants
- VERSION
Public Class Methods
register_coder_shortcut(key, &coderproc)
click to toggle source
adds a shortcut which can be used with ActiveRecord::Base.arms_serialize. the key is usually a symbol, but may be anything. the given block is called by arms_serialize with an ARMS::ShortcutInvocation
object, and must result in a coder.
@yieldparam shortcut_invocation [ARMS::ShortcutInvocation] @yieldreturn [#load, dump] a coder which responds to load and dump
# File lib/arms.rb, line 41 def register_coder_shortcut(key, &coderproc) raise(ArgumentError, "already registered shortcut: #{key}") if @coder_shortcuts.key?(key) @coder_shortcuts[key] = coderproc nil end