Sha256: dcf375ab8abc0557f29b98fa267d225a676c2c00d1bf657c02ef6b816b9bacd8

Contents?: true

Size: 698 Bytes

Versions: 2

Compression:

Stored size: 698 Bytes

Contents

#!/usr/bin/env ruby

require_relative "../lib/watchbuffy"

require "rationalist"

args = Rationalist.parse(
  string: ["show", "buffy-season", "angel-season", "connor"]
)

options = {}

if args[:show]
  options[:show] = args[:show].split(",")
elsif args[:"buffy-season"] && !args[:"angel-season"]
  options[:show] = "buffy"
elsif args[:"angel-season"] && !args[:"buffy-season"]
  options[:show] = "angel"
end
if args[:connor] == false
  options[:exclude_characters] = "Connor"
end

options[:buffy_season] = args[:"buffy-season"].split(",").map(&:to_i) if args[:"buffy-season"]
options[:angel_season] = args[:"angel-season"].split(",").map(&:to_i) if args[:"angel-season"]

Watchbuffy.pick(options)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
watchbuffy-1.0.3 bin/watchbuffy
watchbuffy-1.0.2 bin/watchbuffy