Class: Chromable::Settings

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

Overview

Chromable settings class to hide them from Rails models.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document:, metadata: nil, embedder: nil, collection_name: nil, keep_document: true) ⇒ Settings

Returns a new instance of Settings.



19
20
21
22
23
24
25
# File 'lib/chromable.rb', line 19

def initialize(document:, metadata: nil, embedder: nil, collection_name: nil, keep_document: true)
  @collection_name = collection_name
  @document = document
  @metadata = 
  @embedder = embedder
  @keep_document = keep_document
end

Instance Attribute Details

#collection_nameObject

rubocop:disable Lint/DuplicateMethods



27
28
29
# File 'lib/chromable.rb', line 27

def collection_name
  @collection_name
end

#documentObject

Returns the value of attribute document.



17
18
19
# File 'lib/chromable.rb', line 17

def document
  @document
end

#embedderObject

Returns the value of attribute embedder.



17
18
19
# File 'lib/chromable.rb', line 17

def embedder
  @embedder
end

#keep_documentObject

Returns the value of attribute keep_document.



17
18
19
# File 'lib/chromable.rb', line 17

def keep_document
  @keep_document
end

#metadataObject

Returns the value of attribute metadata.



17
18
19
# File 'lib/chromable.rb', line 17

def 
  @metadata
end