Class: ESA::Contexts::CreatedAtContext
- Inherits:
-
ESA::Context
- Object
- ActiveRecord::Base
- ESA::Context
- ESA::Contexts::CreatedAtContext
show all
- Defined in:
- app/models/esa/contexts/created_at_context.rb
Instance Method Summary
collapse
#amounts, #apply, #change_total, #check_freshness, #closing_context, #effective_contexts, #effective_end_date, #effective_start_date, #events, #flags, #has_subcontext_namespaces?, #is_fresh?, #is_root?, #is_subcontext?, #is_update_needed?, #last_transaction_time, #next_freshness_timestamp, #opening_context, #subcontext_namespaces, #transactions, #update!, #update_freshness_timestamp!
Instance Method Details
#can_be_persisted? ⇒ Boolean
21
22
23
|
# File 'app/models/esa/contexts/created_at_context.rb', line 21
def can_be_persisted?
false
end
|
#created_at ⇒ Object
4
5
6
|
# File 'app/models/esa/contexts/created_at_context.rb', line 4
def created_at
@created_at
end
|
#created_at=(timespec) ⇒ Object
8
9
10
11
|
# File 'app/models/esa/contexts/created_at_context.rb', line 8
def created_at=(timespec)
@created_at = timespec
@filters = [lambda { |relation| relation.where(created_at: timespec) }]
end
|
#effective_path ⇒ Object
13
14
15
16
17
18
19
|
# File 'app/models/esa/contexts/created_at_context.rb', line 13
def effective_path
if self.parent_id.blank?
[]
else
self.parent.effective_path
end
end
|