Sha256: 736aa34f3b116480dce28cc3a9c9d2888ed7d1caa3c24135f896660d82e7fe32

Contents?: true

Size: 470 Bytes

Versions: 8

Compression:

Stored size: 470 Bytes

Contents

require_relative 'json_base'
require 'uri'

module CorePro
  module Models
    class ModelBase < JsonBase
      attr_accessor :requestId

      def self.escape(val)
        if val.to_s.empty?
          ''
        else
          URI::escape(val)
        end
      end

      def to_s
        vars = self.instance_variables.map{|v|
            "#{v}=#{instance_variable_get(v).inspect}"
        }.join(", ")
        "<#{self.class}: #{vars}>"
      end

    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
corepro_fvr-1.0.9 lib/corepro/models/model_base.rb
corepro_eg-1.0.8 lib/corepro/models/model_base.rb
corepro_eg-1.0.7 lib/corepro/models/model_base.rb
corepro_eg-1.0.6 lib/corepro/models/model_base.rb
corepro_eg-1.0.5 lib/corepro/models/model_base.rb
corepro_eg-1.0.4 lib/corepro/models/model_base.rb
corepro_eg-1.0.3 lib/corepro/models/model_base.rb
corepro_eg-1.0.2 lib/corepro/models/model_base.rb