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-3.3.6 lib/lolita/utils.rb
lolita-3.3.5 lib/lolita/utils.rb
lolita-3.3.4 lib/lolita/utils.rb
lolita-3.3.3 lib/lolita/utils.rb
lolita-3.3.2 lib/lolita/utils.rb
lolita-3.3.1 lib/lolita/utils.rb
lolita-3.3.0 lib/lolita/utils.rb
lolita-3.2.1 lib/lolita/utils.rb
lolita-3.2.0.rc.17 lib/lolita/utils.rb
lolita-3.2.0.rc.16 lib/lolita/utils.rb
lolita-3.2.0.rc.14 lib/lolita/utils.rb
lolita-3.2.0.rc.13 lib/lolita/utils.rb
lolita-3.2.0.rc.12 lib/lolita/utils.rb
lolita-3.2.0.rc.11 lib/lolita/utils.rb
lolita-3.2.0.rc.10 lib/lolita/utils.rb
lolita-3.2.0.rc.9 lib/lolita/utils.rb