class BitGirder::Http::HttpHeaders

Attributes

pairs[R]

Public Class Methods

as_header_name( nm ) click to toggle source
# File lib/bitgirder/http.rb, line 20
def self.as_header_name( nm )
    nm.to_s.downcase
end
as_header_val( val ) click to toggle source
# File lib/bitgirder/http.rb, line 24
def self.as_header_val( val )
    val.to_s.strip
end
as_header_val_list( val ) click to toggle source
# File lib/bitgirder/http.rb, line 28
def self.as_header_val_list( val )
    
    case val

        when Array, MingleList 
            val.empty? ? [ "" ] : val.map { |v| self.as_header_val( v ) }

        else [ self.as_header_val( val ) ]
    end
end
from_mingle_struct( ms ) click to toggle source
# File lib/bitgirder/http.rb, line 83
def self.from_mingle_struct( ms )
    self.as_instance( ( ms[ :pairs ] || [] ).to_a )
end
new( opts = {} ) click to toggle source

Default constructor which takes a hash containing the following attributes:

:pairs
# File lib/doc-gen20.rb, line 29
def initialize( opts = {} )
    # Autogenerated stub for docs
end

Public Instance Methods

to_mingle_struct() click to toggle source
# File lib/bitgirder/http.rb, line 75
def to_mingle_struct

    MingleStruct.new(
        :type => :"bitgirder:http@v1/HttpHeaders",
        :fields => { :pairs => @pairs.map { |p| MingleList.new( p ) } }
    )
end