Class: Orchparty::Kubernetes::DSLParser

Inherits:
Object
  • Object
show all
Defined in:
lib/orchparty/dsl_parser_kubernetes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename) ⇒ DSLParser

Returns a new instance of DSLParser.



10
11
12
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 10

def initialize(filename)
  @filename = filename
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



8
9
10
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 8

def filename
  @filename
end

Instance Method Details

#parseObject



14
15
16
17
18
19
# File 'lib/orchparty/dsl_parser_kubernetes.rb', line 14

def parse
  file_content = File.read(filename)
  builder = RootBuilder.new
  builder.instance_eval(file_content, filename)
  builder._build
end