Class: ProcessSip::Subcommand
- Inherits:
-
Object
- Object
- ProcessSip::Subcommand
show all
- Includes:
- Enumerable
- Defined in:
- lib/process_sip.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing ⇒ Object
82
|
# File 'lib/process_sip.rb', line 82
def call(...) = adapter.call(name, ...)
|
Instance Method Details
#call ⇒ Object
Also known as:
method_missing, read
81
|
# File 'lib/process_sip.rb', line 81
def call(...) = adapter.call(name, ...)
|
#each ⇒ Object
Also known as:
each_line
67
|
# File 'lib/process_sip.rb', line 67
def each(&) = stream(&)
|
#match? ⇒ Boolean
70
|
# File 'lib/process_sip.rb', line 70
def match?(...) = call.match?(...)
|
#readlines(chomp: true) ⇒ Object
71
|
# File 'lib/process_sip.rb', line 71
def readlines(chomp: true) = call { _1.readlines(chomp:) }
|
#stream ⇒ Object
73
74
75
76
77
78
79
|
# File 'lib/process_sip.rb', line 73
def stream(*, **)
return enum_for(:stream, *, **) unless block_given?
call(*, **) do |io|
while line = io.gets&.chomp; yield line; end
end
end
|