Class: ReservationService::FormFactory
- Inherits:
-
Object
- Object
- ReservationService::FormFactory
- Defined in:
- app/services/reservation_service/form_factory.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#reservation ⇒ Object
readonly
Returns the value of attribute reservation.
Instance Method Summary collapse
- #create_form_service ⇒ Object
-
#initialize(params, reservation = nil) ⇒ FormFactory
constructor
A new instance of FormFactory.
Constructor Details
#initialize(params, reservation = nil) ⇒ FormFactory
Returns a new instance of FormFactory.
4 5 6 7 |
# File 'app/services/reservation_service/form_factory.rb', line 4 def initialize(params, reservation = nil) @params = params @reservation = reservation end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
2 3 4 |
# File 'app/services/reservation_service/form_factory.rb', line 2 def params @params end |
#reservation ⇒ Object (readonly)
Returns the value of attribute reservation.
2 3 4 |
# File 'app/services/reservation_service/form_factory.rb', line 2 def reservation @reservation end |
Instance Method Details
#create_form_service ⇒ Object
9 10 11 |
# File 'app/services/reservation_service/form_factory.rb', line 9 def create_form_service form_service_class.new(params, reservation) end |