Class: SpidrCLI::Options
- Inherits:
-
Object
- Object
- SpidrCLI::Options
- Defined in:
- lib/spidr_cli/options.rb
Constant Summary collapse
- METHODS =
Spidr method
%w[site start_at host].map { |c| [c, c] }.to_h.freeze
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#content_types ⇒ Object
readonly
Returns the value of attribute content_types.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#spidr_method ⇒ Object
readonly
Returns the value of attribute spidr_method.
-
#spidr_options ⇒ Object
readonly
Returns the value of attribute spidr_options.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#usage_doc ⇒ Object
readonly
Returns the value of attribute usage_doc.
Instance Method Summary collapse
-
#initialize(argv = ARGV) ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize(argv = ARGV) ⇒ Options
Returns a new instance of Options.
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/spidr_cli/options.rb', line 11 def initialize(argv = ARGV) @url = nil @columns = %w[url] @content_types = nil @header = false @usage_doc = nil @spidr_method = 'site' = {} (argv) end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def columns @columns end |
#content_types ⇒ Object (readonly)
Returns the value of attribute content_types.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def content_types @content_types end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def header @header end |
#spidr_method ⇒ Object (readonly)
Returns the value of attribute spidr_method.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def spidr_method @spidr_method end |
#spidr_options ⇒ Object (readonly)
Returns the value of attribute spidr_options.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def url @url end |
#usage_doc ⇒ Object (readonly)
Returns the value of attribute usage_doc.
8 9 10 |
# File 'lib/spidr_cli/options.rb', line 8 def usage_doc @usage_doc end |