Sha256: 9e4166c4b0db7ae8a54f0e02cd54ac556d3fff8e64477ebef0ee62fd1f14bd09

Contents?: true

Size: 245 Bytes

Versions: 36

Compression:

Stored size: 245 Bytes

Contents

module Lolita
  module Utils

    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

  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
lolita-4.0.11 lib/lolita/utils.rb
lolita-4.2.0 lib/lolita/utils.rb
lolita-4.0.10 lib/lolita/utils.rb
lolita-4.0.9 lib/lolita/utils.rb
lolita-4.0.8 lib/lolita/utils.rb
lolita-4.0.7 lib/lolita/utils.rb
lolita-4.0.6 lib/lolita/utils.rb
lolita-4.0.5 lib/lolita/utils.rb
lolita-4.0.4 lib/lolita/utils.rb
lolita-4.0.3 lib/lolita/utils.rb
lolita-4.0.2 lib/lolita/utils.rb
lolita-4.0.1 lib/lolita/utils.rb
lolita-4.0.0 lib/lolita/utils.rb
lolita-3.4.3 lib/lolita/utils.rb
lolita-3.4.2 lib/lolita/utils.rb
lolita-3.4.1 lib/lolita/utils.rb
lolita-3.4.0 lib/lolita/utils.rb
lolita-3.3.9 lib/lolita/utils.rb
lolita-3.3.8 lib/lolita/utils.rb
lolita-3.3.7 lib/lolita/utils.rb