Module: AD::Framework

Defined in:
lib/ad-framework.rb,
lib/ad-framework/config.rb,
lib/ad-framework/fields.rb,
lib/ad-framework/schema.rb,
lib/ad-framework/attribute.rb,
lib/ad-framework/exceptions.rb,
lib/ad-framework/attribute_type.rb,
lib/ad-framework/config/mapping.rb,
lib/ad-framework/auxiliary_class.rb,
lib/ad-framework/structural_class.rb,
lib/ad-framework/patterns/callbacks.rb,
lib/ad-framework/patterns/has_schema.rb,
lib/ad-framework/patterns/searchable.rb,
lib/ad-framework/utilities/validator.rb,
lib/ad-framework/patterns/persistence.rb,
lib/ad-framework/patterns/validations.rb,
lib/ad-framework/utilities/transaction.rb,
lib/ad-framework/utilities/entry_builder.rb,
lib/ad-framework/config/attribute_definition.rb

Defined Under Namespace

Modules: AuxiliaryClass, Patterns, Utilities Classes: Attribute, AttributeNotDefined, AttributeType, AttributeTypeNotDefined, Config, EntryNotFound, Fields, ObjectClassNotDefined, Schema, StructuralClass

Class Method Summary collapse

Class Method Details

.configObject



17
18
19
# File 'lib/ad-framework.rb', line 17

def config
  @config ||= AD::Framework::Config.new
end

.configureObject



10
11
12
13
14
15
# File 'lib/ad-framework.rb', line 10

def configure
  if block_given?
    yield self.config
  end
  self.config
end

.connectionObject



21
22
23
# File 'lib/ad-framework.rb', line 21

def connection
  self.config.adapter
end

.defined_attribute_typesObject



34
35
36
# File 'lib/ad-framework.rb', line 34

def defined_attribute_types
  self.config.attribute_types
end

.defined_attributesObject



25
26
27
# File 'lib/ad-framework.rb', line 25

def defined_attributes
  self.config.attributes
end

.defined_object_classesObject



41
42
43
# File 'lib/ad-framework.rb', line 41

def defined_object_classes
  self.config.object_classes
end

.register_attribute_type(attribute_type) ⇒ Object



37
38
39
# File 'lib/ad-framework.rb', line 37

def register_attribute_type(attribute_type)
  self.config.add_attribute_type(attribute_type)
end

.register_attributes(attributes) ⇒ Object



28
29
30
31
32
# File 'lib/ad-framework.rb', line 28

def register_attributes(attributes)
  attributes.each do |attribute|
    self.config.add_attribute(attribute)
  end
end

.register_auxiliary_class(auxiliary_class) ⇒ Object



47
48
49
# File 'lib/ad-framework.rb', line 47

def register_auxiliary_class(auxiliary_class)
  self.config.add_object_class(auxiliary_class)
end

.register_structural_class(structural_class) ⇒ Object



44
45
46
# File 'lib/ad-framework.rb', line 44

def register_structural_class(structural_class)
  self.config.add_object_class(structural_class)
end