class Parlour::Generator

Attributes

current_plugin[RW]

The plugin which is currently generating new definitions. {Plugin#run_plugins} controls this value. @return [Plugin, nil]

options[R]

The formatting options for this generator. Currently ignored. @return [Options]

Public Class Methods

new(break_params: 4, tab_size: 2, sort_namespaces: false) click to toggle source

Creates a new generator.

@param break_params [Integer] If there are at least this many parameters in a

signature, then it is broken onto separate lines.

@param tab_size [Integer] The number of spaces to use per indent. @param sort_namespaces [Boolean] Whether to sort all items within a

namespace alphabetically.

@return [void]

# File lib/parlour/generator.rb, line 15
def initialize(break_params: 4, tab_size: 2, sort_namespaces: false)
  @options = Options.new(
    break_params: break_params,
    tab_size: tab_size,
    sort_namespaces: sort_namespaces
  )
end