Class: Apipie::Extractor::OrderedHash

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

Overview

Used to keep apipie_examples.yml params in order

Instance Method Summary collapse

Instance Method Details

#to_yaml(opts = {}) ⇒ Object



387
388
389
390
391
392
393
394
395
# File 'lib/apipie/extractor/writer.rb', line 387

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



383
384
385
# File 'lib/apipie/extractor/writer.rb', line 383

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