Class: HealthDataStandards::Export::GreenC32::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/health-data-standards/export/green_c32/entry.rb

Instance Method Summary collapse

Constructor Details

#initializeEntry

Returns a new instance of Entry.



5
6
7
8
9
10
# File 'lib/health-data-standards/export/green_c32/entry.rb', line 5

def initialize
  template_helper = TemplateHelper.new('gc32', 'gc32')
  @rendering_context = RenderingContext.new
  @rendering_context.template_helper = template_helper
  @rendering_context.extensions = [HealthDataStandards::Export::Helper::GC32ViewHelper]
end

Instance Method Details

#export(object, object_type) ⇒ Object



12
13
14
# File 'lib/health-data-standards/export/green_c32/entry.rb', line 12

def export(object, object_type)
  @rendering_context.render(partial: object_type, locals: {object_type => object, type: object_type})
end