Class: Seafoam::Formatters::Base::EdgesFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/seafoam/formatters/base.rb

Overview

Formats the output of the ‘edges` command.

Direct Known Subclasses

Json::EdgesFormatter, Text::EdgesFormatter

Defined Under Namespace

Classes: EdgesEntry, NodeEntry, SummaryEntry

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#entryObject (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

#formatObject



42
43
44
# File 'lib/seafoam/formatters/base.rb', line 42

def format
  entry.render(self)
end

#render_edges_entry(edges) ⇒ Object

Raises:

  • (NotImplementedError)


46
47
48
# File 'lib/seafoam/formatters/base.rb', line 46

def render_edges_entry(edges)
  raise NotImplementedError
end

#render_node_entry(node) ⇒ Object

Raises:

  • (NotImplementedError)


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

Raises:

  • (NotImplementedError)


54
55
56
# File 'lib/seafoam/formatters/base.rb', line 54

def render_summary_entry(node_count, edge_count)
  raise NotImplementedError
end