Class: CharlieTest

Inherits:
Object
  • Object
show all
Defined in:
lib/registry/charlie_test.rb

Class Method Summary collapse

Class Method Details

.availableObject



7
8
9
# File 'lib/registry/charlie_test.rb', line 7

def self.available
  { "charlie-test" => [] }
end

.handle(app, cmd, display_messages) ⇒ Object



11
12
13
14
15
16
# File 'lib/registry/charlie_test.rb', line 11

def self.handle(app,cmd,display_messages)
  result = app.default_result
  result[:data] = cmd["charlie-test".size..-1].strip
  app.console.print("CHARLIE: #{result[:data]}\n") if display_messages
  result
end

.handle?(cmd) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/registry/charlie_test.rb', line 3

def self.handle?(cmd)
  cmd.start_with?("charlie-test")
end