class Yoda::Commands::Complete
Attributes
filename_with_position[R]
Public Class Methods
new(filename_with_position)
click to toggle source
@param filename_with_position
[String] position representation with the format `path/to/file:line_num:character_num`
# File lib/yoda/commands/complete.rb, line 9 def initialize(filename_with_position) @filename_with_position = filename_with_position end
Public Instance Methods
run()
click to toggle source
# File lib/yoda/commands/complete.rb, line 13 def run project.build_cache puts create_signature_help(worker.current_node_signature) end
Private Instance Methods
create_signature_help(signature)
click to toggle source
@param signature [Model::NodeSignature, nil] @return [String, nil]
# File lib/yoda/commands/complete.rb, line 22 def create_signature_help(signature) return nil unless signature signature.descriptions.map(&:title).join("\n") end
project()
click to toggle source
# File lib/yoda/commands/complete.rb, line 31 def project @project ||= Store::Project.new(Dir.pwd) end
worker()
click to toggle source
# File lib/yoda/commands/complete.rb, line 27 def worker @worker ||= Evaluation::CurrentNodeExplain.new(project.registry, File.read(filename), position) end