Class: Yoda::Constant::Candidates
- Inherits:
-
Object
- Object
- Yoda::Constant::Candidates
- Defined in:
- lib/yoda/presentation/code_completion/constant.rb
Instance Method Summary collapse
- #complete_item_kind(object) ⇒ Symbol
-
#initialize(constant_candidates:, range:, prefix:) ⇒ Candidates
constructor
A new instance of Candidates.
Constructor Details
#initialize(constant_candidates:, range:, prefix:) ⇒ Candidates
Returns a new instance of Candidates.
4 5 6 7 8 |
# File 'lib/yoda/presentation/code_completion/constant.rb', line 4 def initialize(constant_candidates:, range:, prefix:) @constant_candidates = constant_candidates @range = range @prefix = prefix end |
Instance Method Details
#complete_item_kind(object) ⇒ Symbol
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/yoda/presentation/code_completion/constant.rb', line 12 def complete_item_kind(object) case object.kind when :class :class when :module :module else :constant end end |