Class: Grid::FakeStdin

Inherits:
Object
  • Object
show all
Defined in:
lib/grid/fake_stdin.rb

Instance Method Summary collapse

Instance Method Details

#listen(address, &block) ⇒ Object



3
4
5
# File 'lib/grid/fake_stdin.rb', line 3

def listen(address, &block)
  @block = block
end

#send(name, params) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/grid/fake_stdin.rb', line 7

def send(name, params)
  command = Command.new(
    name, params
  )
  
  @block.call(command)
end