Class: SyntaxTree::CLI::Options
- Inherits:
-
Object
- Object
- SyntaxTree::CLI::Options
- Defined in:
- lib/syntax_tree/cli.rb
Overview
This represents all of the options that can be passed to the CLI. It is responsible for parsing the list and then returning the file paths at the end.
Instance Attribute Summary collapse
-
#print_width ⇒ Object
readonly
Returns the value of attribute print_width.
Instance Method Summary collapse
-
#initialize(print_width: DEFAULT_PRINT_WIDTH) ⇒ Options
constructor
A new instance of Options.
- #parse(arguments) ⇒ Object
Constructor Details
#initialize(print_width: DEFAULT_PRINT_WIDTH) ⇒ Options
Returns a new instance of Options.
255 256 257 |
# File 'lib/syntax_tree/cli.rb', line 255 def initialize(print_width: DEFAULT_PRINT_WIDTH) @print_width = print_width end |
Instance Attribute Details
#print_width ⇒ Object (readonly)
Returns the value of attribute print_width.
253 254 255 |
# File 'lib/syntax_tree/cli.rb', line 253 def print_width @print_width end |
Instance Method Details
#parse(arguments) ⇒ Object
259 260 261 |
# File 'lib/syntax_tree/cli.rb', line 259 def parse(arguments) parser.parse(arguments) end |