Class: Golden::ApplicationContext

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::AttributeAssignment, ActiveModel::Validations, BooleanAccessor, DateTimeAccessor, ExtendedAttrAccessor
Defined in:
lib/golden/objects/application/application_context.rb

Direct Known Subclasses

QueryContext

Constant Summary

Constants included from BooleanAccessor

BooleanAccessor::TRUE_VALUES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from DateTimeAccessor

#parse_time

Methods included from ExtendedAttrAccessor

#attributes, #strip_attributes, #strip_attributes!

Constructor Details

#initialize(accessors = {}) ⇒ ApplicationContext

Returns a new instance of ApplicationContext.



26
27
28
# File 'lib/golden/objects/application/application_context.rb', line 26

def initialize(accessors = {})
  assign_attributes(accessors || {})
end

Class Method Details

.attributesObject



8
9
10
# File 'lib/golden/objects/application/application_context.rb', line 8

def attributes
  accessor_attributes
end

.permitsObject



12
13
14
15
16
17
# File 'lib/golden/objects/application/application_context.rb', line 12

def permits
  @permits ||= lambda do
    attrs = attributes.clone
    attrs
  end.call
end

Instance Method Details

#performObject

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/golden/objects/application/application_context.rb', line 30

def perform
  raise NotImplementedError
end