Class: Watchdocs::Rails::Recordings::Recorder

Inherits:
Object
  • Object
show all
Defined in:
lib/watchdocs/rails/recordings/recorder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_specs: true) ⇒ Recorder

Returns a new instance of Recorder.


7
8
9
10
# File 'lib/watchdocs/rails/recordings/recorder.rb', line 7

def initialize(from_specs: true)
  @from_specs = from_specs
  set_store
end

Instance Attribute Details

#from_specsObject (readonly)

Returns the value of attribute from_specs.


5
6
7
# File 'lib/watchdocs/rails/recordings/recorder.rb', line 5

def from_specs
  @from_specs
end

#outputObject (readonly)

Returns the value of attribute output.


5
6
7
# File 'lib/watchdocs/rails/recordings/recorder.rb', line 5

def output
  @output
end

#storeObject (readonly)

Returns the value of attribute store.


5
6
7
# File 'lib/watchdocs/rails/recordings/recorder.rb', line 5

def store
  @store
end

Instance Method Details

#call(new_call) ⇒ Object


12
13
14
15
16
# File 'lib/watchdocs/rails/recordings/recorder.rb', line 12

def call(new_call)
  record_new(new_call)
  save_recordings
  send_recordings if buffer_full?
end