Sha256: 0904fa6caaa708bfaa679f7e0f8afdb24f55480bdd5e05c17f04b7d636c26be0

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

module Ykutils

  class RetCode
    attr_reader :val , :mes, :ret , :bool

    def initialize(obj)
      @val = obj
      @mes = obj["mes"]
      @ret = obj["ret"]
      @bool = obj["bool"]
    end

    def [](key)
      @val[key]
    end

    def to_s
      @bool
    end

    def set_bool( val )
      @bool = val
    end

    def get_bool
      @bool
    end

    def set_mes( val )
      @mes = val
    end

    def set_ret( val )
      @ret = val
    end
  end

  class RetCode2 < RetCode
    attr_reader :val 
    attr_accessor  :mes, :ret , :bool
    
    def initialize( ret , bool, mes )
      @val = { "ret" => ret , "bool" => bool, "mes" => mes }
      @ret = ret
      @bool = bool
      @mes = mes
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ykutils-0.1.0 lib/ykutils/retcodex.rb