puts caller[0]
or perhaps…
puts caller[0][/`.*'/][1..-2]
More Related Contents:
- How to get the last character of a string in an array [closed]
- Compute percentage of cents total
- What does ||= (or-equals) mean in Ruby?
- Why use Ruby’s attr_accessor, attr_reader and attr_writer?
- Can’t install Ruby under Lion with RVM – GCC issues
- How do I download a binary file over HTTP?
- How to write to file in Ruby?
- Is there an efficient way to perform hundreds of text substitutions in Ruby?
- ‘pass parameter by reference’ in Ruby?
- Methods in Ruby: objects or not?
- How to Uninstall RVM? [duplicate]
- sqlite3-ruby install error on Ubuntu
- Backslashes in single quoted strings vs. double quoted strings
- Is there any wisdom behind “and”, “or” operators in Ruby?
- DRY Ruby Initialization with Hash Argument
- Exporting an Environment Variable in Ruby
- ruby inheritance vs mixins
- Understanding the “||” OR operator in If conditionals in Ruby
- In Ruby, how does coerce() actually work?
- How to check if a Ruby object is a Boolean
- Is there a way to remove the BOM from a UTF-8 encoded file?
- How can I access a variable defined in a Ruby file I required in IRB?
- Invalid function in ruby
- When do Ruby instance variables get set?
- Is order of a Ruby hash literal guaranteed?
- Running a Ruby Program as a Windows Service?
- Where is it legal to use ruby splat operator?
- Net::ReadTimeout (Net::ReadTimeout) Selenium Ruby
- In Ruby, why does nil[1]=1 evaluate to nil?
- Rails ‘parse_query’ error on server in brand new app