Class: DbdDataEngine::Context

Inherits:
Object
  • Object
show all
Extended by:
ResourceSelectors
Defined in:
app/models/dbd_data_engine/context.rb

Class Method Summary collapse

Methods included from ResourceSelectors

select_with_defines_predicate, single_fact_on_predicate

Class Method Details

.business_todayObject



20
21
22
# File 'app/models/dbd_data_engine/context.rb', line 20

def self.business_today
  context_from_context_facts(business_today_context_facts)
end

.default_from_params(context_param, current_graph) ⇒ Object



24
25
26
# File 'app/models/dbd_data_engine/context.rb', line 24

def self.default_from_params(context_param, current_graph)
  find_context(context_param, current_graph) || create_context(context_param)
end

.personal_todayObject



16
17
18
# File 'app/models/dbd_data_engine/context.rb', line 16

def self.personal_today
  context_from_context_facts(personal_today_context_facts)
end

.predicatesObject



6
7
8
9
10
# File 'app/models/dbd_data_engine/context.rb', line 6

def self.predicates
  resources = ::DbdOnto::Context.new.resources
  predicate_defining_resources = select_with_defines_predicate(resources)
  make_predicate_label_hash(predicate_defining_resources)
end

.public_todayObject



12
13
14
# File 'app/models/dbd_data_engine/context.rb', line 12

def self.public_today
  context_from_context_facts(public_today_context_facts)
end