class PrintPrimesTable::Options::HelpOption
@author Diego Hernán Piccinini Lagos to handle the help messages output
Constants
- MESSAGE
Public Class Methods
process(args,options)
click to toggle source
process the –help option to show the options availables. @param args [Array] in this case is empty at first @param options [Array] if in future we will want to add options
# File lib/print_primes_table/options/help_option.rb, line 34 def process(args,options) validator = Validators::HelpValidator.validate(args) if validator == :valid table = Terminal::Table.new :headings => MESSAGE[:headings], :rows => MESSAGE[:rows] puts table else puts validator end end