Class: Wave::Wavelet

Inherits:
Object
  • Object
show all
Defined in:
lib/wave/wavelet.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Wavelet

Returns a new instance of Wavelet.

Raises:



18
19
20
21
22
23
24
25
26
27
# File 'lib/wave/wavelet.rb', line 18

def initialize(options = {})
  raise Wave::WaveError,
        "Wavelets must be instantiated with a wave option" unless
            options[:wave] && options[:wave].is_a?(Wave)
  
  @wave         = options.delete(:wave)
  @participants = options.delete(:participants) || []
  @blips        = options.delete(:blips) || []
  @wave.wavelets << self
end

Instance Attribute Details

#blipsObject (readonly)

Returns the value of attribute blips.



16
17
18
# File 'lib/wave/wavelet.rb', line 16

def blips
  @blips
end

#optionsObject (readonly)

Returns the value of attribute options.



16
17
18
# File 'lib/wave/wavelet.rb', line 16

def options
  @options
end

#participantsObject (readonly)

Returns the value of attribute participants.



16
17
18
# File 'lib/wave/wavelet.rb', line 16

def participants
  @participants
end

#waveObject (readonly)

Returns the value of attribute wave.



16
17
18
# File 'lib/wave/wavelet.rb', line 16

def wave
  @wave
end