Class: Cloudscopes::Options

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



7
8
9
10
11
12
13
14
# File 'lib/cloudscopes/options.rb', line 7

def initialize
  @publish = true
  @files = OptionParser.new do |opts|
    opts.banner = "Usage: #{$0} [options] [<config.yaml>]\n\nOptions:"
    opts.on("-t", "dump samples to the console instead of publishing, for testing") { @publish = false }
    opts.on_tail("-?", "-h", "--help", "Show this message") { @usage = true }
  end.parse!
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



5
6
7
# File 'lib/cloudscopes/options.rb', line 5

def files
  @files
end

#publishObject (readonly)

Returns the value of attribute publish.



5
6
7
# File 'lib/cloudscopes/options.rb', line 5

def publish
  @publish
end

#usageObject (readonly)

Returns the value of attribute usage.



5
6
7
# File 'lib/cloudscopes/options.rb', line 5

def usage
  @usage
end