Sha256: f9fe1d2948161f3803a511028693801d5450254440aec25caad6f9d20c75a152

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

INTERPOLATION = {}

INTERPOLATION['one_variable_interpolated_only'] =
  %q{puts "#{bing}"
}

INTERPOLATION['mixed_content_and_expression'] =
  %q{puts "hello: #{bing}"
}

INTERPOLATION['no_string'] =
  %q{puts bing
}

INTERPOLATION['two_variables'] =
  %q{puts "#{bing}#{bar}"
}

INTERPOLATION['two_strings_with_unnecessary_interpolation'] =
  %q{puts "#{foo}" + "#{bar}"
}

INTERPOLATION['multiline_string_with_unnecessary_interpolation'] =
  %q{puts "#{foo +
bar -
baz}"
}

INTERPOLATION['multiline_word_list'] =
  %q{%w{
  foo
  bar
  baz
}}

INTERPOLATION['nested_interpolation'] =
  %q[def friendly_time(time)
  if hours < 24
    "#{(hours > 0) ? "#{hours} hour" : '' }#{(hours > 1) ? 's' : ''}" +
      " #{(mins > 0) ? "#{mins} minute" : '' }#{(mins > 1) ? 's' : ''}" +
      " #{seconds} second#{(seconds > 1) ? "s" : ''} ago"
  else
    time.to_s
  end
end]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tailor-1.4.0 spec/support/string_interpolation_cases.rb