Module: TranscriptViewer
- Defined in:
- lib/transcript_viewer.rb,
lib/transcript_viewer/page.rb,
lib/transcript_viewer/view.rb,
lib/transcript_viewer/support.rb,
lib/transcript_viewer/version.rb,
lib/transcript_viewer/renderer.rb,
lib/transcript_viewer/configuration.rb,
lib/transcript_viewer/tool_execution.rb,
lib/transcript_viewer/tool_template_registry.rb
Defined Under Namespace
Modules: Support Classes: Configuration, EmptyTranscriptError, Error, Page, Renderer, TemplateNotFoundError, ToolExecution, ToolTemplateRegistry, View
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
- .configuration ⇒ Object
- .configure {|configuration| ... } ⇒ Object
- .page(session_id:, events:, forked_transcript: false, ancestor_lookup: nil, export_href: nil, forked_transcript_href: nil, hide_forked_transcript_href: nil, asset_dir: nil, template_dir: nil, tool_templates: nil, before_html: nil, after_html: nil) ⇒ Object
- .register_tool_template(tool_name, template_path) ⇒ Object
- .render(**options) ⇒ Object
Class Method Details
.configuration ⇒ Object
15 16 17 |
# File 'lib/transcript_viewer.rb', line 15 def self.configuration @configuration ||= Configuration.new end |
.configure {|configuration| ... } ⇒ Object
19 20 21 |
# File 'lib/transcript_viewer.rb', line 19 def self.configure yield(configuration) end |
.page(session_id:, events:, forked_transcript: false, ancestor_lookup: nil, export_href: nil, forked_transcript_href: nil, hide_forked_transcript_href: nil, asset_dir: nil, template_dir: nil, tool_templates: nil, before_html: nil, after_html: nil) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/transcript_viewer.rb', line 27 def self.page(session_id:, events:, forked_transcript: false, ancestor_lookup: nil, export_href: nil, forked_transcript_href: nil, hide_forked_transcript_href: nil, asset_dir: nil, template_dir: nil, tool_templates: nil, before_html: nil, after_html: nil) Page.new( session_id: session_id, events: events, forked_transcript: forked_transcript, ancestor_lookup: ancestor_lookup, export_href: export_href, forked_transcript_href: forked_transcript_href, hide_forked_transcript_href: hide_forked_transcript_href, asset_dir: asset_dir, template_dir: template_dir, tool_templates: tool_templates, before_html: before_html, after_html: after_html, ) end |
.register_tool_template(tool_name, template_path) ⇒ Object
23 24 25 |
# File 'lib/transcript_viewer.rb', line 23 def self.register_tool_template(tool_name, template_path) configuration.register_tool_template(tool_name, template_path) end |
.render(**options) ⇒ Object
44 45 46 |
# File 'lib/transcript_viewer.rb', line 44 def self.render(**) page(**).render end |