module Mara

Mara is a wrapper around DynamoDB that adds a model layer and a bunch of convenience functions.

Constants

NULL

@private

Default NULL value

VERSION

The current version of Mara

Public Class Methods

config() click to toggle source

@private

The current config

# File lib/mara/configure.rb, line 26
def self.config
  @config ||= Configure.new
  @config
end
configure(env) { |instance| ... } click to toggle source

Configure Mara

@param env [String] The default environment that is being configured.

If this block is called a second time, the previous env version will
be overridden

@yield [config] The configuration object to set values on.

@yieldparam config [ Mara::Configure] The configuration object. @yieldreturn [void]

@return [void]

# File lib/mara/configure.rb, line 16
def self.configure(env)
  instance = config
  instance.send(:_set_env, env)
  yield(instance)
end
instrument(name, *args, &block) click to toggle source

@private

Convenience method for {ActiveSupport::Notifications} that also namespaces

the key.

@param name [string] The name of the action being instrumented.

@return [Object] The return value of the block

# File lib/mara/instrument.rb, line 13
def self.instrument(name, *args, &block)
  ActiveSupport::Notifications.instrument("mara.#{name}", *args, &block)
end