Class: Passkit::UrlGenerator
- Inherits:
-
Object
- Object
- Passkit::UrlGenerator
- Defined in:
- lib/passkit/url_generator.rb
Constant Summary collapse
- WALLET_PASS_PREFIX =
"https://walletpass.io?u=".freeze
Instance Method Summary collapse
- #android ⇒ Object
-
#initialize(pass_class, generator = nil) ⇒ UrlGenerator
constructor
A new instance of UrlGenerator.
- #ios ⇒ Object
Constructor Details
#initialize(pass_class, generator = nil) ⇒ UrlGenerator
Returns a new instance of UrlGenerator.
5 6 7 8 |
# File 'lib/passkit/url_generator.rb', line 5 def initialize(pass_class, generator = nil) @url = passes_api_url(host: ENV["PASSKIT_WEB_SERVICE_HOST"], payload: PayloadGenerator.encrypted(pass_class, generator)) end |
Instance Method Details
#android ⇒ Object
16 17 18 |
# File 'lib/passkit/url_generator.rb', line 16 def android "#{WALLET_PASS_PREFIX}#{@url}" end |
#ios ⇒ Object
10 11 12 |
# File 'lib/passkit/url_generator.rb', line 10 def ios @url end |