Sha256: 9416459e776592526d59a6ae80137cdadbc9d0fb3b18d13c4461f2a703fcaa25

Contents?: true

Size: 544 Bytes

Versions: 15

Compression:

Stored size: 544 Bytes

Contents

module OasRails
  module Spec
    class Paths
      include Specable

      attr_accessor :path_items

      def initialize(specification)
        @specification = specification
        @path_items = {}
      end

      def add_path(path)
        @path_items[path] = Builders::PathItemBuilder.new(@specification).from_path(path).build
      end

      def to_spec
        paths_hash = {}
        @path_items.each do |path, path_object|
          paths_hash[path] = path_object.to_spec
        end
        paths_hash
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
oas_rails-0.9.0 lib/oas_rails/spec/paths.rb
oas_rails-0.8.4 lib/oas_rails/spec/paths.rb
oas_rails-0.8.3 lib/oas_rails/spec/paths.rb
oas_rails-0.8.2 lib/oas_rails/spec/paths.rb
oas_rails-0.8.1 lib/oas_rails/spec/paths.rb
oas_rails-0.8.0 lib/oas_rails/spec/paths.rb
oas_rails-0.7.0 lib/oas_rails/spec/paths.rb
oas_rails-0.6.0 lib/oas_rails/spec/paths.rb
oas_rails-0.5.0 lib/oas_rails/spec/paths.rb
oas_rails-0.4.5 lib/oas_rails/spec/paths.rb
oas_rails-0.4.4 lib/oas_rails/spec/paths.rb
oas_rails-0.4.3 lib/oas_rails/spec/paths.rb
oas_rails-0.4.2 lib/oas_rails/spec/paths.rb
oas_rails-0.4.1 lib/oas_rails/spec/paths.rb
oas_rails-0.4.0 lib/oas_rails/spec/paths.rb