Module: Shutterstock::Configurable
- Included in:
- Shutterstock, API::Auth, API::Util, Client
- Defined in:
- lib/shutterstock/configurable.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
writeonly
Sets the attribute api_key.
-
#api_username ⇒ Object
writeonly
Sets the attribute api_username.
-
#email ⇒ Object
writeonly
Sets the attribute email.
-
#password ⇒ Object
writeonly
Sets the attribute password.
-
#username ⇒ Object
writeonly
Sets the attribute username.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#api_key=(value) ⇒ Object (writeonly)
Sets the attribute api_key
3 4 5 |
# File 'lib/shutterstock/configurable.rb', line 3 def api_key=(value) @api_key = value end |
#api_username=(value) ⇒ Object (writeonly)
Sets the attribute api_username
3 4 5 |
# File 'lib/shutterstock/configurable.rb', line 3 def api_username=(value) @api_username = value end |
#email=(value) ⇒ Object (writeonly)
Sets the attribute email
3 4 5 |
# File 'lib/shutterstock/configurable.rb', line 3 def email=(value) @email = value end |
#password=(value) ⇒ Object (writeonly)
Sets the attribute password
3 4 5 |
# File 'lib/shutterstock/configurable.rb', line 3 def password=(value) @password = value end |
#username=(value) ⇒ Object (writeonly)
Sets the attribute username
3 4 5 |
# File 'lib/shutterstock/configurable.rb', line 3 def username=(value) @username = value end |
Class Method Details
.keys ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/shutterstock/configurable.rb', line 6 def keys @keys ||= [ :api_username, :api_key, :username, :password, :email ] end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
17 18 19 20 |
# File 'lib/shutterstock/configurable.rb', line 17 def configure yield self self end |
#credentials ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/shutterstock/configurable.rb', line 22 def credentials { api_username: @api_username, api_key: @api_key, username: @username, password: @password, email: @email } end |