Sha256: f05b57f8268f6fe2827d5e6d4c4be366c57a7337c88610ddb6ab86de69d2c1c3

Contents?: true

Size: 700 Bytes

Versions: 17

Compression:

Stored size: 700 Bytes

Contents

module AsanaExceptionNotifier
  # helper methods that use Heredoc syntax
  module HeredocHelper
  module_function

    def link_helper(link)
      <<-HTML
      <a href="javascript:void(0)" onclick="AjaxExceptionNotifier.hideAllAndToggle('#{link.downcase}')">#{link.camelize}</a>
      HTML
    end

    # Gets a bidimensional array and create a table.
    # The first array is used as label.
    #
    def mount_table(array, options = {})
      header = array.extract_options!
      <<-HTML
      <table #{hash_to_html_attributes(options)}>
      <thead><tr><th>#{get_table_headers(header)}</th></tr></thead>
      <tbody>#{get_table_rows(array)}</tbody>
      </table>
      HTML
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
asana_exception_notifier-0.3.8 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.7 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.6 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.5 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.4 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.3 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.2 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.3.1 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.2.2 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.2.1 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.2.0 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.1.0 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.0.9 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.0.8 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.0.7 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.0.6 lib/asana_exception_notifier/helpers/heredoc_helper.rb
asana_exception_notifier-0.0.5 lib/asana_exception_notifier/helpers/heredoc_helper.rb