Sha256: 573ab68e7fefbad49514671fa13d8de278fda05270103d078616eb836d54aaf2

Contents?: true

Size: 494 Bytes

Versions: 20

Compression:

Stored size: 494 Bytes

Contents

class SlackSmartBot

  def update_routines(channel = @channel_id)

    require 'yaml'
    routines_file = "#{config.path}/routines/routines_#{channel}.yaml"

    routines = {}
    @routines.each do |k,v|
      routines[k]={}
      v.each do |kk,vv|
        routines[k][kk] = vv.dup
        routines[k][kk][:thread]=""
      end
    end
    File.open(routines_file, 'w') {|file|
      file.flock(File::LOCK_EX)
      file.write(routines.to_yaml) 
      file.flock(File::LOCK_UN)
    }
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
slack-smart-bot-1.15.25 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.15.1 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.15.0 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.14.2 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.14.1 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.14.0 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.13.2 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.13.1 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.13.0 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.9 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.8 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.7 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.6 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.5 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.4 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.3 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.2 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.1 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.12.0 lib/slack/smart-bot/utils/update_routines.rb
slack-smart-bot-1.11.0 lib/slack/smart-bot/utils/update_routines.rb