Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

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([]) ""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment