Class: CorePro::Models::ModelBase

Inherits:
JsonBase
  • Object
show all
Defined in:
lib/corepro/models/model_base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from JsonBase

#from_json!, #is_hash?, #to_hash, #to_json

Instance Attribute Details

#requestIdObject

Returns the value of attribute requestId.



7
8
9
# File 'lib/corepro/models/model_base.rb', line 7

def requestId
  @requestId
end

Class Method Details

.escape(val) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/corepro/models/model_base.rb', line 9

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

Instance Method Details

#to_sObject



17
18
19
20
21
22
# File 'lib/corepro/models/model_base.rb', line 17

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