lib/dynamoid/config/options.rb in dynamoid-2.2.0 vs lib/dynamoid/config/options.rb in dynamoid-3.0.0
- old
+ new
@@ -1,12 +1,12 @@
+# frozen_string_literal: true
+
# Shamelessly stolen from Mongoid!
-module Dynamoid #:nodoc
+module Dynamoid
module Config
-
# Encapsulates logic for setting options.
module Options
-
# Get the defaults or initialize a new empty hash.
#
# @example Get the defaults.
# options.defaults
#
@@ -29,10 +29,10 @@
#
# @since 0.2.0
def option(name, options = {})
defaults[name] = settings[name] = options[:default]
- class_eval <<-RUBY
+ class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{name}
settings[#{name.inspect}]
end
def #{name}=(value)