Class: Ec2Hosts::Options
- Inherits:
-
Object
- Object
- Ec2Hosts::Options
- Defined in:
- lib/ec2_hosts/options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(args) ⇒ Options
constructor
A new instance of Options.
Constructor Details
#initialize(args) ⇒ Options
Returns a new instance of Options.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ec2_hosts/options.rb', line 8 def initialize(args) @options = { vpc: nil, tags: nil, template: nil, ignore_missing: true, only_running: true, public: nil, exclude_public: false, file: '/etc/hosts', backup: nil, dry_run: false, delete: false, clear: false } parser.parse!(args) if @options[:backup].nil? @options[:backup] = "#{@options[:file]}.bak" end end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
6 7 8 |
# File 'lib/ec2_hosts/options.rb', line 6 def @options end |