Sha256: 3a516b1d6cc82533a5f9bc0bd7d4c62ae71783ca6a8282b2fb145296b2db7fa4
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
module GrapeDSL module EXT module ArrayMP def convert_all_value_to_grape_dsl_format self.count.times do |index| case true when self[index].class <= Hash self[index].convert_all_value_to_grape_dsl_format when self[index].class <= Array self[index].convert_all_value_to_grape_dsl_format else self[index]= self[index].to_s end end return self end end module HashMP def convert_all_value_to_grape_dsl_format self.each do |key,value| case true when value.class <= Hash value.convert_all_value_to_grape_dsl_format when value.class <= Array value.convert_all_value_to_grape_dsl_format else self[key]= value.to_s end end return self end end end end Array.__send__ :include, GrapeDSL::EXT::ArrayMP Hash.__send__ :include, GrapeDSL::EXT::HashMP
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
grape-doc-0.0.1.alpha | lib/grape/doc/mpatch.rb |
grape-dsl-2.3.0 | lib/grape-dsl/doc_mp.rb |
grape-dsl-2.2.1 | lib/grape-dsl/doc_mp.rb |
grape-dsl-2.2.0 | lib/grape-dsl/doc_mp.rb |