JezK
Edit File: extract%21-i.ri
U:RDoc::AnyMethod[iI" extract!:EFI"Jbuilder#extract!;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"zExtracts the mentioned attributes or hash elements from the passed object and turns them into attributes of the JSON.;To:RDoc::Markup::BlankLine o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [I"8@person = Struct.new(:name, :age).new('David', 32) ;TI" ;TI"or you can utilize a Hash ;TI" ;TI"*@person = { name: 'David', age: 32 } ;TI" ;TI"(json.extract! @person, :name, :age ;TI" ;TI"B{ "name": David", "age": 32 }, { "name": Jamie", "age": 31 } ;T:@format0o; ; [I"KYou can also use the call syntax instead of an explicit extract! call:;T@o;; [I" json.(@person, :name, :age);T; 0: @fileI"lib/jbuilder.rb;T:0@omit_headings_from_table_of_contents_below000[ I"(object, *attributes);T@#FI" Jbuilder;TcRDoc::NormalClass00