Class: PaddleConfig
- Inherits:
-
Object
- Object
- PaddleConfig
- Defined in:
- lib/motion-paddle/paddle.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#current_price ⇒ Object
Returns the value of attribute current_price.
-
#dev_name ⇒ Object
Returns the value of attribute dev_name.
-
#image ⇒ Object
Returns the value of attribute image.
-
#product_id ⇒ Object
Returns the value of attribute product_id.
-
#product_image ⇒ Object
Returns the value of attribute product_image.
-
#product_name ⇒ Object
Returns the value of attribute product_name.
-
#time_trial ⇒ Object
Returns the value of attribute time_trial.
-
#trial_duration ⇒ Object
Returns the value of attribute trial_duration.
-
#trial_text ⇒ Object
Returns the value of attribute trial_text.
-
#vendor_id ⇒ Object
Returns the value of attribute vendor_id.
Instance Method Summary collapse
-
#initialize(config) ⇒ PaddleConfig
constructor
A new instance of PaddleConfig.
- #inspect ⇒ Object
- #set(var, val) ⇒ Object
Constructor Details
#initialize(config) ⇒ PaddleConfig
Returns a new instance of PaddleConfig.
8 9 10 |
# File 'lib/motion-paddle/paddle.rb', line 8 def initialize(config) @config = config end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def api_key @api_key end |
#currency ⇒ Object
Returns the value of attribute currency.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def currency @currency end |
#current_price ⇒ Object
Returns the value of attribute current_price.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def current_price @current_price end |
#dev_name ⇒ Object
Returns the value of attribute dev_name.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def dev_name @dev_name end |
#image ⇒ Object
Returns the value of attribute image.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def image @image end |
#product_id ⇒ Object
Returns the value of attribute product_id.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def product_id @product_id end |
#product_image ⇒ Object
Returns the value of attribute product_image.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def product_image @product_image end |
#product_name ⇒ Object
Returns the value of attribute product_name.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def product_name @product_name end |
#time_trial ⇒ Object
Returns the value of attribute time_trial.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def time_trial @time_trial end |
#trial_duration ⇒ Object
Returns the value of attribute trial_duration.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def trial_duration @trial_duration end |
#trial_text ⇒ Object
Returns the value of attribute trial_text.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def trial_text @trial_text end |
#vendor_id ⇒ Object
Returns the value of attribute vendor_id.
6 7 8 |
# File 'lib/motion-paddle/paddle.rb', line 6 def vendor_id @vendor_id end |
Instance Method Details
#inspect ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/motion-paddle/paddle.rb', line 18 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 }.inspect end |
#set(var, val) ⇒ Object
12 13 14 15 16 |
# File 'lib/motion-paddle/paddle.rb', line 12 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 |