Class: Pipely::Options
- Inherits:
-
Object
- Object
- Pipely::Options
- Defined in:
- lib/pipely/options.rb
Overview
Options for running the CLI
Instance Attribute Summary collapse
-
#automatic_open ⇒ Object
Returns the value of attribute automatic_open.
-
#input_path ⇒ Object
Returns the value of attribute input_path.
-
#json_output ⇒ Object
Returns the value of attribute json_output.
-
#latest_run ⇒ Object
Returns the value of attribute latest_run.
-
#output_path ⇒ Object
Returns the value of attribute output_path.
-
#pipeline_id ⇒ Object
Returns the value of attribute pipeline_id.
-
#verbose ⇒ Object
Returns the value of attribute verbose.
Class Method Summary collapse
Instance Attribute Details
#automatic_open ⇒ Object
Returns the value of attribute automatic_open.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def automatic_open @automatic_open end |
#input_path ⇒ Object
Returns the value of attribute input_path.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def input_path @input_path end |
#json_output ⇒ Object
Returns the value of attribute json_output.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def json_output @json_output end |
#latest_run ⇒ Object
Returns the value of attribute latest_run.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def latest_run @latest_run end |
#output_path ⇒ Object
Returns the value of attribute output_path.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def output_path @output_path end |
#pipeline_id ⇒ Object
Returns the value of attribute pipeline_id.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def pipeline_id @pipeline_id end |
#verbose ⇒ Object
Returns the value of attribute verbose.
9 10 11 |
# File 'lib/pipely/options.rb', line 9 def verbose @verbose end |
Class Method Details
.parse ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/pipely/options.rb', line 12 def self.parse = Pipely::Options.new OptionParser.new do |opts| opts. = "Usage: pipely [options]" opts.on("-p", "--pipeline-id PIPELINE_ID", "ID of a live pipeline to visualize with live statuses") do |id| .pipeline_id = id end opts.on("-l", "--latest", "Graph only the latest run") do |latest| .latest_run = latest end opts.on("-i", "--input PATH", "Path to a JSON pipeline definition file to visualize") do |input| .input_path = input end opts.on("-o", "--output PATH", "Local or S3 path to write Graphviz PNG file(s)") do |output| .output_path = output end opts.on("-j", "--json", "Write STDOUT formatted as JSON") do |json| .json_output = json end end.parse! end |