Class: Ppr::Load
- Inherits:
-
LoadRequire
- Object
- Macro
- LoadRequire
- Ppr::Load
- Defined in:
- lib/ppr/ppr_core.rb
Overview
Describes a macro loading and pasting a file into the current one.
Constant Summary
Constants inherited from Macro
Macro::E_NUMBER, Macro::E_TYPE
Instance Attribute Summary
Attributes inherited from Macro
Instance Method Summary collapse
-
#apply(i_number) ⇒ Object
Applies the macro invoked at line number
i_number
, its result is the name of the file to be loaded.
Methods inherited from LoadRequire
Methods inherited from Macro
#add, #e_message, e_message, #e_number, #e_shift_number, #e_type?, #empty?, #final?, #generate, #initialize, #to_quoted
Constructor Details
This class inherits a constructor from Ppr::LoadRequire
Instance Method Details
#apply(i_number) ⇒ Object
Applies the macro invoked at line number i_number
, its result is the name of the file to be loaded.
321 322 323 324 325 326 327 328 |
# File 'lib/ppr/ppr_core.rb', line 321 def apply(i_number) # Expand the macro, its result is the name of the file to load. name = super(i_number) # print "Loading file: #{name}\n" # Load and preprocess the file. # return File.read(name) return loadm(name) end |