class ALSA::Aconnect::Client
Constants
- DIRECTIONS
Attributes
card[R]
direction[R]
id[R]
name[R]
pid[R]
ports[R]
type[R]
Public Class Methods
new(text, direction)
click to toggle source
# File lib/alsa/aconnect/client.rb, line 10 def initialize(text, direction) raise ArgumentError, "invalid direction #{direction.inspect}" unless DIRECTIONS.include?(direction) @direction = direction data = Parser.parse_client(text) @id = data[:id] @name = data[:name] @type = data[:type] @card = data[:card] @pid = data[:pid] @ports = data[:ports].map do |port_text| Port.new(port_text, self) end end