Class: Fire::SingleNestedModel

Inherits:
NestedModel show all
Defined in:
lib/model/nested/single.rb

Defined Under Namespace

Classes: PathKeysNotSupported

Constant Summary

Constants inherited from Model

Model::LEVEL_SEPARATOR

Class Method Summary collapse

Methods inherited from NestedModel

collection_name, folder, in_collection, #method_missing, nested_in, #nested_options, own_path_keys, #saving_data

Methods inherited from Model

#==, all_path_keys, collection_name, #collection_name, connection, create, #custom_data, #data, #delete, #has_data?, id_key, #id_key, #id_value, in_collection, #initialize, next_id, own_path_keys, #path, #path_changed?, #path_data, path_value_param, #path_values, #persisted?, prepare_hash, #save, #saving_data, set_id_key, take

Constructor Details

This class inherits a constructor from Fire::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Fire::NestedModel

Class Method Details

.folder_content(parent) ⇒ Object



11
12
13
# File 'lib/model/nested/single.rb', line 11

def folder_content(parent)
  new(parent.send(folder).merge(parent.path_data))
end

.has_path_keys(*keys) ⇒ Object



7
8
9
# File 'lib/model/nested/single.rb', line 7

def has_path_keys(*keys)
  raise PathKeysNotSupported.new(self)
end