lib/zold/score.rb
# Default strength for the entire system, in production mode.
Default strength for the entire system, in production mode.
Default strength for the entire system in production mode .
def next
      raise 'This score is not valid' unless valid?
      idx = 0
      loop do
        suffix = idx.to_s(16)
        score = Score.new(
          time: time, host: host, port: port, invoice: invoice, suffixes: suffixes + [suffix],
          strength: strength
        )
        return score if score.valid?
        if score.expired?
          return Score.new(
            time: Time.now, host: host, port: port, invoice: invoice,
            suffixes: [], strength: strength
          )
        end
        idx += 1
      end
    end
def next raise 'This score is not valid' unless valid? idx = 0 loop do suffix = idx . to_s ( 16 ) score = Score . new ( time : time , host : host , port : port , invoice : invoice , suffixes : suffixes + [ suffix ] , strength : strength ) return score if score . valid? if score . expired? return Score . new ( time : Time . now , host : host , port : port , invoice : invoice , suffixes : [ ] , strength : strength ) end idx += 1 end end
Default strength for the entire system, in production mode.
Default strength for the entire system in production mode .