Class: Seafoam::Formatters::Base::EdgesFormatter
- Inherits:
-
Object
- Object
- Seafoam::Formatters::Base::EdgesFormatter
- Defined in:
- lib/seafoam/formatters/base.rb
Overview
Formats the output of the ‘edges` command.
Direct Known Subclasses
Defined Under Namespace
Classes: EdgesEntry, NodeEntry, SummaryEntry
Instance Attribute Summary collapse
-
#entry ⇒ Object
readonly
Returns the value of attribute entry.
Instance Method Summary collapse
- #format ⇒ Object
-
#initialize(entry) ⇒ EdgesFormatter
constructor
A new instance of EdgesFormatter.
- #render_edges_entry(edges) ⇒ Object
- #render_node_entry(node) ⇒ Object
- #render_summary_entry(node_count, edge_count) ⇒ Object
Constructor Details
#initialize(entry) ⇒ EdgesFormatter
Returns a new instance of EdgesFormatter.
38 39 40 |
# File 'lib/seafoam/formatters/base.rb', line 38 def initialize(entry) @entry = entry end |
Instance Attribute Details
#entry ⇒ Object (readonly)
Returns the value of attribute entry.
36 37 38 |
# File 'lib/seafoam/formatters/base.rb', line 36 def entry @entry end |
Instance Method Details
#format ⇒ Object
42 43 44 |
# File 'lib/seafoam/formatters/base.rb', line 42 def format entry.render(self) end |
#render_edges_entry(edges) ⇒ Object
46 47 48 |
# File 'lib/seafoam/formatters/base.rb', line 46 def render_edges_entry(edges) raise NotImplementedError end |
#render_node_entry(node) ⇒ Object
50 51 52 |
# File 'lib/seafoam/formatters/base.rb', line 50 def render_node_entry(node) raise NotImplementedError end |
#render_summary_entry(node_count, edge_count) ⇒ Object
54 55 56 |
# File 'lib/seafoam/formatters/base.rb', line 54 def render_summary_entry(node_count, edge_count) raise NotImplementedError end |