JezK
Edit File: key_format%21-i.ri
U:RDoc::AnyMethod[iI"key_format!:EFI"Jbuilder#key_format!;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"TSpecifies formatting to be applied to the key. Passing in a name of a function ;TI"Swill cause that function to be called on the key. So :upcase will upper case ;TI"Mthe key. You can also pass in lambdas for more complex transformations.;To:RDoc::Markup::BlankLine o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"json.key_format! :upcase ;TI"json.author do ;TI" json.name "David" ;TI" json.age 32 ;TI" end ;TI" ;TI"2{ "AUTHOR": { "NAME": "David", "AGE": 32 } } ;T:@format0o; ; [I"=You can pass parameters to the method using a hash pair.;T@o;; [ I"'json.key_format! camelize: :lower ;TI"json.first_name "David" ;TI" ;TI"{ "firstName": "David" } ;T; 0o; ; [I"Lambdas can also be used.;T@o;; [ I"+json.key_format! ->(key){ "_" + key } ;TI"json.first_name "David" ;TI" ;TI"{ "_first_name": "David" };T; 0: @fileI"lib/jbuilder.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(*args);T@/FI" Jbuilder;TcRDoc::NormalClass00