Class: BitGirder::Http::HttpEndpoint

Inherits:
BitGirderClass
  • Object
show all
Defined in:
lib/bitgirder/http.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_mingle_struct(ms) ⇒ Object



115
116
117
118
119
120
121
122
# File 'lib/bitgirder/http.rb', line 115

def self.from_mingle_struct( ms )
    
    self.new(
        :host => ms.fields.get_string( :host ),
        :port => ms.fields.get_int( :port ),
        :is_ssl => ms.fields.get_boolean( :is_ssl )
    )
end

Instance Method Details

#to_mingle_structObject



103
104
105
106
107
108
109
110
111
112
113
# File 'lib/bitgirder/http.rb', line 103

def to_mingle_struct

    MingleStruct.new(
        :type => :"bitgirder:http@v1/HttpEndpoint",
        :fields => {
            :host => @host,
            :port => @port,
            :is_ssl => @is_ssl
        }
    )
end