module ROM # Helper module for classes with a constructor accepting option hash # # This allows us to DRY up code as option hash is a very common pattern used # across the codebase. It is an internal implementation detail not meant to # be used outside of ROM # # @example # class User # include Options # # option :name, type: String, reader: true # option :admin, allow: [true, false], reader: true, default: false # # def initialize(options={}) # super # end # end # # user = User.new(name: 'Piotr') # user.name # => "Piotr" # user.admin # => false # # @api public module Options # @return [Hash