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 Boleite::GUI | |
| class Window < Container | |
| # ... | |
| Cute.signal header_drag(pos : Vector2f) | |
| def initialize | |
| # ... | |
| state_change.on &->update_header_size |
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
| def fetch_method(klass : U) forall U | |
| comp = fetch_method? klass # Return type is BaseClass | Nil | |
| # I want to return with the type provided to find | |
| 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
| module CrystalClear | |
| macro included | |
| def test_invariant_contracts(method="") | |
| {% verbatim do %} | |
| {% for c in Contracts::INVARIANTS %} | |
| {% str = c[0]; condition = c[1] %} | |
| test = CrystalClear.perform_test(self) {{condition}} | |
| if !test | |
| Contracts.on_contract_fail(:invariant, {{str}}, {{@type}}, method) | |
| 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
| abstract class Trashman::BaseRecord | |
| abstract def callstack : CallStack | |
| abstract def allocations : Uint64 | |
| abstract def deallocations : Uint64 | |
| abstract def untrack : Void | |
| abstract def type_str : String | |
| end | |
| module Trashman::Statistics | |
| @@records = [] of BaseRecord |
OlderNewer