Class: Gutentag::Persistence

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/gutentag/persistence.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(change_state) ⇒ Persistence

Returns a new instance of Persistence.



10
11
12
# File 'lib/gutentag/persistence.rb', line 10

def initialize(change_state)
  @change_state = change_state
end

Instance Attribute Details

#tagger=(value) ⇒ Object

Sets the attribute tagger

Parameters:

  • value

    the value to set the attribute tagger to.



8
9
10
# File 'lib/gutentag/persistence.rb', line 8

def tagger=(value)
  @tagger = value
end

Instance Method Details

#persistObject



14
15
16
17
# File 'lib/gutentag/persistence.rb', line 14

def persist
  remove_old
  add_new
end