Method: ContextHelp::Helpers.get_text

Defined in:
lib/context_help/base.rb

.get_text(options, missing = true) ⇒ Object



200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/context_help/base.rb', line 200

def self.get_text(options,missing=true)
  text = options[:text] || get_doc_string(options[:calculated_path]+'.text')
  if text.nil?
    if missing and Rails.env.development? and ContextHelp::Base.config[:show_missing]
      I18n.t(options[:calculated_path]+'.text')
    else
      nil
    end
  else
    text
  end
end