class Fire::SingleNestedModel
Public Class Methods
folder_content(parent)
click to toggle source
# File lib/model/nested/single.rb, line 11 def folder_content(parent) init_empty_parent_object(parent) parent_original = parent.send(folder) new(parent_original.clone.merge(parent.path_data), parent_original) end
has_path_keys(*keys)
click to toggle source
# File lib/model/nested/single.rb, line 7 def has_path_keys(*keys) raise PathKeysNotSupported.new(self) end
id_key()
click to toggle source
# File lib/model/nested/single.rb, line 17 def id_key parent.id_key end
set_id_key(value)
click to toggle source
# File lib/model/nested/single.rb, line 21 def set_id_key(value) raise IdKeyNotSupported.new(self) end
Protected Class Methods
default_folder_name()
click to toggle source
# File lib/model/nested/single.rb, line 31 def default_folder_name name end
default_path_keys()
click to toggle source
# File lib/model/nested/single.rb, line 27 def default_path_keys [] end
init_empty_parent_object(parent)
click to toggle source
# File lib/model/nested/single.rb, line 35 def init_empty_parent_object(parent) unless parent.send(folder) parent.send("#{folder}=", {}) end end
validate_id_key!()
click to toggle source
# File lib/model/nested/single.rb, line 41 def validate_id_key! true end