Class: ManifestYAML

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(manifest_file_namepath) ⇒ ManifestYAML

Returns a new instance of ManifestYAML.



42
43
44
45
# File 'lib/parser/manifest_parser.rb', line 42

def initialize(manifest_file_namepath)
  @contents = YAML.load_file(manifest_file_namepath)
  @pack_language = 'manifest.yml'
end

Instance Attribute Details

#contentsObject (readonly)

Returns the value of attribute contents.



40
41
42
# File 'lib/parser/manifest_parser.rb', line 40

def contents
  @contents
end

#manifest_file_namepathObject (readonly)

Returns the value of attribute manifest_file_namepath.



40
41
42
# File 'lib/parser/manifest_parser.rb', line 40

def manifest_file_namepath
  @manifest_file_namepath
end

#pack_languageObject (readonly)

Returns the value of attribute pack_language.



40
41
42
# File 'lib/parser/manifest_parser.rb', line 40

def pack_language
  @pack_language
end

Instance Method Details

#get_dependenciesObject



47
48
49
50
51
52
53
# File 'lib/parser/manifest_parser.rb', line 47

def get_dependencies()
  if @contents['dependencies'] == nil
    return []
  else
    return @contents['dependencies']
  end
end

#get_exclude_filesObject



55
56
57
# File 'lib/parser/manifest_parser.rb', line 55

def get_exclude_files()
  @contents['exclude_files']
end