Sha256: b47812f708651d16eb00f1d877d51f3cc5dae6ac886d493e0edc515c08d5e459
Contents?: true
Size: 623 Bytes
Versions: 2
Compression:
Stored size: 623 Bytes
Contents
module Fire class SingleNestedModel < NestedModel class << self def has_path_keys(*keys) raise PathKeysNotSupported.new(self) end def folder_content(parent) object = parent.send(folder) || {} new(object.merge(parent.path_data)) end protected def default_path_keys [] end def default_folder_name name end end class PathKeysNotSupported < FireModelError def initialize(single_nested_model) super("Single Model #{single_nested_model} don't support own path keys.") end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fire-model-0.0.12 | lib/model/nested/single.rb |
fire-model-0.0.11 | lib/model/nested/single.rb |