Class: YapShellAddonTabCompletion::CustomCompletion

Inherits:
Object
  • Object
show all
Defined in:
lib/yap-shell-addon-tab-completion/custom_completion.rb

Constant Summary collapse

PRIORITY =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(world:, name: nil, pattern: nil, priority: PRIORITY, &blk) ⇒ CustomCompletion

Returns a new instance of CustomCompletion.



7
8
9
10
11
12
13
# File 'lib/yap-shell-addon-tab-completion/custom_completion.rb', line 7

def initialize(world:, name:nil, pattern:nil, priority:PRIORITY, &blk)
  @world = world
  @name = name
  @pattern = pattern
  @priority = priority
  @blk = blk
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/yap-shell-addon-tab-completion/custom_completion.rb', line 5

def name
  @name
end

#patternObject (readonly)

Returns the value of attribute pattern.



5
6
7
# File 'lib/yap-shell-addon-tab-completion/custom_completion.rb', line 5

def pattern
  @pattern
end

#priorityObject (readonly)

Returns the value of attribute priority.



5
6
7
# File 'lib/yap-shell-addon-tab-completion/custom_completion.rb', line 5

def priority
  @priority
end

Instance Method Details

#completions_for(word, line) ⇒ Object



20
21
22
23
# File 'lib/yap-shell-addon-tab-completion/custom_completion.rb', line 20

def completions_for(word, line)
  # TODO
  return []
end

#new(world:) ⇒ Object



15
16
17
18
# File 'lib/yap-shell-addon-tab-completion/custom_completion.rb', line 15

def new(world:)
  @world = world
  self
end