Method: Consular::DSL#initialize
- Defined in:
- lib/consular/dsl.rb
#initialize(path) ⇒ DSL
Initializes the DSL library and stores the commands.
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/consular/dsl.rb', line 29 def initialize(path) @_setup = [] @_windows = ActiveSupport::OrderedHash.new @_windows['default'] = window_hash @_context = @_windows['default'] file = File.read(File.(path)) if path =~ /\.yml$/ @_file = YAML.load file extend Yaml else instance_eval file, __FILE__, __LINE__ end end |