Class: ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart Private
- Inherits:
-
Object
- Object
- ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Flowchart
- Defined in:
- lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/settings.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/template.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_lines.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_result_lines.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_service_lines.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_method_step_lines.rb,
lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart/entities/code/commands/generate_service_step_lines.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.
Defined Under Namespace
Modules: Entities
Instance Attribute Summary collapse
- #service ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Boolean? private
- #code ⇒ ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Code private
- #content ⇒ String private
- #initialize(service:) ⇒ void constructor private
- #replacements ⇒ Hash{Symbol => Object} private
- #save ⇒ Boolean
- #settings ⇒ ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Settings
- #template ⇒ ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Template private
Constructor Details
#initialize(service:) ⇒ void
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.
25 26 27 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 25 def initialize(service:) @service = service end |
Instance Attribute Details
#service ⇒ Object (readonly)
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.
17 18 19 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 17 def service @service end |
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.
96 97 98 99 100 101 102 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 96 def ==(other) return unless other.instance_of?(self.class) return false if service != other.service true end |
#code ⇒ ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Code
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.
55 56 57 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 55 def code @code ||= Entities::Code.new(flowchart: self) 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.
34 35 36 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 34 def content template.render(**replacements) end |
#replacements ⇒ Hash{Symbol => Object}
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 46 47 48 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 43 def replacements { title: settings.title, code: code.generate } end |
#save ⇒ Boolean
85 86 87 88 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 85 def save ::File.write(settings.absolute_path, content) .tap { ConvenientService.logger.info { "[HasMermaidFlowchart] Flowchart is saved into `#{settings.absolute_path}` " } } end |
#settings ⇒ ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Settings
64 65 66 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 64 def settings @settings ||= Entities::Settings.new(flowchart: self) end |
#template ⇒ ConvenientService::Service::Plugins::HasMermaidFlowchart::Entities::Template
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 |
# File 'lib/convenient_service/service/plugins/has_mermaid_flowchart/entities/flowchart.rb', line 73 def template @template ||= Entities::Template.new end |