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
# A - only returns success true/false | |
module DocumentService | |
class Create | |
def self.call(a, b) | |
if process_works? | |
true | |
else | |
false | |
end | |
end |
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
# A | |
module Document | |
class ActionService | |
def initialize(a, b) | |
@a = a | |
@b = b | |
end | |
def call | |
compute |
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 | |
# Inspiration: https://brandnewbox.com/notes/2021/03/form-builders-in-ruby/ | |
# | |
# Example: | |
# | |
# f.input :field, options | |
# | |
# possible options: | |
# - as: symbol (:boolean, :data, :float, :radio, :select, :string, :text, :file, :time) |