Sha256: b6a8353cadc67a2106be291dbe5276b21dbccdad8cf0fa6a61d363f5f69c4ce3

Contents?: true

Size: 381 Bytes

Versions: 5

Compression:

Stored size: 381 Bytes

Contents

module Rambo
  module RamlModels
    class Headers
      attr_accessor :headers

      def initialize(headers)
        @headers = headers
      end

      def pretty
        beginning, ending = "{\n", "}"

        contents = headers.map {|key, value|
          "\t\"#{key}\" => \"#{value}\"\n"
        }

        "#{beginning}#{contents.join}#{ending}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rambo_ruby-0.2.3 lib/rambo/raml_models/headers.rb
rambo_ruby-0.2.2 lib/rambo/raml_models/headers.rb
rambo_ruby-0.2.1 lib/rambo/raml_models/headers.rb
rambo_ruby-0.2.0 lib/rambo/raml_models/headers.rb
rambo_ruby-0.1.0 lib/raml_models/headers.rb