Class: RTicker::Options
- Inherits:
-
Object
- Object
- RTicker::Options
- Defined in:
- lib/rticker/options.rb
Instance Attribute Summary collapse
-
#input_files ⇒ Object
readonly
Returns the value of attribute input_files.
-
#no_color ⇒ Object
(also: #no_color?)
readonly
Returns the value of attribute no_color.
-
#no_proxy ⇒ Object
readonly
Returns the value of attribute no_proxy.
-
#once ⇒ Object
(also: #once?)
readonly
Returns the value of attribute once.
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#rest ⇒ Object
readonly
Returns the value of attribute rest.
-
#sleep ⇒ Object
readonly
Returns the value of attribute sleep.
Instance Method Summary collapse
-
#initialize(args) ⇒ Options
constructor
A new instance of Options.
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_files ⇒ Object (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_color ⇒ Object (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_proxy ⇒ Object (readonly)
Returns the value of attribute no_proxy.
8 9 10 |
# File 'lib/rticker/options.rb', line 8 def no_proxy @no_proxy end |
#once ⇒ Object (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 |
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
8 9 10 |
# File 'lib/rticker/options.rb', line 8 def proxy @proxy end |
#rest ⇒ Object (readonly)
Returns the value of attribute rest.
8 9 10 |
# File 'lib/rticker/options.rb', line 8 def rest @rest end |
#sleep ⇒ Object (readonly)
Returns the value of attribute sleep.
8 9 10 |
# File 'lib/rticker/options.rb', line 8 def sleep @sleep end |