Class: Gluey::Glues::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/gluey/glues/base.rb

Direct Known Subclasses

Sass, Script

Instance Method Summary collapse

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