Sha256: c08118fad75fc9dd33b83c3b1d0640898c0c226b2c8566cfbf618e8c567879b3

Contents?: true

Size: 537 Bytes

Versions: 39

Compression:

Stored size: 537 Bytes

Contents

class SlackSmartBot

  def get_rules_imported
    if File.exist?("#{config.path}/rules/rules_imported.rb")
      if !defined?(@datetime_rules_imported) or @datetime_rules_imported != File.mtime("#{config.path}/rules/rules_imported.rb")        
        @datetime_rules_imported = File.mtime("#{config.path}/rules/rules_imported.rb")
        file_conf = IO.readlines("#{config.path}/rules/rules_imported.rb").join
        unless file_conf.to_s() == ""
          @rules_imported = eval(file_conf)
        end
      end
    end
  end
  
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
slack-smart-bot-1.14.2 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.14.1 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.14.0 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.13.2 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.13.1 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.13.0 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.9 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.8 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.7 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.6 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.5 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.4 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.3 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.2 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.1 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.12.0 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.11.0 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.10.0 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.9.2 lib/slack/smart-bot/utils/get_rules_imported.rb
slack-smart-bot-1.9.1 lib/slack/smart-bot/utils/get_rules_imported.rb