Module: Feather

Defined in:
lib/feather.rb

Defined Under Namespace

Modules: Support Classes: Template

Class Method Summary collapse

Class Method Details

.new(*args) {|template| ... } ⇒ Object

Create a new template with a supplied template body and optional options.

Yields:

  • (template)


17
18
19
20
21
22
23
# File 'lib/feather.rb', line 17

def self.new(*args)
  template = Feather::Template.new(*args)

  yield(template) if (block_given?)

  template
end

.versionObject

Returns the current library version



10
11
12
13
14
# File 'lib/feather.rb', line 10

def self.version
  @version ||= File.readlines(
    File.expand_path('../VERSION', File.dirname(__FILE__))
).first.chomp
end