Class: RailsAssist::TemplateLanguage::Erb

Inherits:
Base
  • Object
show all
Defined in:
lib/rails_artifactor/template_language/erb.rb

Instance Method Summary collapse

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, options = {}, &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, options = {}
  "<%= #{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, options= {}, &block
  %Q{"<#{tag} #{attributes}>"
#{yield}
<#{tag}/>
}
end