Sha256: acaf11b6b5bf43eec60c7d052eb4ccb70fa4a337ccfd16f58dcae64811b88994

Contents?: true

Size: 894 Bytes

Versions: 2

Compression:

Stored size: 894 Bytes

Contents

require 'date'

class InternalFunc

  def datetimenow()
    d_curr = DateTime.now
    time_zone = 'Europe/Minsk'
    #   DateTime.new
    #       .in_time_zone(time_zone)
    #       .change(year: d_curr.year, month: d_curr.month, day: d_curr.day, hour: d_curr.hour, min: d_curr.min, sec: d_curr.sec)
    d_curr.to_s
  end

  def printer_texter_wifi(text, log_level)
    begin
      mess = {:datetime => datetimenow, :sdk => "freewifi", :sdk_version => Freewifi::VERSION, :message => text}
      p mess
    rescue
      p "Failed print message"
    end
  end

  def hub_tunnelname_generator(tunnel_id, company_name)
    comp_name = company_name
    "#{tunnel_id.to_s}_eoip_hub_auto_#{comp_name}"
  end

  def company_check_wifi(compname)
    compname2=""
    if compname.include?(" ")
      compname2 = compname.gsub(" ","")
    else
      compname2 = compname
    end
    compname2
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
freewifi-0.1.4 lib/freewifi/additional/additional_functions.rb
freewifi-0.1.3 lib/freewifi/additional/additional_functions.rb