Class: PM::Instrument

Inherits:
Object
  • Object
show all
Defined in:
lib/patchmaster/instrument.rb

Direct Known Subclasses

InputInstrument, OutputInstrument

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(sym, name, port_num, port) ⇒ Instrument

Returns a new instance of Instrument.



10
11
12
13
# File 'lib/patchmaster/instrument.rb', line 10

def initialize(sym, name, port_num, port)
  @sym, @name, @port_num, @port = sym, name, port_num, port
  @name ||= @port.name if @port
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/patchmaster/instrument.rb', line 8

def name
  @name
end

#portObject (readonly)

Returns the value of attribute port.



8
9
10
# File 'lib/patchmaster/instrument.rb', line 8

def port
  @port
end

#port_numObject (readonly)

Returns the value of attribute port_num.



8
9
10
# File 'lib/patchmaster/instrument.rb', line 8

def port_num
  @port_num
end

#symObject (readonly)

Returns the value of attribute sym.



8
9
10
# File 'lib/patchmaster/instrument.rb', line 8

def sym
  @sym
end