Class: RightnowOms::OrderNoGenerator
- Inherits:
-
Object
- Object
- RightnowOms::OrderNoGenerator
- Defined in:
- lib/rightnow_oms/order_no_generator.rb
Constant Summary collapse
- NO_FORMAT =
'%s%06d'
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(order) ⇒ OrderNoGenerator
constructor
A new instance of OrderNoGenerator.
Constructor Details
#initialize(order) ⇒ OrderNoGenerator
Returns a new instance of OrderNoGenerator.
5 6 7 |
# File 'lib/rightnow_oms/order_no_generator.rb', line 5 def initialize(order) @order = order end |
Instance Method Details
#generate ⇒ Object
9 10 11 |
# File 'lib/rightnow_oms/order_no_generator.rb', line 9 def generate NO_FORMAT % [@order.created_at.strftime('%Y%m%d'), @order.id] end |