Class: PureData::PdObject

Inherits:
Object
  • Object
show all
Defined in:
lib/puredata/pdobject/pdobject.rb

Direct Known Subclasses

Dac, Osc, Receive

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pd, canvas, pdobjid, name, *args) ⇒ PdObject

Returns a new instance of PdObject.



22
23
24
25
26
27
28
# File 'lib/puredata/pdobject/pdobject.rb', line 22

def initialize(pd, canvas, pdobjid, name, *args)
  @pd = pd
  @canvas = canvas
  @pdobjid = pdobjid
  @name = name
  @args = args
end

Instance Attribute Details

#canvasObject (readonly)

Returns the value of attribute canvas.



29
30
31
# File 'lib/puredata/pdobject/pdobject.rb', line 29

def canvas
  @canvas
end

#nameObject (readonly)

Returns the value of attribute name.



29
30
31
# File 'lib/puredata/pdobject/pdobject.rb', line 29

def name
  @name
end

#pdobjidObject (readonly)

Returns the value of attribute pdobjid.



29
30
31
# File 'lib/puredata/pdobject/pdobject.rb', line 29

def pdobjid
  @pdobjid
end

Instance Method Details

#<<(other) ⇒ Object



47
48
49
# File 'lib/puredata/pdobject/pdobject.rb', line 47

def <<(other)
  self.inlet << other
end

#>>(other) ⇒ Object



51
52
53
# File 'lib/puredata/pdobject/pdobject.rb', line 51

def >>(other)
  self.outlet >> other
end

#inlet(idx = 0) ⇒ Object



31
32
33
# File 'lib/puredata/pdobject/pdobject.rb', line 31

def inlet(idx=0)
  Inlet.new(self, idx)
end

#inlet_pairObject



35
36
37
# File 'lib/puredata/pdobject/pdobject.rb', line 35

def inlet_pair
  [self, 0]
end

#outlet(idx = 0) ⇒ Object



39
40
41
# File 'lib/puredata/pdobject/pdobject.rb', line 39

def outlet(idx=0)
  Outlet.new(self, idx)
end

#outlet_pairObject



43
44
45
# File 'lib/puredata/pdobject/pdobject.rb', line 43

def outlet_pair
  [self, 0]
end