Created
February 1, 2018 11:22
-
-
Save maicher/c950f384ee15a48d44e7b51c1de94c4a to your computer and use it in GitHub Desktop.
Sequence diagrams
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
class A | |
def call | |
# do something | |
end | |
end | |
class B | |
def call(argument) | |
# do something different | |
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
class C | |
def initialize(a:, b:) | |
@a, @b = a, b | |
end | |
def call | |
result = a.call | |
b.call(result) | |
end | |
private | |
attr_reader :a, :b | |
end | |
a = A.new | |
b = B.new | |
c = C.new(a: a, b: b) |
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
@startuml | |
# sequence diagram goes here | |
@enduml |
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
@startuml | |
ClassA -> ClassB : call | |
ClassA <-- ClassB : response | |
@enduml |
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
@startuml | |
ClassA -> ClassB : call | |
activate ClassB | |
ClassA <-- ClassB : response | |
deactivate ClassB | |
@enduml |
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
@startuml | |
ClassA -> ClassB : call | |
activate ClassB | |
ClassA <-- ClassB : response | |
note left: processing something | |
deactivate ClassB | |
@endum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment