Class: InboxSync::Config::Credentials
- Inherits:
-
Object
- Object
- InboxSync::Config::Credentials
- Includes:
- NsOptions::Proxy
- Defined in:
- lib/inbox-sync/config/credentials.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Credentials
constructor
A new instance of Credentials.
- #validate! ⇒ Object
Constructor Details
#initialize(*args) ⇒ Credentials
Returns a new instance of Credentials.
12 13 14 15 16 17 18 19 |
# File 'lib/inbox-sync/config/credentials.rb', line 12 def initialize(*args) the_args = args.flatten if the_args.size == 1 self.apply(args.last) else self.user, self.pw = the_args end end |
Instance Method Details
#validate! ⇒ Object
21 22 23 24 25 |
# File 'lib/inbox-sync/config/credentials.rb', line 21 def validate! if !required_set? raise ArgumentError, "some required configs are missing" end end |