Class: AbideDevUtils::Ppt::CodeIntrospection::Manifest
- Inherits:
-
Object
- Object
- AbideDevUtils::Ppt::CodeIntrospection::Manifest
- Defined in:
- lib/abide_dev_utils/ppt/code_introspection.rb
Instance Attribute Summary collapse
-
#manifest_file ⇒ Object
readonly
Returns the value of attribute manifest_file.
Instance Method Summary collapse
- #ast ⇒ Object
- #declaration ⇒ Object
-
#initialize(manifest_file) ⇒ Manifest
constructor
A new instance of Manifest.
Constructor Details
#initialize(manifest_file) ⇒ Manifest
Returns a new instance of Manifest.
12 13 14 15 16 |
# File 'lib/abide_dev_utils/ppt/code_introspection.rb', line 12 def initialize(manifest_file) @compiler = Puppet::Pal::Compiler.new(nil) @manifest_file = File.(manifest_file) raise ArgumentError, "File #{@manifest_file} is not a file" unless File.file?(@manifest_file) end |
Instance Attribute Details
#manifest_file ⇒ Object (readonly)
Returns the value of attribute manifest_file.
10 11 12 |
# File 'lib/abide_dev_utils/ppt/code_introspection.rb', line 10 def manifest_file @manifest_file end |
Instance Method Details
#ast ⇒ Object
18 19 20 |
# File 'lib/abide_dev_utils/ppt/code_introspection.rb', line 18 def ast @ast ||= non_validating_parse_file(manifest_file) end |
#declaration ⇒ Object
22 23 24 |
# File 'lib/abide_dev_utils/ppt/code_introspection.rb', line 22 def declaration @declaration ||= Declaration.new(ast) end |