Class: ComerDeTapas::Subscription

Inherits:
Object
  • Object
show all
Defined in:
lib/comer_de_tapas/subscription.rb

Constant Summary collapse

KEYS =
%w(email password save_path)

Instance Method Summary collapse

Constructor Details

#initializeSubscription

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_hHash

Returns User“s Ruby Tapas credential information.

Returns:

  • (Hash)

    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