Class: VHS::CLI::Cassettes
- Inherits:
-
Object
- Object
- VHS::CLI::Cassettes
- Defined in:
- lib/vhs/cli/cassettes.rb
Instance Method Summary collapse
-
#all ⇒ Object
Public: returns an array with all cassettes.
-
#all_str ⇒ Object
Public: returns a string with a list, n separated, of all cassettes.
- #clean ⇒ Object
-
#error ⇒ Object
Public: returns an array with all cassettes with HTTP code not 2xx.
-
#error_str ⇒ Object
Public: returns a string with a list, n separated, of cassettes with HTTP code not 2xx.
-
#regexp(code) ⇒ Object
Public: returns an array of cassettes with code matching the regexp <code>.
-
#regexp_str(code) ⇒ Object
Public: returns a string with a list, n separated, of cassettes with HTTP code matching the regexp <code>.
Instance Method Details
#all ⇒ Object
Public: returns an array with all cassettes
14 15 16 |
# File 'lib/vhs/cli/cassettes.rb', line 14 def all `#{ all_cassettes_cmd } | #{ rm_trailing_chars_cmd }`.split(/\n/) end |
#all_str ⇒ Object
Public: returns a string with a list, n separated, of all cassettes
9 10 11 |
# File 'lib/vhs/cli/cassettes.rb', line 9 def all_str `#{ all_cassettes_cmd }` end |
#clean ⇒ Object
40 41 42 |
# File 'lib/vhs/cli/cassettes.rb', line 40 def clean `#{ rm_cassettes_not_in_git_cmd }` end |
#error ⇒ Object
Public: returns an array with all cassettes with HTTP code not 2xx
25 26 27 |
# File 'lib/vhs/cli/cassettes.rb', line 25 def error `#{ error_cassettes_cmd } | #{ rm_trailing_chars_cmd }`.split(/\n/) end |
#error_str ⇒ Object
Public: returns a string with a list, n separated, of cassettes with HTTP code not 2xx
20 21 22 |
# File 'lib/vhs/cli/cassettes.rb', line 20 def error_str `#{ error_cassettes_cmd }` end |
#regexp(code) ⇒ Object
Public: returns an array of cassettes with code matching the regexp <code>
36 37 38 |
# File 'lib/vhs/cli/cassettes.rb', line 36 def regexp(code) `#{ all_cassettes_cmd(code) } | #{ rm_trailing_chars_cmd }`.split(/\n/) end |
#regexp_str(code) ⇒ Object
Public: returns a string with a list, n separated, of cassettes with HTTP code matching the regexp <code>
31 32 33 |
# File 'lib/vhs/cli/cassettes.rb', line 31 def regexp_str(code) `#{ all_cassettes_cmd(code) }` end |