Remove a method declaration, copying the code in the method's body to its callsites.
def greeting(name)
"Hello, " + name
end
puts greeting "World"
puts "Hello, " + "World"
After you inline a method, sometimes you end up with
constants that can be combined (as in the example above, in
which we're performing the computation "Hello, " + "World"
with
hardcoded constants). A good follow-up refactoring is
Compile Constant Value [BC].