Class: LcpRuby::ViewSlots::SlotContext

Inherits:
Object
  • Object
show all
Defined in:
lib/lcp_ruby/view_slots/slot_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(presenter:, model_definition:, evaluator:, action_set:, params:, records: nil, record: nil, locals: {}) ⇒ SlotContext

Returns a new instance of SlotContext.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 7

def initialize(presenter:, model_definition:, evaluator:, action_set:,
               params:, records: nil, record: nil, locals: {})
  @presenter = presenter
  @model_definition = model_definition
  @evaluator = evaluator
  @action_set = action_set
  @params = params
  @records = records
  @record = record
  @locals = locals
end

Instance Attribute Details

#action_setObject (readonly)

Returns the value of attribute action_set.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def action_set
  @action_set
end

#evaluatorObject (readonly)

Returns the value of attribute evaluator.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def evaluator
  @evaluator
end

#localsObject (readonly)

Returns the value of attribute locals.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def locals
  @locals
end

#model_definitionObject (readonly)

Returns the value of attribute model_definition.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def model_definition
  @model_definition
end

#paramsObject (readonly)

Returns the value of attribute params.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def params
  @params
end

#presenterObject (readonly)

Returns the value of attribute presenter.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def presenter
  @presenter
end

#recordObject (readonly)

Returns the value of attribute record.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def record
  @record
end

#recordsObject (readonly)

Returns the value of attribute records.



4
5
6
# File 'lib/lcp_ruby/view_slots/slot_context.rb', line 4

def records
  @records
end