Module: AWS::Record

Defined in:
lib/aws/record.rb,
lib/aws/record/base.rb,
lib/aws/record/scope.rb,
lib/aws/record/errors.rb,
lib/aws/record/naming.rb,
lib/aws/record/attribute.rb,
lib/aws/record/validator.rb,
lib/aws/record/conversion.rb,
lib/aws/record/exceptions.rb,
lib/aws/record/validations.rb,
lib/aws/record/dirty_tracking.rb,
lib/aws/record/finder_methods.rb,
lib/aws/record/attribute_macros.rb,
lib/aws/record/attributes/float.rb,
lib/aws/record/validators/block.rb,
lib/aws/record/validators/count.rb,
lib/aws/record/attributes/string.rb,
lib/aws/record/validators/format.rb,
lib/aws/record/validators/length.rb,
lib/aws/record/attributes/boolean.rb,
lib/aws/record/attributes/integer.rb,
lib/aws/record/attributes/datetime.rb,
lib/aws/record/validators/presence.rb,
lib/aws/record/validators/exclusion.rb,
lib/aws/record/validators/inclusion.rb,
lib/aws/record/validators/acceptance.rb,
lib/aws/record/validators/confirmation.rb,
lib/aws/record/validators/numericality.rb,
lib/aws/record/attributes/sortable_float.rb,
lib/aws/record/attributes/sortable_integer.rb

Defined Under Namespace

Modules: AttributeMacros, DirtyTracking, FinderMethods, Validations Classes: Base, Errors, Scope

Class Method Summary collapse

Class Method Details

.domain_prefixString?

Returns The string that is prepended to all domain names.

Returns:

  • (String, nil)

    The string that is prepended to all domain names.



41
42
43
# File 'lib/aws/record.rb', line 41

def self.domain_prefix
  @prefix
end

.domain_prefix=(prefix) ⇒ Object

Sets a prefix to be applied to all SimpleDB domains associated with AWS::Record::Base classes.

AWS::Record.domain_prefix = 'production_'

class Product < AWS::Record::Base
  set_domain_name 'products'
end

Product.domain_name #=> 'production_products'

Parameters:

  • A (String)

    prefix to append to all domains. This is useful for grouping domains used by one application with a single prefix.



36
37
38
# File 'lib/aws/record.rb', line 36

def self.domain_prefix= prefix
  @prefix = prefix
end