class PaddleConfig
Attributes
api_key[RW]
currency[RW]
current_price[RW]
dev_name[RW]
image[RW]
options[R]
product_id[RW]
product_image[RW]
product_name[RW]
store[RW]
time_trial[RW]
trial_duration[RW]
trial_text[RW]
vendor_id[RW]
Public Class Methods
new(config, options)
click to toggle source
# File lib/motion-paddle/paddle.rb, line 10 def initialize(config, options) @config = config @options = options end
Public Instance Methods
inspect()
click to toggle source
# File lib/motion-paddle/paddle.rb, line 29 def inspect { product_id: product_id, vendor_id: vendor_id, api_key: api_key, current_price: current_price, dev_name: dev_name, currency: currency, image: image, product_name: product_name, trial_duration: trial_duration, trial_text: trial_text, product_image: product_image, time_trial: time_trial, store: store }.inspect end
mas_store?()
click to toggle source
# File lib/motion-paddle/paddle.rb, line 15 def mas_store? @options[:force_mas] || ENV.fetch('store', 'paddle').downcase == 'mas' end
paddle_store?()
click to toggle source
# File lib/motion-paddle/paddle.rb, line 19 def paddle_store? !@options[:force_mas] && ENV.fetch('store', 'paddle').downcase == 'paddle' end
set(var, val)
click to toggle source
# File lib/motion-paddle/paddle.rb, line 23 def set(var, val) @config.info_plist["MotionPaddle_#{@config.short_version}"] ||= [{}] @config.info_plist["MotionPaddle_#{@config.short_version}"].first[var.to_s] = val send("#{var}=", val) end