Class: Restapi::Extractor::OrderedHash

Inherits:
ActiveSupport::OrderedHash
  • Object
show all
Defined in:
lib/restapi/extractor/writer.rb

Overview

Used to keep restapi_examples.yml params in order

Instance Method Summary collapse

Instance Method Details

#to_yaml(opts = {}) ⇒ Object



344
345
346
347
348
349
350
351
352
# File 'lib/restapi/extractor/writer.rb', line 344

def to_yaml(opts = {})
  YAML.quick_emit(self, opts) do |out|
    out.map(taguri) do |map|
      each do |k, v|
        map.add(k, v)
      end
    end
  end
end

#to_yaml_typeObject



340
341
342
# File 'lib/restapi/extractor/writer.rb', line 340

def to_yaml_type
  "!tag:yaml.org,2002:map"
end