This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "rubygems" | |
require "bundler/setup" | |
require "open3" | |
# Получаем все загруженные модули/классы с именем | |
modules = ObjectSpace.each_object(Module).to_a.filter_map { it if it.name } | |
abort("Не найдено никаких модулей / классов") if modules.empty? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PropertyService | |
module Event | |
class InitiateIntakeSheetProcess < Event::Base | |
def process | |
if property.units | |
if property.units.count == 1 | |
process_for_one_unit(property.units.first) | |
else | |
process_for_multiple_units |