Module: RandomUserGenerator::Configuration
- Included in:
- RandomUserGenerator
- Defined in:
- lib/random_user_generator/configuration.rb
Constant Summary collapse
- OPTIONS =
[:key, :nat, :gender, :seed]
Instance Attribute Summary collapse
-
#api_version ⇒ Object
Returns the value of attribute api_version.
Instance Method Summary collapse
Instance Attribute Details
#api_version ⇒ Object
Returns the value of attribute api_version.
5 6 7 |
# File 'lib/random_user_generator/configuration.rb', line 5 def api_version @api_version end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
8 9 10 |
# File 'lib/random_user_generator/configuration.rb', line 8 def configure yield self end |
#options ⇒ Object
12 13 14 15 16 |
# File 'lib/random_user_generator/configuration.rb', line 12 def OPTIONS.inject({}) do |option, key| option.merge!(key => send(key)) end end |
#reset ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/random_user_generator/configuration.rb', line 18 def reset self.api_version = nil self.key = nil self.nat = nil self.gender = nil self.seed = nil end |