Class: InstallMethod
- Inherits:
-
Object
- Object
- InstallMethod
- Includes:
- ActiveModel::Serialization
- Defined in:
- app/models/install_method.rb
Overview
Read-only projection of "how do I install this product line?"
information used by the public product page: the marketing blurb,
difficulty rating, and an associated how-to video. Backed by the
HeatingElementProductLineOption lookup tables.
Instance Method Summary collapse
- #ease ⇒ String?
-
#initialize(options = {}) ⇒ InstallMethod
constructor
A new instance of InstallMethod.
- #install_method ⇒ String?
- #video ⇒ DigitalAsset?
Constructor Details
#initialize(options = {}) ⇒ InstallMethod
Returns a new instance of InstallMethod.
12 13 14 15 |
# File 'app/models/install_method.rb', line 12 def initialize( = {}) @name = [:name] @product_line = [:product_line] end |
Instance Method Details
#ease ⇒ String?
23 24 25 |
# File 'app/models/install_method.rb', line 23 def ease HeatingElementProductLineOption::INSTALLATION_LEVEL_BY_HEATING_SYSTEM_LIST[@name].to_s.capitalize end |
#install_method ⇒ String?
18 19 20 |
# File 'app/models/install_method.rb', line 18 def install_method HeatingElementProductLineOption::INSTALLATION_BLURB_BY_HEATING_SYSTEM_LIST[@name] end |
#video ⇒ DigitalAsset?
28 29 30 |
# File 'app/models/install_method.rb', line 28 def video ProductLine::VideoRetriever.new(tags: 'for-product-page-how-to-install').process(@product_line).all_videos.first end |