Module: Lolita::Utils

Defined in:
lib/lolita/utils.rb

Class Method Summary collapse

Class Method Details

.dynamic_string(str, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'lib/lolita/utils.rb', line 4

def self.dynamic_string(str, options = {})
  response_str = if str.respond_to?(:call)
    str.call(str,options)
  else
    str
  end
  response_str || options[:default]
end