Class: ComerDeTapas::Subscription
- Inherits:
-
Object
- Object
- ComerDeTapas::Subscription
- Defined in:
- lib/comer_de_tapas/subscription.rb
Constant Summary collapse
- KEYS =
%w(email password save_path)
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.
5 6 7 8 9 |
# File 'lib/comer_de_tapas/subscription.rb', line 5 def initialize abort "Please run `comer_de_tapas init` first" unless CREDENTIAL_FILE.exist? set_subscription_data if subscription_data_valid? end |
Instance Method Details
#to_h ⇒ Hash
Returns User“s Ruby Tapas credential information.
12 13 14 |
# File 'lib/comer_de_tapas/subscription.rb', line 12 def to_h { email: email, password: password, save_path: save_path } end |