class Haml::HTML::ERB

def block_opener?(code)

Returns:
  • (Boolean) -

Parameters:
  • code (String) -- Ruby code to check
def block_opener?(code)
  valid_ruby?(code + "\nend") ||
    valid_ruby?(code + "\nwhen foo\nend")
end