Module: MrMurano::SyncAllowed

Included in:
Content::Base, Gateway::GweBase, SyncUpDown
Defined in:
lib/MrMurano/SyncAllowed.rb

Instance Method Summary collapse

Instance Method Details

#download_item_allowed(id) ⇒ Object



33
34
35
# File 'lib/MrMurano/SyncAllowed.rb', line 33

def download_item_allowed(id)
  sync_item_allowed('downloading', id)
end

#remove_item_allowed(id) ⇒ Object



25
26
27
# File 'lib/MrMurano/SyncAllowed.rb', line 25

def remove_item_allowed(id)
  sync_item_allowed('removing', id)
end

#removelocal_item_allowed(id) ⇒ Object



37
38
39
# File 'lib/MrMurano/SyncAllowed.rb', line 37

def removelocal_item_allowed(id)
  sync_item_allowed('removing-local', id)
end

#sync_item_allowed(actioning, item_name) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/MrMurano/SyncAllowed.rb', line 14

def sync_item_allowed(actioning, item_name)
  if $cfg['tool.dry']
    MrMurano::Verbose.whirly_interject do
      puts("--dry: Not #{actioning} item: #{fancy_ticks(item_name)}")
    end
    false
  else
    true
  end
end

#upload_item_allowed(id) ⇒ Object



29
30
31
# File 'lib/MrMurano/SyncAllowed.rb', line 29

def upload_item_allowed(id)
  sync_item_allowed('uploading', id)
end