class Bond::Input
A string representing the last word the user has typed. This string is passed to a mission action to generate possible completions. This string contains a number of attributes from the matching mission, useful in generating completions.
Attributes
argument[RW]
Current argument number and array of argument strings. Used by MethodMission.
arguments[RW]
Current argument number and array of argument strings. Used by MethodMission.
line[R]
The full line the user has typed.
matched[R]
MatchData object from the matching mission (Mission#matched).
object[RW]
Actual object a user has just typed. Used by MethodMission and ObjectMission.
Public Class Methods
new(str, options={})
click to toggle source
Calls superclass method
# File lib/bond/input.rb, line 14 def initialize(str, options={}) #@private super(str || '') @matched = options[:matched] @line = options[:line] @object = options[:object] if options[:object] @argument = options[:argument] if options[:argument] @arguments = options[:arguments] if options[:arguments] end
Public Instance Methods
inspect()
click to toggle source
# File lib/bond/input.rb, line 23 def inspect #@private "#<Bond::Input #{self.to_s.inspect} @matched=#{@matched.to_a.inspect} @line=#{@line.inspect} "+ "@argument=#{@argument.inspect} @arguments=#{@arguments.inspect} @object=#{@object.inspect}>" end