Created
September 13, 2016 22:06
-
-
Save zoffixznet/c5d602ee46651613dec964737a0774fa 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 LedgerFromFile {...}; | |
class LedgerFromPkg {...}; | |
class Ledger { | |
multi method new(:$file!) { LedgerFromFile.bless: :$file } | |
multi method new(:$pkg!) { LedgerFromPkg .bless: :$pkg } | |
} | |
class LedgerFromFile is Ledger { | |
has Str $.file is required; | |
}; | |
class LedgerFromPkg is Ledger { | |
has Str $.pkg is required; | |
} | |
Ledger.new(:file<mario>).say; | |
Ledger.new(:pkg<meow>).say; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment