Last active
April 26, 2019 21:29
-
-
Save localhostdotdev/0e81e6f0a5ba662fe040cc1f2f99b84f to your computer and use it in GitHub Desktop.
Revisions
-
localhostdotdev revised this gist
Apr 26, 2019 . 2 changed files with 62 additions and 36 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,62 @@ ### content_for(:false) { false } - content_for?(false) false - content_for(false) nil - yield(false) "" ------- ### content_for(:true) { true } - content_for?(true) false - content_for(true) nil - yield(true) "" ------- ### content_for(:nil) { nil } - content_for?(nil) false - content_for(nil) nil - yield(nil) "" ------- ### content_for(:"\"string\"") { "string" } - content_for?("string") true - content_for("string") "string" - yield("string") "string" ------- ### content_for(:"\" \"") { " " } - content_for?(" ") false - content_for(" ") nil - yield(" ") " " ------- ### content_for(:"{}") { {} } - content_for?({}) false - content_for({}) nil - yield({}) "" ------- ### content_for(:"{:a=>1}") { {:a=>1} } - content_for?({:a=>1}) false - content_for({:a=>1}) nil - yield({:a=>1}) "" ------- ### content_for(:"[1, 2]") { [1, 2] } - content_for?([1, 2]) false - content_for([1, 2]) nil - yield([1, 2]) "" ------- ### content_for(:[]) { [] } - content_for?([]) false - content_for([]) nil - yield([]) "" ------- This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,36 +0,0 @@ -
localhostdotdev created this gist
Apr 26, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ content_for(:false) { false } content_for?(false) false yield(false) "" content_for(:true) { true } content_for?(true) false yield(true) "" content_for(:nil) { nil } content_for?(nil) false yield(nil) "" content_for(:"\"string\"") { "string" } content_for?("string") true yield("string") "string" content_for(:"\" \"") { " " } content_for?(" ") false yield(" ") " " content_for(:"{}") { {} } content_for?({}) false yield({}) "" content_for(:"{:a=>1}") { {:a=>1} } content_for?({:a=>1}) false yield({:a=>1}) "" content_for(:"[1, 2]") { [1, 2] } content_for?([1, 2]) false yield([1, 2]) "" content_for(:[]) { [] } content_for?([]) false yield([]) ""