class RHC::AutoComplete

Attributes

runner[R]

Public Class Methods

new(runner=::Commander::Runner.instance, shell='bash') click to toggle source
# File lib/rhc/autocomplete.rb, line 5
def initialize(runner=::Commander::Runner.instance, shell='bash')
  @runner, @shell = runner, shell
end

Public Instance Methods

to_s() click to toggle source
# File lib/rhc/autocomplete.rb, line 9
def to_s
  @s ||= template.result AutoCompleteBindings.new(self).get_binding
end

Private Instance Methods

template() click to toggle source
# File lib/rhc/autocomplete.rb, line 15
def template
  @template ||= ERB.new(File.read(File.join(File.dirname(__FILE__), 'autocomplete_templates', "#{@shell}.erb")), nil, '-')
end