Skip to content

Commit

Permalink
Remove placeholder module now that the formatters are implemented.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Jan 7, 2022
1 parent c7d770f commit 831f13d
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lib/seafoam/formatters/base.rb
@@ -1,17 +1,8 @@
module Seafoam
module Formatters
module Base
# Base interface for all formatters. Returns a string representation of the associated command's output.
module Formatter
def format
raise NotImplementedError
end
end

# Formats the output of the `describe` command.
class DescribeFormatter
include Formatter

attr_reader :graph, :description

def initialize(graph, description)
Expand All @@ -22,8 +13,6 @@ def initialize(graph, description)

# Formats the output of the `edges` command.
class EdgesFormatter
include Formatter

EdgesEntry = Struct.new(:edges) do
def render(formatter)
formatter.render_edges_entry(edges)
Expand Down Expand Up @@ -67,8 +56,6 @@ def render_summary_entry(node_count, edge_count)

# Formats the output of the `info` command.
class InfoFormatter
include Formatter

attr_reader :major_version, :minor_version

def initialize(major_version, minor_version)
Expand All @@ -79,8 +66,6 @@ def initialize(major_version, minor_version)

# Formats the output of the `list` command.
class ListFormatter
include Formatter

Entry = Struct.new(:file, :graph_name_components, :index)

attr_reader :entries
Expand All @@ -92,8 +77,6 @@ def initialize(entries)

# Formats the output of the `source` command.
class SourceFormatter
include Formatter

attr_reader :source_position

def initialize(source_position)
Expand Down

0 comments on commit 831f13d

Please sign in to comment.