class Locomotive::Wagon::PushSectionsCommand

Public Instance Methods

decorate(entity) click to toggle source
# File lib/locomotive/wagon/commands/push_sub_commands/push_sections_command.rb, line 9
def decorate(entity)
  SectionDecorator.new(entity, content_assets_pusher)
end
entities() click to toggle source
# File lib/locomotive/wagon/commands/push_sub_commands/push_sections_command.rb, line 5
def entities
  repositories.section.all
end
label_for(decorated_entity) click to toggle source
# File lib/locomotive/wagon/commands/push_sub_commands/push_sections_command.rb, line 17
def label_for(decorated_entity)
  decorated_entity.name
end
persist(decorated_entity) click to toggle source
# File lib/locomotive/wagon/commands/push_sub_commands/push_sections_command.rb, line 13
def persist(decorated_entity)
  api_client.sections.update(decorated_entity.slug, decorated_entity.to_hash)
end