Class: WagonApp
- Inherits:
-
Object
- Object
- WagonApp
- Defined in:
- bin/wagon
Instance Method Summary collapse
-
#initialize(arguments, stdin) ⇒ WagonApp
constructor
A new instance of WagonApp.
- #run ⇒ Object
Constructor Details
#initialize(arguments, stdin) ⇒ WagonApp
Returns a new instance of WagonApp.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'bin/wagon', line 34 def initialize(arguments, stdin) @arguments = arguments @stdin = stdin @options = OpenStruct.new() # Set defaults @options.verbose = false @options.title = nil @options.rows = 6 @options.columns = 7 @options.padding = 2 @options.font_size = 8 @options.page_numbers = false @options.include_date = true @options.picture = true @options.address = true @options.phone_number = true @options.email = true @options.output_file = "./photo_directory.pdf" end |
Instance Method Details
#run ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'bin/wagon', line 55 def run if arguments_valid? puts "Start at #{DateTime.now}\n\n" if @options.verbose if @options.verbose # [Optional] process puts "\nFinished in #{DateTime.now}" if @options.verbose else output_usage end end |