Class: RBlade::CompilesStatements::CompilesHtmlAttributes
- Inherits:
-
Object
- Object
- RBlade::CompilesStatements::CompilesHtmlAttributes
- Defined in:
- lib/rblade/compiler/statements/compiles_html_attributes.rb
Instance Method Summary collapse
Instance Method Details
#compileClass(args) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/rblade/compiler/statements/compiles_html_attributes.rb', line 4 def compileClass args if args&.count != 1 raise StandardError.new "Class statement: wrong number of arguments (given #{args&.count || 0}, expecting 1)" end "_out<<'class=\"'<<RBlade::ClassManager.new(#{args[0]})<<'\"';" end |
#compileStyle(args) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/rblade/compiler/statements/compiles_html_attributes.rb', line 12 def compileStyle args if args&.count != 1 raise StandardError.new "Style statement: wrong number of arguments (given #{args&.count || 0}, expecting 1)" end "_out<<'style=\"'<<RBlade::StyleManager.new(#{args[0]})<<'\"';" end |