-
-
Save enebo/0d4a94669888555cc6621937220596cb to your computer and use it in GitHub Desktop.
This file contains 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 Fn | |
implements java.util.function.Supplier | |
def initialize(&code) | |
@code = code | |
end | |
def get | |
@code.call | |
end | |
def self.fn(&block) | |
new &block | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment