Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-10 04:12:53 +01:00
25 Zeilen
Kein EOL
464 B
Ruby
25 Zeilen
Kein EOL
464 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CustomWizard::Pro
|
|
NAMESPACE ||= "#{CustomWizard::PLUGIN_NAME}_pro"
|
|
|
|
attr_reader :authentication,
|
|
:subscription
|
|
|
|
def initialize
|
|
@authentication = CustomWizard::ProAuthentication.new
|
|
@subscription = CustomWizard::ProSubscription.new
|
|
end
|
|
|
|
def authorized?
|
|
@authentication.active?
|
|
end
|
|
|
|
def subscribed?
|
|
@subscription.active?
|
|
end
|
|
|
|
def self.subscribed?
|
|
self.new.subscribed?
|
|
end
|
|
end |