Class: LSL::DSL::Base

Inherits:
Object show all
Defined in:
lib/lsl/dsl/dsl.rb

Instance Method Summary collapse

Instance Method Details

#mapping(n, &b) ⇒ Object



15
16
17
18
19
# File 'lib/lsl/dsl/dsl.rb', line 15

def mapping(n,&b)
  LSL::ShellLike.send(:define_method,n) do |*args|
    b.call
  end
end

#run!Object



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

def run!
  completion.each do |c|
    LSL::Completion::Base.instance.mappings.add(c)
  end
end