Class: Supple::ModelClient

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model) ⇒ ModelClient

Returns a new instance of ModelClient.



38
39
40
# File 'lib/supple/model.rb', line 38

def initialize(model)
  @model = model
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



35
36
37
# File 'lib/supple/model.rb', line 35

def model
  @model
end

Instance Method Details

#deleteObject



46
47
48
# File 'lib/supple/model.rb', line 46

def delete
  run(:delete)
end

#indexObject



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

def index
  run(:index, body: as_indexed_json)
end