Class: ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Template Private
- Inherits:
-
Object
- Object
- ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart::Entities::Template
- Defined in:
- lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #absolute_path ⇒ String private
- #content ⇒ String private
- #erb ⇒ ERB private
- #relative_path ⇒ String private
- #render(**replacements) ⇒ String private
Instance Method Details
#==(other) ⇒ Boolean?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
78 79 80 81 82 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 78 def ==(other) return unless other.instance_of?(self.class) true end |
#absolute_path ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 34 def absolute_path @absolute_path ||= ::File.(relative_path, __dir__) end |
#content ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
52 53 54 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 52 def content @content ||= ::File.read(absolute_path) end |
#erb ⇒ ERB
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
43 44 45 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 43 def erb @erb ||= ::ERB.new(content) end |
#relative_path ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
21 22 23 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 21 def relative_path @relative_path ||= ::File.join("..", "templates", "flowchart.html.erb") end |
#render(**replacements) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
68 69 70 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 68 def render(**replacements) erb.result_with_hash(replacements) end |