Skip to content

Instantly share code, notes, and snippets.

@zoffixznet
Created September 13, 2016 22:01
Show Gist options
  • Save zoffixznet/bc98465bb31b8a165b6b1c69ca0428b0 to your computer and use it in GitHub Desktop.
Save zoffixznet/bc98465bb31b8a165b6b1c69ca0428b0 to your computer and use it in GitHub Desktop.
class LedgerFromFile {...};
class LedgerFromPkg {...};
class Ledger {
proto method new {*}
multi method new(:$file!) { LedgerFromFile.new(:$file) }
multi method new(:$pkg!) { LedgerFromPkg.new(:$pkg) }
}
class LedgerFromFile {
has Str $.file is required;
};
class LedgerFromPkg {
has Str $.pkg is required;
}
Ledger.new(:file<mario>).say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment