Module | BiorubyHelper
In: | lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb

### Methods

have_results local_variables project_workdir reference_link render_log

### Included Modules

Bio::Shell

### Public Instance methods

have_results()

[Source]

        # File lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb, line 13
    13:   def have_results
    14:     Bio::Shell.cache[:results].number > 0
    15:   end

local_variables()

[Source]

        # File lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb, line 17
    17:   def local_variables
    18:     eval("local_variables", Bio::Shell.cache[:binding]) -
    19:       BiorubyController::HIDE_VARIABLES
    20:   end

project_workdir()

[Source]

        # File lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb, line 5
     5:   def project_workdir
     6:     if Bio::Shell.cache[:savedir].match(/\.bioruby$/)
     7:       Bio::Shell.cache[:workdir]
     8:     else
     9:       Bio::Shell.cache[:savedir]
    10:     end
    11:   end

reference_link(class_or_module)

[Source]

        # File lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb, line 30
    30:   def reference_link(class_or_module)
    31:     name = class_or_module.to_s
    32:     case name
    33:     when /Bio::(.+)/
    34:       path = $1.split('::').join('/')
    35:       url = "http://bioruby.org/rdoc/classes/Bio/#{path}.html"
    36:     when /Chem::(.+)/
    37:       path = $1.split('::').join('/')
    38:       url = "http://chemruby.org/rdoc/classes/Chem/#{path}.html"
    39:     else
    40:       path = name.split('::').join('/')
    41:       url = "http://www.ruby-doc.org/core/classes/#{path}.html"
    42:     end
    43:     return "<a href='#{url}'>#{name}</a>"
    44:   end

render_log(page)

[Source]

        # File lib/bio/shell/rails/vendor/plugins/bioruby/generators/bioruby/templates/bioruby_helper.rb, line 22
    22:   def render_log(page)
    23:     page.insert_html :top, :logs, :partial => "log"
    24:     page.replace_html "variables", :partial => "variables"
    25:     page.hide "methods_#{@number}"
    26:     page.hide "classes_#{@number}"
    27:     page.hide "modules_#{@number}"
    28:   end

[Validate]