Class: Material::QuickVerbatimResponse

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

Overview

A Container to store results of create_quick_verbatim

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ QuickVerbatimResponse

Returns a new instance of QuickVerbatimResponse



44
45
46
# File 'lib/material.rb', line 44

def initialize(options = {})
  @collection_objects = []
end

Instance Attribute Details

#collection_objectsObject

Returns the value of attribute collection_objects



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

def collection_objects
  @collection_objects
end

#identifierObject

Returns the value of attribute identifier



40
41
42
# File 'lib/material.rb', line 40

def identifier
  @identifier
end

#noteObject

Returns the value of attribute note



42
43
44
# File 'lib/material.rb', line 42

def note
  @note
end

#repositoryObject

Returns the value of attribute repository



41
42
43
# File 'lib/material.rb', line 41

def repository
  @repository
end

Instance Method Details

#saveObject



60
61
62
63
64
# File 'lib/material.rb', line 60

def save
  ActiveRecord::Base.transaction do
    @collection_objects.map(&:save!)
  end
end