class Misfortune::CLI::RandomCommand
Attributes
options[R]
Public Class Methods
new(options)
click to toggle source
# File lib/misfortune/cli/random_command.rb, line 6 def initialize(options) @options = options end
Public Instance Methods
run()
click to toggle source
# File lib/misfortune/cli/random_command.rb, line 10 def run cookie = CookieJar.new(options['source']).cookies.sample flavor = Flavor.new(options[:flavor]) puts flavor.apply_to(cookie) end