Class: ComerDeTapas::Subscription
- Inherits:
-
Object
- Object
- ComerDeTapas::Subscription
- Defined in:
- lib/comer_de_tapas/subscription.rb
Constant Summary collapse
- CredentialYamlNotExist =
Class.new StandardError
- CredentialYamlKeyError =
Class.new StandardError
- CredentialYamlValueError =
Class.new StandardError
Instance Method Summary collapse
-
#initialize ⇒ Subscription
constructor
A new instance of Subscription.
-
#to_h ⇒ Hash
User’s Ruby Tapas credential information.
Constructor Details
#initialize ⇒ Subscription
Returns a new instance of Subscription.
7 8 9 10 11 |
# File 'lib/comer_de_tapas/subscription.rb', line 7 def initialize raise CredentialYamlNotExist, 'Please run `comer_de_tapas init` first' unless File.exist? CREDENTIAL_FILE set_subscription_data if subscription_data_valid? end |
Instance Method Details
#to_h ⇒ Hash
Returns User’s Ruby Tapas credential information.
14 15 16 |
# File 'lib/comer_de_tapas/subscription.rb', line 14 def to_h { email: email, password: password, save_path: save_path } end |