Class: PM::Instrument
- Inherits:
-
Object
- Object
- PM::Instrument
- Defined in:
- lib/patchmaster/instrument.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#port_num ⇒ Object
readonly
Returns the value of attribute port_num.
-
#sym ⇒ Object
readonly
Returns the value of attribute sym.
Instance Method Summary collapse
-
#initialize(sym, name, port_num, port) ⇒ Instrument
constructor
A new instance of Instrument.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/patchmaster/instrument.rb', line 8 def name @name end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
8 9 10 |
# File 'lib/patchmaster/instrument.rb', line 8 def port @port end |
#port_num ⇒ Object (readonly)
Returns the value of attribute port_num.
8 9 10 |
# File 'lib/patchmaster/instrument.rb', line 8 def port_num @port_num end |
#sym ⇒ Object (readonly)
Returns the value of attribute sym.
8 9 10 |
# File 'lib/patchmaster/instrument.rb', line 8 def sym @sym end |