Sha256: a1ac191cc65576de64a40842db07a95948387dacf8e2b8dbc173dbce1271b3c0
Contents?: true
Size: 551 Bytes
Versions: 2
Compression:
Stored size: 551 Bytes
Contents
module Zermelo module Records class Key # id / if nil, it's a class variable # object / :association, :attribute or :index # accessor / if a complex type, some way of getting sub-value attr_reader :klass, :id, :name, :accessor, :type, :object # TODO better validation of data, e.g. accessor valid for type, etc. def initialize(opts = {}) [:klass, :id, :name, :accessor, :type, :object].each do |iv| instance_variable_set("@#{iv}", opts[iv]) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
zermelo-1.0.1 | lib/zermelo/records/key.rb |
zermelo-1.0.0 | lib/zermelo/records/key.rb |