Class: TwitterImages::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/twitter_images/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CLI

Returns a new instance of CLI.



5
6
7
8
9
# File 'lib/twitter_images/cli.rb', line 5

def initialize(argv)
  @argv = argv
  @configuration = Configuration.new
  @options = {}
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



3
4
5
# File 'lib/twitter_images/cli.rb', line 3

def configuration
  @configuration
end

#optionsObject (readonly)

Returns the value of attribute options.



3
4
5
# File 'lib/twitter_images/cli.rb', line 3

def options
  @options
end

Instance Method Details

#runObject



11
12
13
14
# File 'lib/twitter_images/cli.rb', line 11

def run
  parse_command_line_options
  configuration.prepare(@options)
end