Class: TFW::Module

Inherits:
Object
  • Object
show all
Extended by:
Setters
Defined in:
lib/tfw/module.rb

Overview

This is the Module for TFW

Instance Method Summary collapse

Methods included from Setters

make_setter

Constructor Details

#initialize(&block) ⇒ Module

Returns a new instance of Module.



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

def initialize(&block)
  instance_eval(&block) if block_given?

  %i[name source].each do |e|
    raise "#{e} must be specified for module" if instance_variable_get("@#{e}").nil?
  end

  @stack = TFW.get_stack_for_dir @source, @input, TFDSL::Stack.new
end