Sha256: 9a7cc00625c107e79c29ad53e94923385805e339595a54e6ee63976e14f43c7a
Contents?: true
Size: 539 Bytes
Versions: 2
Compression:
Stored size: 539 Bytes
Contents
# ## # Good Result # # Syntax: SknSuccess.call(payload, message=nil, bool_code=true) # class SknSuccess attr_reader :value, :success, :message def self.call(*args) new(*args) end def initialize(*args) val, msg, rc = args @value = val || "Success" @message = msg || '' @success = rc.nil? ? true : rc # puts "#{self.class.name} => val:#{val}, rc:#{rc}, msg:#{msg}, args:#{args}" # puts "#{self.class.name} => @val:#{@value}, @rc:#{@success}, @msg:#{@message}" end def payload @value end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
skn_utils-5.1.1 | lib/skn_success.rb |
skn_utils-5.1.0 | lib/skn_success.rb |