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.
73 74 75 76 77 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 73 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.
29 30 31 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 29 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.
47 48 49 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 47 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.
38 39 40 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 38 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.
16 17 18 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 16 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.
63 64 65 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb', line 63 def render(**replacements) erb.result_with_hash(replacements) end |