How can I implement options hashes? How is the structure of a class that has option hashes in it? Say I have a person class. I want to implement a method such as my_age that whe
In Ruby 2.x you can use ** operator:
**
class Some def initialize(**options) @options = options end def it_is? return @options[:body] if @options.has_key?(:body) end end