Class: Okei::GetUnits
- Inherits:
-
Hexx::UseCase
- Object
- Hexx::UseCase
- Okei::GetUnits
- Defined in:
- app/use_cases/okei/get_units.rb
Overview
Finds all units:
use_case = GetUnits.new
use_case.run
# => list of all units
…or units of given measure (in Russian):
use_case = GetUnits.new measure: "ДЛИНА"
use_case.run
# => list of units of length
Any other parameters are ignored.
Allows subscription before running:
use_case.subscribe logger
use_case.subscribe controller
use_case.run
Instance Method Summary collapse
-
#run! ⇒ Object
Publishes ‘success(units)` and returns a list of units.
Instance Method Details
#run! ⇒ Object
Publishes ‘success(units)` and returns a list of units.
30 31 32 33 |
# File 'app/use_cases/okei/get_units.rb', line 30 def run! publish :success, units units end |