Class: Heirloom::Updater
- Inherits:
-
Object
- Object
- Heirloom::Updater
- Defined in:
- lib/heirloom/archive/updater.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Updater
constructor
A new instance of Updater.
- #update(args) ⇒ Object
Constructor Details
#initialize(args) ⇒ Updater
Returns a new instance of Updater.
5 6 7 8 9 10 11 12 |
# File 'lib/heirloom/archive/updater.rb', line 5 def initialize(args) @config = args[:config] @name = args[:name] @id = args[:id] @domain = "heirloom_#{@name}" @logger = @config.logger end |
Instance Method Details
#update(args) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/heirloom/archive/updater.rb', line 14 def update(args) attribute = args[:attribute] value = args[:value] sdb.put_attributes @domain, @id, { attribute => value }, { :replace => attribute } @logger.info "Tagged #{@name} (#{@id}): #{attribute} = #{value}." end |