Class: SpreeCmCommissioner::HomepageData
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::HomepageData
- Defined in:
- app/services/spree_cm_commissioner/homepage_data.rb
Instance Attribute Summary collapse
-
#homepage_background ⇒ Object
readonly
Returns the value of attribute homepage_background.
-
#menu ⇒ Object
readonly
Returns the value of attribute menu.
Instance Method Summary collapse
- #homepage_background_id ⇒ Object
- #id ⇒ Object
-
#initialize(menu:, homepage_background:) ⇒ HomepageData
constructor
Plain Old Ruby Object (PORO) for homepage data.
- #menu_id ⇒ Object
Constructor Details
#initialize(menu:, homepage_background:) ⇒ HomepageData
Plain Old Ruby Object (PORO) for homepage data
6 7 8 9 |
# File 'app/services/spree_cm_commissioner/homepage_data.rb', line 6 def initialize(menu:, homepage_background:) @menu = @homepage_background = homepage_background end |
Instance Attribute Details
#homepage_background ⇒ Object (readonly)
Returns the value of attribute homepage_background.
3 4 5 |
# File 'app/services/spree_cm_commissioner/homepage_data.rb', line 3 def homepage_background @homepage_background end |
#menu ⇒ Object (readonly)
Returns the value of attribute menu.
3 4 5 |
# File 'app/services/spree_cm_commissioner/homepage_data.rb', line 3 def @menu end |
Instance Method Details
#homepage_background_id ⇒ Object
19 20 21 |
# File 'app/services/spree_cm_commissioner/homepage_data.rb', line 19 def homepage_background_id homepage_background&.id end |
#id ⇒ Object
11 12 13 |
# File 'app/services/spree_cm_commissioner/homepage_data.rb', line 11 def id @id ||= SecureRandom.uuid end |
#menu_id ⇒ Object
15 16 17 |
# File 'app/services/spree_cm_commissioner/homepage_data.rb', line 15 def &.id end |