Module: AIPP::SHOOT::Executable
- Defined in:
- lib/aipp/scopes/shoot/executable.rb
Instance Method Summary collapse
Instance Method Details
#guard ⇒ Object
23 24 25 26 |
# File 'lib/aipp/scopes/shoot/executable.rb', line 23 def guard AIPP..time_zone = AIPP..local_effective_at.at_noon.strftime('%z') AIPP..effective_at = AIPP..local_effective_at.at_midnight.utc end |
#option_parser(o) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/aipp/scopes/shoot/executable.rb', line 14 def option_parser(o) o. = <<~END Download online shooting activities and convert them to #{AIPP..schema.upcase}. Usage: #{File.basename($0)} shoot [options] END o.on('-t', '--effective (DATE)', String, %Q[effective on this date (default: "#{AIPP..local_effective_at.to_date}")]) { AIPP..local_effective_at = Time.parse("#{_1} CET") } o.on('-i', '--id ID', String, %Q[process shooting ground with this ID only]) { AIPP..id = _1 } end |
#options ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/aipp/scopes/shoot/executable.rb', line 6 def AIPP..merge( module: 'Shoot', local_effective_at: Time.now.at_midnight, id: nil ) end |