Class: Rspec::Bash::CallLogManager

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/bash/command/call_log_manager.rb

Instance Method Summary collapse

Constructor Details

#initializeCallLogManager

Returns a new instance of CallLogManager.



4
5
6
# File 'lib/rspec/bash/command/call_log_manager.rb', line 4

def initialize
  @call_logs = Hash.new { |hash, key| hash[key] = CallLog.new }
end

Instance Method Details

#add_log(command, stdin, arguments) ⇒ Object



8
9
10
11
# File 'lib/rspec/bash/command/call_log_manager.rb', line 8

def add_log(command, stdin, arguments)
  @call_logs[command]
    .add_log(stdin, arguments)
end

#call_count(command, arguments) ⇒ Object



18
19
20
21
# File 'lib/rspec/bash/command/call_log_manager.rb', line 18

def call_count(command, arguments)
  @call_logs[command]
    .call_count(arguments)
end

#call_log(command) ⇒ Object



33
34
35
# File 'lib/rspec/bash/command/call_log_manager.rb', line 33

def call_log(command)
  @call_logs[command]
end

#called_with_args?(command, arguments) ⇒ Boolean

Returns:

  • (Boolean)


23
24
25
26
# File 'lib/rspec/bash/command/call_log_manager.rb', line 23

def called_with_args?(command, arguments)
  @call_logs[command]
    .called_with_args?(arguments)
end

#called_with_no_args?(command) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
31
# File 'lib/rspec/bash/command/call_log_manager.rb', line 28

def called_with_no_args?(command)
  @call_logs[command]
    .called_with_no_args?
end

#stdin_for_args(command, arguments) ⇒ Object



13
14
15
16
# File 'lib/rspec/bash/command/call_log_manager.rb', line 13

def stdin_for_args(command, arguments)
  @call_logs[command]
    .stdin_for_args(arguments)
end