Method: String#linguify

Defined in:
lib/linguify/string.rb

#linguify(bind = binding) ⇒ Object

Linguify the string.

Examples:

Linguify a string and translate it back to Ruby

"this is the famous hello world".linguify.to_ruby
# => "code = lambda do
#       (pp(\"hello world\")
#     end
#    "

Parameters:

  • binding (Binding)

    See the Kernel#eval.



38
39
40
41
# File 'lib/linguify/string.rb', line 38

def linguify bind=binding
  return Linguify::Linguified::cache[self] if Linguify::Linguified::cache[self]
  Linguify::Linguified::cache[self] = Linguify::Linguified.new(self,bind)
end