Class: RTicker::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/rticker/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Options

Returns a new instance of Options.



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/rticker/options.rb', line 10

def initialize (args)
  # Defaults
  @once = false     # Only run once then quit
  @no_color = false # Don't use color when showing results to user
  @input_files = [] # Input files provided by user
  @proxy = nil      # "host:port" proxy
  @no_proxy = false # Don't default to system proxy if one is detected
  @sleep = 2        # how long to delay between web requests
  @rest = []        # The rest of the command line arguments
  parse!(args)
end

Instance Attribute Details

#input_filesObject (readonly)

Returns the value of attribute input_files.



7
8
9
# File 'lib/rticker/options.rb', line 7

def input_files
  @input_files
end

#no_colorObject (readonly) Also known as: no_color?

Returns the value of attribute no_color.



7
8
9
# File 'lib/rticker/options.rb', line 7

def no_color
  @no_color
end

#no_proxyObject (readonly)

Returns the value of attribute no_proxy.



8
9
10
# File 'lib/rticker/options.rb', line 8

def no_proxy
  @no_proxy
end

#onceObject (readonly) Also known as: once?

Returns the value of attribute once.



7
8
9
# File 'lib/rticker/options.rb', line 7

def once
  @once
end

#proxyObject (readonly)

Returns the value of attribute proxy.



8
9
10
# File 'lib/rticker/options.rb', line 8

def proxy
  @proxy
end

#restObject (readonly)

Returns the value of attribute rest.



8
9
10
# File 'lib/rticker/options.rb', line 8

def rest
  @rest
end

#sleepObject (readonly)

Returns the value of attribute sleep.



8
9
10
# File 'lib/rticker/options.rb', line 8

def sleep
  @sleep
end