Class: Quark::Quark::Mock::MockResponse

Inherits:
DatawireQuarkCore::QuarkObject show all
Extended by:
DatawireQuarkCore::Static
Defined in:
lib/quark/mock.rb

Constant Summary

Constants included from DatawireQuarkCore::Static

DatawireQuarkCore::Static::Unassigned

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DatawireQuarkCore::Static

_lazy_statics, static, unlazy_statics

Methods inherited from DatawireQuarkCore::QuarkObject

#to_s

Constructor Details

#initializeMockResponse

Returns a new instance of MockResponse.



653
654
655
656
657
# File 'lib/quark/mock.rb', line 653

def initialize()
    self.__init_fields__

    nil
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



646
647
648
# File 'lib/quark/mock.rb', line 646

def body
  @body
end

#codeObject

Returns the value of attribute code.



646
647
648
# File 'lib/quark/mock.rb', line 646

def code
  @code
end

#headersObject

Returns the value of attribute headers.



646
647
648
# File 'lib/quark/mock.rb', line 646

def headers
  @headers
end

Instance Method Details

#__init_fields__Object



749
750
751
752
753
754
755
756
# File 'lib/quark/mock.rb', line 749

def __init_fields__()
    
    self.code = nil
    self.body = nil
    self.headers = {}

    nil
end

#_getClassObject



711
712
713
714
715
716
# File 'lib/quark/mock.rb', line 711

def _getClass()
    
    return "quark.mock.MockResponse"

    nil
end

#_getField(name) ⇒ Object



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'lib/quark/mock.rb', line 718

def _getField(name)
    
    if ((name) == ("code"))
        return (self).code
    end
    if ((name) == ("body"))
        return (self).body
    end
    if ((name) == ("headers"))
        return (self).headers
    end
    return nil

    nil
end

#_setField(name, value) ⇒ Object



734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/quark/mock.rb', line 734

def _setField(name, value)
    
    if ((name) == ("code"))
        (self).code = ::DatawireQuarkCore.cast(value) { ::Integer }
    end
    if ((name) == ("body"))
        (self).body = ::DatawireQuarkCore.cast(value) { ::String }
    end
    if ((name) == ("headers"))
        (self).headers = ::DatawireQuarkCore.cast(value) { ::Hash }
    end

    nil
end

#getBodyObject



676
677
678
679
680
681
# File 'lib/quark/mock.rb', line 676

def getBody()
    
    return @body

    nil
end

#getCodeObject



662
663
664
665
666
667
# File 'lib/quark/mock.rb', line 662

def getCode()
    
    return @code

    nil
end

#getHeader(key) ⇒ Object



697
698
699
700
701
702
# File 'lib/quark/mock.rb', line 697

def getHeader(key)
    
    return (@headers)[key]

    nil
end

#getHeadersObject



704
705
706
707
708
709
# File 'lib/quark/mock.rb', line 704

def getHeaders()
    
    return ::DatawireQuarkCore::List.new((@headers).keys)

    nil
end

#setBody(body) ⇒ Object



683
684
685
686
687
688
# File 'lib/quark/mock.rb', line 683

def setBody(body)
    
    (self).body = body

    nil
end

#setCode(code) ⇒ Object



669
670
671
672
673
674
# File 'lib/quark/mock.rb', line 669

def setCode(code)
    
    (self).code = code

    nil
end

#setHeader(key, value) ⇒ Object



690
691
692
693
694
695
# File 'lib/quark/mock.rb', line 690

def setHeader(key, value)
    
    (@headers)[key] = (value)

    nil
end