Module: PostJson

Defined in:
lib/post_json/base.rb,
lib/post_json.rb,
lib/post_json/version.rb,
lib/post_json/dynamic_index.rb,
lib/post_json/model_settings.rb,
lib/post_json/query_translator.rb,
lib/post_json/concerns/copyable.rb,
lib/post_json/concerns/query_methods.rb,
lib/post_json/concerns/finder_methods.rb,
lib/post_json/concerns/argument_methods.rb,
lib/post_json/concerns/settings_methods.rb,
lib/post_json/concerns/dynamic_index_methods.rb,
lib/generators/post_json/install/install_generator.rb

Overview

Why all the ugly naming you might ask? Well, it will be fixed, but for now it is preventing a conflict with the naming of JSON attributes

Defined Under Namespace

Modules: ArgumentMethods, Copyable, DynamicIndexMethods, FinderMethods, Generators, QueryMethods, SettingsMethods Classes: Base, Collection, DynamicIndex, ModelSettings, QueryTranslator

Constant Summary collapse

VERSION =
"1.0.14"

Class Method Summary collapse

Class Method Details

.setup(collection_name, &block) ⇒ Object



18
19
20
21
22
23
# File 'lib/post_json.rb', line 18

def setup(collection_name, &block)
  collection = Collection[collection_name]
  collection.transaction do
    block.call(collection)
  end
end