Class: RailsAssist::TemplateLanguage::Erb
- Defined in:
- lib/rails_artifactor/template_language/erb.rb
Instance Method Summary collapse
- #insert_ruby_block(statement, options = {}, &block) ⇒ Object
- #insert_ruby_statement(statement, options = {}) ⇒ Object
- #insert_tag(tag, attributes, options = {}, &block) ⇒ Object
Instance Method Details
#insert_ruby_block(statement, options = {}, &block) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/rails_artifactor/template_language/erb.rb', line 8 def insert_ruby_block statement, = {}, &block %Q{"<%= #{statement} %>" #{yield} <% end %> } # insert_content options end |
#insert_ruby_statement(statement, options = {}) ⇒ Object
4 5 6 |
# File 'lib/rails_artifactor/template_language/erb.rb', line 4 def insert_ruby_statement statement, = {} "<%= #{statement} %>" end |
#insert_tag(tag, attributes, options = {}, &block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/rails_artifactor/template_language/erb.rb', line 16 def insert_tag tag, attributes, = {}, &block %Q{"<#{tag} #{attributes}>" #{yield} <#{tag}/> } end |