Class: YapShellAddonTabCompletion::CustomCompletion
- Inherits:
-
Object
- Object
- YapShellAddonTabCompletion::CustomCompletion
- Defined in:
- lib/yap-shell-addon-tab-completion/custom_completion.rb
Constant Summary collapse
- PRIORITY =
2
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
-
#priority ⇒ Object
readonly
Returns the value of attribute priority.
Instance Method Summary collapse
- #completions_for(word, line) ⇒ Object
-
#initialize(world:, name: nil, pattern: nil, priority: PRIORITY, &blk) ⇒ CustomCompletion
constructor
A new instance of CustomCompletion.
- #new(world:) ⇒ Object
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
#name ⇒ Object (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 |
#pattern ⇒ Object (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 |
#priority ⇒ Object (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 |