Class: RhetButler::Stasis::ValiseWriter

Inherits:
Writer
  • Object
show all
Defined in:
lib/rhet-butler/stasis/writer.rb

Instance Attribute Summary collapse

Attributes inherited from Writer

#store_log

Instance Method Summary collapse

Methods inherited from Writer

#write

Constructor Details

#initialize(valise) ⇒ ValiseWriter

Returns a new instance of ValiseWriter.



23
24
25
# File 'lib/rhet-butler/stasis/writer.rb', line 23

def initialize(valise)
  @target_valise = valise
end

Instance Attribute Details

#target_valiseObject (readonly)

Returns the value of attribute target_valise.



27
28
29
# File 'lib/rhet-butler/stasis/writer.rb', line 27

def target_valise
  @target_valise
end

Instance Method Details

#store(path, content) ⇒ Object



29
30
31
32
# File 'lib/rhet-butler/stasis/writer.rb', line 29

def store(path, content)
  target = target_valise.get(path).writable.first
  target.contents = content
end