lib/sinclair/config.rb in sinclair-1.7.0 vs lib/sinclair/config.rb in sinclair-1.8.0
- old
+ new
@@ -61,27 +61,27 @@
# LoginConfigurable.configure do |conf|
# conf.username :some_username
# conf.password :some_password
# end
#
- # options = LoginConfigurable.config.options
+ # options = LoginConfigurable.config.as_options
#
- # config.options.username # returns :some_username
- # config.options.password # returns :some_password
+ # config.as_options.username # returns :some_username
+ # config.as_options.password # returns :some_password
#
# @example returning custom options
# LoginConfigurable.configure do |conf|
# conf.username :some_username
# conf.password :some_password
# end
#
- # options = LoginConfigurable.config.options(
+ # options = LoginConfigurable.config.as_options(
# password: :correct_password
# )
#
- # config.options.username # returns :some_username
- # config.options.password # returns :correct_password
- def options(options_hash = {})
+ # config.as_options.username # returns :some_username
+ # config.as_options.password # returns :correct_password
+ def as_options(options_hash = {})
self.class.options_class.new(to_hash.merge(options_hash))
end
end
end