Module: Locomotive::Wagon::BaseConcern

Extended by:
ActiveSupport::Concern
Included in:
SyncContentEntriesCommand, SyncPagesCommand, SyncSiteCommand, SyncTranslationsCommand
Defined in:
lib/locomotive/wagon/commands/sync_sub_commands/concerns/base_concern.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#instrument_base_nameObject



31
32
33
# File 'lib/locomotive/wagon/commands/sync_sub_commands/concerns/base_concern.rb', line 31

def instrument_base_name
  'wagon.sync'
end

#resource_nameObject



35
36
37
# File 'lib/locomotive/wagon/commands/sync_sub_commands/concerns/base_concern.rb', line 35

def resource_name
  self.class.name[/::Sync(\w+)Command$/, 1].underscore
end

#syncObject



23
24
25
26
27
28
29
# File 'lib/locomotive/wagon/commands/sync_sub_commands/concerns/base_concern.rb', line 23

def sync
  instrument do
    instrument :start
    self._sync
    instrument :done
  end
end