Class: Gluey::Glues::Base
- Inherits:
-
Object
- Object
- Gluey::Glues::Base
- Defined in:
- lib/gluey/glues/base.rb
Instance Method Summary collapse
-
#initialize(context, material) ⇒ Base
constructor
A new instance of Base.
- #process(base_file, dependecies) ⇒ Object
- #read_base_file(file) ⇒ Object
Constructor Details
#initialize(context, material) ⇒ Base
Returns a new instance of Base.
4 5 6 7 |
# File 'lib/gluey/glues/base.rb', line 4 def initialize(context, material) @context = context @material = material end |
Instance Method Details
#process(base_file, dependecies) ⇒ Object
9 10 11 |
# File 'lib/gluey/glues/base.rb', line 9 def process(base_file, dependecies) read_base_file base_file end |
#read_base_file(file) ⇒ Object
13 14 15 16 |
# File 'lib/gluey/glues/base.rb', line 13 def read_base_file(file) raw_content = File.read(file) file[-4..-1]=='.erb' ? ERB.new(raw_content).result : raw_content end |