Class: ALSA::Aconnect::Port

Inherits:
Object
  • Object
show all
Defined in:
lib/alsa/aconnect/port.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, client) ⇒ Port

Returns a new instance of Port.



13
14
15
16
17
18
19
20
21
22
# File 'lib/alsa/aconnect/port.rb', line 13

def initialize(text, client)
  @client = client

  data = Parser.parse_port(text)
  @id = data[:id]
  @name = data[:name]
  @connected_to_type = data[:connected_to_type]
  @connected_to_client_id = data[:connected_to_client_id]
  @connected_to_port_id = data[:connected_to_port_id]
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/alsa/aconnect/port.rb', line 6

def client
  @client
end

#connected_to_client_idObject (readonly)

Returns the value of attribute connected_to_client_id.



6
7
8
# File 'lib/alsa/aconnect/port.rb', line 6

def connected_to_client_id
  @connected_to_client_id
end

#connected_to_port_idObject (readonly)

Returns the value of attribute connected_to_port_id.



6
7
8
# File 'lib/alsa/aconnect/port.rb', line 6

def connected_to_port_id
  @connected_to_port_id
end

#connected_to_typeObject (readonly)

Returns the value of attribute connected_to_type.



6
7
8
# File 'lib/alsa/aconnect/port.rb', line 6

def connected_to_type
  @connected_to_type
end

#idObject (readonly)

Returns the value of attribute id.



6
7
8
# File 'lib/alsa/aconnect/port.rb', line 6

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/alsa/aconnect/port.rb', line 6

def name
  @name
end