Class: CoreNYM

Inherits:
Object
  • Object
show all
Defined in:
lib/core.rb

Overview

CoreNYM version in .env

Class Method Summary collapse

Class Method Details

.koyomiObject

current date.



6
7
8
9
10
# File 'lib/core.rb', line 6

def self.koyomi
    dt = Time.new.getlocal('+09:00')
    week = %w(      )[dt.wday]
    @himekuri = "#{dt.year}" + "#{dt.month}" + "#{dt.day}" + ' : '.to_s + "#{dt.hour}"+"#{dt.min}"+"#{dt.sec}" + ' : '.to_s + week + "曜日"
end

.pg_versionObject

libgroonga version in pgroonga



13
14
15
16
17
18
19
# File 'lib/core.rb', line 13

def self.pg_version
    sql = "SHOW pgroonga.libgroonga_version;"
    query = ActiveRecord::Base.connection.select_all(sql).to_a
    pg_string = (query).to_s.gsub(/[^A-Za-z]/, ' ').rstrip
    pg_number = (query).to_s.gsub(/[^.0-9A-Za-z]/, '').rstrip.delete("A-Za-z").delete_prefix(".").delete_suffix(".")
    @pg_version = pg_string + " " + pg_number
end

.versionObject

version number x.x



22
23
24
# File 'lib/core.rb', line 22

def self.version
    @version = ENV['NYASOCOMSUN_VERSION']
end