Sha256: 9514e26d0fa9f73c84ee77f90e10d41c8a8838734d7c5ad010485b3ea10eb857
Contents?: true
Size: 417 Bytes
Versions: 15
Compression:
Stored size: 417 Bytes
Contents
module RspecApiDocs module Renderer class JSONRenderer class Name def self.call(name:, scope:) scope = Array(scope) if scope.empty? name else scope.each_with_index.inject('') do |str, (part, index)| str << (index == 0 ? part : "[#{part}]").to_s end + "[#{name}]" end end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems