Sha256: 85e48483e3a8e11fde730b0582ab4bb0b7ffa9c3128f7fbd884ae2de08d0d25b
Contents?: true
Size: 629 Bytes
Versions: 14
Compression:
Stored size: 629 Bytes
Contents
require 'yaml' if YAML.parser.class.name =~ /syck|yecht/i module StateManager class Base yaml_as "tag:grouptalent.com,2012:StateManager" def self.yaml_new(klass, tag, val) klass.new(val['resource'], val['context']) end def to_yaml_properties ['@resource', '@context'] end end end else module StateManager class Base def encode_with(coder) coder.map = { "resource" => resource, "context" => context } end def init_with(coder) initialize(coder["resource"], coder["context"]) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems