Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
RubyMineIDE中包的ruby方法的下拉列表?_Ruby_Autocomplete_Rubymine - Fatal编程技术网

RubyMineIDE中包的ruby方法的下拉列表?

RubyMineIDE中包的ruby方法的下拉列表?,ruby,autocomplete,rubymine,Ruby,Autocomplete,Rubymine,通常,IDE中的下拉列表是在导入包并键入其名称后按tab键显示的,但不是RubyMine。我开了Vim仿真。我打开了交互式RubyShellirb,但无法为包的方法实现自动完成 RubyMine中的自动完成功能是如何工作的,以及如何列出OAuth等包的方法? RubyMine自动补全功能主要通过填写项目中使用的名称和关键字来实现。有关如何实现的详细信息,请参阅。还有一个问题可能会提供一些关于RubyMine如何完成的清晰信息 至于在包中列出可用方法的问题(实际上是在任何对象中)。可以使用方法.m

通常,IDE中的下拉列表是在导入包并键入其名称后按tab键显示的,但不是RubyMine。我开了Vim仿真。我打开了交互式RubyShell
irb
,但无法为包的方法实现自动完成

RubyMine中的自动完成功能是如何工作的,以及如何列出OAuth等包的方法?


RubyMine自动补全功能主要通过填写项目中使用的名称和关键字来实现。有关如何实现的详细信息,请参阅。还有一个问题可能会提供一些关于RubyMine如何完成的清晰信息

至于在包中列出可用方法的问题(实际上是在任何对象中)。可以使用方法
.methods
获取对象响应的方法数组由于ruby的动态特性和可能的实现
方法\u缺失
,列表可能不包含所有可能的方法

这里有一个例子

"string".methods
#=> [:include?, :%, :*, :+, :to_c, :count, :unicode_normalize, :unicode_normalize!, :unicode_normalized?, :partition, :unpack, :unpack1, :sum, :next, :casecmp, :casecmp?, :insert, :bytesize, :match, :match?, :succ!, :+@, :-@, :index, :rindex, :<=>, :replace, :clear, :upto, :getbyte, :==, :===, :setbyte, :=~, :scrub, :[], :[]=, :chr, :scrub!, :dump, :byteslice, :upcase, :next!, :empty?, :eql?, :downcase, :capitalize, :swapcase, :upcase!, :downcase!, :capitalize!, :swapcase!, :hex, :oct, :split, :lines, :reverse, :chars, :codepoints, :prepend, :bytes, :concat, :<<, :freeze, :inspect, :intern, :end_with?, :crypt, :ljust, :reverse!, :chop, :scan, :gsub, :ord, :start_with?, :length, :size, :rstrip, :succ, :center, :sub, :chomp!, :sub!, :chomp, :rjust, :lstrip!, :gsub!, :chop!, :strip, :to_str, :to_sym, :rstrip!, :tr, :tr_s, :delete, :to_s, :to_i, :tr_s!, :delete!, :squeeze!, :each_line, :squeeze, :strip!, :each_codepoint, :lstrip, :slice!, :rpartition, :each_byte, :each_char, :to_f, :slice, :ascii_only?, :encoding, :force_encoding, :b, :valid_encoding?, :tr!, :encode, :encode!, :hash, :to_r, :<, :>, :<=, :>=, :between?, :clamp, :instance_of?, :kind_of?, :is_a?, :tap, :public_send, :remove_instance_variable, :singleton_method, :instance_variable_set, :define_singleton_method, :method, :public_method, :extend, :to_enum, :enum_for, :!~, :respond_to?, :object_id, :send, :display, :nil?, :class, :singleton_class, :clone, :dup, :itself, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :frozen?, :methods, :singleton_methods, :protected_methods, :private_methods, :public_methods, :instance_variable_get, :instance_variables, :instance_variable_defined?, :!, :!=, :__send__, :equal?, :instance_eval, :instance_exec, :__id__]
“string”。方法

#=>[:include?,:%,:*,:+,:to_c,:count,:unicode_normalize,:unicode_normalize!,:unicode_normalize?,:partition,:unpack,:unpack1,:sum,:next,:casecmp,:casecmp,:casecmp?,:match?,:succ!,:+,:-,:index,:rindex,:,:,:replace,:clear,:upto,:getbyte,:=,:setbyte,:=,:setbyte,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,,,,:=,:chr,:scrub!,:dump,:byteslice,:upcase,:next!,:empty?,:eql?,:downcase,:capitalize,:swapcase!,:capitalize!,:swapcase!,:hex,:oct,:split,:line,:reverse,:chars,:codepoints,:prepend,:bytes,:concat,:最好留下一个向下投票的理由。
"string".methods - Object.methods
#=>  [:%, :*, :+, :to_c, :count, :unicode_normalize, :unicode_normalize!, :unicode_normalized?, :partition, :unpack, :unpack1, :sum, :next, :casecmp, :casecmp?, :insert, :bytesize, :match, :match?, :succ!, :+@, :-@, :index, :rindex, :replace, :clear, :upto, :getbyte, :setbyte, :scrub, :[], :[]=, :chr, :scrub!, :dump, :byteslice, :upcase, :next!, :empty?, :downcase, :capitalize, :swapcase, :upcase!, :downcase!, :capitalize!, :swapcase!, :hex, :oct, :split, :lines, :reverse, :chars, :codepoints, :bytes, :concat, :<<, :intern, :end_with?, :crypt, :ljust, :reverse!, :chop, :scan, :gsub, :ord, :start_with?, :length, :size, :rstrip, :succ, :center, :sub, :chomp!, :sub!, :chomp, :rjust, :lstrip!, :gsub!, :chop!, :strip, :to_str, :to_sym, :rstrip!, :tr, :tr_s, :delete, :to_i, :tr_s!, :delete!, :squeeze!, :each_line, :squeeze, :strip!, :each_codepoint, :lstrip, :slice!, :rpartition, :each_byte, :each_char, :to_f, :slice, :ascii_only?, :encoding, :force_encoding, :b, :valid_encoding?, :tr!, :encode, :encode!, :to_r, :between?, :clamp]