Class: Ellipses::Client::Command::Proto

Inherits:
Struct
  • Object
show all
Defined in:
lib/ellipses/client/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argcObject

Returns the value of attribute argc

Returns:

  • (Object)

    the current value of argc



12
13
14
# File 'lib/ellipses/client/command.rb', line 12

def argc
  @argc
end

#klassObject

Returns the value of attribute klass

Returns:

  • (Object)

    the current value of klass



12
13
14
# File 'lib/ellipses/client/command.rb', line 12

def klass
  @klass
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



12
13
14
# File 'lib/ellipses/client/command.rb', line 12

def name
  @name
end

Instance Method Details

#valid?(argv) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/ellipses/client/command.rb', line 13

def valid?(argv)
  argc.nil? || argc.cover?(argv.size)
end