class Object

Public Instance Methods

find4m() click to toggle source
# File gem_build/system_4m5m.rb, line 25
def find4m
    begin
        url = 'http://sf-500.com/api/4m_find.json'            
        http = HTTP.get(url)
        @json = JSON.parse(http.to_s)
        @now_round = @json['now_round'].to_i

        if @now_round == @status2.to_i
            find4mpointera = 0
        else
            quit
        end
    rescue
        puts '4시즌 데이타 다시 확인중...'
        sleep 1
        retry
    end
    @xg_1 = @json['xg_1'].to_i
    @xg_2 = @json['xg_2'].to_i
    @xg_3 = @json['xg_3'].to_i
    @xg_4 = @json['xg_4'].to_i 
    @axg_1 = @json['xg_1'].to_i
    @axg_2 = @json['xg_2'].to_i
    @axg_3 = @json['xg_3'].to_i
    @axg_4 = @json['xg_4'].to_i  
end
find5m() click to toggle source
# File gem_build/system_4m5m.rb, line 52
def find5m
    begin
        url = 'http://sf-500.com/api/5m_find.json'            
        http = HTTP.get(url)
        @json = JSON.parse(http.to_s)
        @now_round = @json['now_round'].to_i

        if @now_round == @status2.to_i
            find5mpointera = 0
        else
            quit
        end
    rescue
        puts '5시즌 데이타 다시 확인중...'
        sleep 1
        retry
    end
    @xg_1 = @json['xg_1'].to_i
    @xg_2 = @json['xg_2'].to_i
    @xg_3 = @json['xg_3'].to_i
    @xg_4 = @json['xg_4'].to_i 
    @axg_1 = @json['xg_1'].to_i
    @axg_2 = @json['xg_2'].to_i
    @axg_3 = @json['xg_3'].to_i
    @axg_4 = @json['xg_4'].to_i   
end
make_cut() click to toggle source
# File gem_build/system_4m5m.rb, line 3
def make_cut()

    @round_last = @status3.to_i-1
    if @round_last == 0
            @round_last = 288
    end

    number4 = 4
    number5 = 5
    @cut_line = 275

    
    cut_off4 = @round_last/number4.to_i
    cut_line4 = cut_off4*number4.to_i 
    @cut4 = @round_last - cut_line4 # 1~0

    cut_off5 = @round_last/number5.to_i
    cut_line5 = cut_off5*number5.to_i 
    @cut5 = @round_last - cut_line5 # 1~0
    sleep 1       
end