Class: Hypercuke::CLI::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/hypercuke/cli/parser.rb

Overview

I extract relevant information from a ‘hcu’ command line

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hcu_command) ⇒ Parser

Returns a new instance of Parser.



7
8
9
10
# File 'lib/hypercuke/cli/parser.rb', line 7

def initialize(hcu_command)
  @tokens = tokenize(hcu_command)
  parse_options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



6
7
8
# File 'lib/hypercuke/cli/parser.rb', line 6

def options
  @options
end

Instance Method Details

#layer_nameObject



12
13
14
# File 'lib/hypercuke/cli/parser.rb', line 12

def layer_name
  options[:layer_name]
end