Class: APIBlueprint::OutputPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/api_blueprint/output_printer.rb

Overview

Prints API blueprint output

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration, output_collector, output) ⇒ OutputPrinter

Returns a new instance of OutputPrinter.



8
9
10
11
12
# File 'lib/api_blueprint/output_printer.rb', line 8

def initialize(configuration, output_collector, output)
  @configuration = configuration
  @output_collector = output_collector
  @output = output
end

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration.



6
7
8
# File 'lib/api_blueprint/output_printer.rb', line 6

def configuration
  @configuration
end

#examplesObject

Returns the value of attribute examples.



6
7
8
# File 'lib/api_blueprint/output_printer.rb', line 6

def examples
  @examples
end

#outputObject

Returns the value of attribute output.



6
7
8
# File 'lib/api_blueprint/output_printer.rb', line 6

def output
  @output
end

Instance Method Details



14
15
16
17
18
# File 'lib/api_blueprint/output_printer.rb', line 14

def print
  sorted_examples.each do |resource_group_name, resource_group_resources|
    print_resource_group(resource_group_name, resource_group_resources)
  end
end