Module: Ytrbium

Defined in:
lib/ytrbium.rb,
lib/ytrbium/dsl.rb,
lib/ytrbium/version.rb

Defined Under Namespace

Modules: DSL Classes: Engine, FileResolver, String

Constant Summary collapse

VERSION =
"1.0.2"

Class Method Summary collapse

Class Method Details

.dslObject



10
11
12
13
14
15
16
17
# File 'lib/ytrbium.rb', line 10

def self.dsl
  resolver = file_resolver
  Module.new do
    @file_resolver = resolver
    include Ytrbium::DSL
    extend self
  end
end

.expand(template, binding: nil) ⇒ Object



6
7
8
# File 'lib/ytrbium.rb', line 6

def self.expand(template, binding: nil)
  dsl.engine(template).expand(binding)
end

.file_resolverObject



27
28
29
# File 'lib/ytrbium.rb', line 27

def self.file_resolver
  @file_resolver ||= FileResolver.new
end

.pathsObject



19
20
21
# File 'lib/ytrbium.rb', line 19

def self.paths
  file_resolver.paths
end

.paths=(paths) ⇒ Object



23
24
25
# File 'lib/ytrbium.rb', line 23

def self.paths=(paths)
  file_resolver.paths = paths
end