Class: SpreeCmCommissioner::VendorTelegramMessageFactory
- Inherits:
-
TelegramMessageFactory
- Object
- TelegramMessageFactory
- SpreeCmCommissioner::VendorTelegramMessageFactory
- Defined in:
- app/factory/spree_cm_commissioner/vendor_telegram_message_factory.rb
Instance Attribute Summary collapse
-
#vendor ⇒ Object
readonly
Returns the value of attribute vendor.
Attributes inherited from TelegramMessageFactory
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(vendor:) ⇒ VendorTelegramMessageFactory
constructor
A new instance of VendorTelegramMessageFactory.
Methods inherited from TelegramMessageFactory
#bold, #footer, #header, #inline_code, #italic, #message, #parse_mode, #pretty_date
Constructor Details
#initialize(vendor:) ⇒ VendorTelegramMessageFactory
Returns a new instance of VendorTelegramMessageFactory.
16 17 18 19 20 21 22 |
# File 'app/factory/spree_cm_commissioner/vendor_telegram_message_factory.rb', line 16 def initialize(vendor:) @vendor = vendor title = '✨ New Vendor ✨' super(title: title) end |
Instance Attribute Details
#vendor ⇒ Object (readonly)
Returns the value of attribute vendor.
14 15 16 |
# File 'app/factory/spree_cm_commissioner/vendor_telegram_message_factory.rb', line 14 def vendor @vendor end |
Instance Method Details
#body ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/factory/spree_cm_commissioner/vendor_telegram_message_factory.rb', line 24 def body [ "📝 Name: #{vendor.name}", '', email_line, phone_line, '', creator_line, created_at_line, '', url_line ].compact.join("\n") end |