Sha256: aef63b4d44cbe704172e60642b529633a70b7612a360d4b15438d6298202a240
Contents?: true
Size: 574 Bytes
Versions: 2
Compression:
Stored size: 574 Bytes
Contents
module Locomotive::Wagon class PushSiteCommand < PushBaseCommand def entities [repositories.site.first] end def decorate(entity) IconSiteDecorator.new(entity) end def persist(decorated_entity) _attributes = decorated_entity.to_hash if !_attributes.empty? && api_client.current_site.get.attributes[:picture_url].nil? api_client.current_site.update(_attributes) else raise SkipPersistingException.new end end def label_for(decorated_entity) decorated_entity.name end end end
Version data entries
2 entries across 2 versions & 1 rubygems