Class: TShield::Options
- Inherits:
-
Object
- Object
- TShield::Options
- Defined in:
- lib/tshield/options.rb
Overview
Options for command line
Instance Attribute Summary collapse
-
#debug ⇒ Object
readonly
Returns the value of attribute debug.
Class Method Summary collapse
Instance Method Summary collapse
- #configuration_file ⇒ Object
-
#initialize(options = {}) ⇒ Options
constructor
A new instance of Options.
- #port ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Options
Returns a new instance of Options.
21 22 23 24 |
# File 'lib/tshield/options.rb', line 21 def initialize( = {}) @options = {} parse unless [:skip_parse] end |
Instance Attribute Details
#debug ⇒ Object (readonly)
Returns the value of attribute debug.
11 12 13 |
# File 'lib/tshield/options.rb', line 11 def debug @debug end |
Class Method Details
Instance Method Details
#configuration_file ⇒ Object
26 27 28 |
# File 'lib/tshield/options.rb', line 26 def configuration_file @options.fetch(:configuration_file, 'config/tshield.yml') end |
#port ⇒ Object
30 31 32 |
# File 'lib/tshield/options.rb', line 30 def port @options.fetch(:port, 4567) end |