sapling/utility.rb: Minor style refactoring
This commit is contained in:
parent
8d2da5c6c6
commit
252ad93d5e
2 changed files with 1 additions and 4 deletions
|
@ -11,11 +11,9 @@ require_relative 'sapling/utility'
|
||||||
# Sapling is the main module for the program. From here, the rest of the world
|
# Sapling is the main module for the program. From here, the rest of the world
|
||||||
# starts building.
|
# starts building.
|
||||||
module Sapling
|
module Sapling
|
||||||
|
|
||||||
# CLI is the class for option parsing, and the gateway to the program, on the
|
# CLI is the class for option parsing, and the gateway to the program, on the
|
||||||
# command line
|
# command line
|
||||||
class CLI
|
class CLI
|
||||||
|
|
||||||
# Option parsing, and gateway to either reading and traversing a tree, or
|
# Option parsing, and gateway to either reading and traversing a tree, or
|
||||||
# editing/creating a tree.
|
# editing/creating a tree.
|
||||||
def talk(options)
|
def talk(options)
|
||||||
|
@ -71,7 +69,7 @@ module Sapling
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Hacky way of dealing with bad options
|
# Handle bad options gracefully
|
||||||
begin
|
begin
|
||||||
opt_parser.parse!(options)
|
opt_parser.parse!(options)
|
||||||
rescue OptionParser::InvalidOption
|
rescue OptionParser::InvalidOption
|
||||||
|
|
|
@ -55,5 +55,4 @@ def verify_tree(file)
|
||||||
end
|
end
|
||||||
|
|
||||||
results.include?(false) ? false : true
|
results.include?(false) ? false : true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue