mirror of
https://gitea.invidious.io/iv-org/shard-kilt.git
synced 2024-08-15 00:43:15 +00:00
change default io name and document it
This commit is contained in:
parent
d761fe6b58
commit
394fea01da
3 changed files with 14 additions and 11 deletions
10
src/kilt.cr
10
src/kilt.cr
|
@ -2,8 +2,8 @@ require "ecr/macros"
|
|||
require "./kilt/*"
|
||||
|
||||
module Kilt
|
||||
|
||||
macro embed(filename, io_name = "__io__")
|
||||
|
||||
macro embed(filename, io_name = "__kilt_io__")
|
||||
{% if filename.ends_with?(".ecr") %}
|
||||
embed_ecr({{filename}}, {{io_name}})
|
||||
{% elsif filename.ends_with?(".slang") %}
|
||||
|
@ -13,9 +13,9 @@ module Kilt
|
|||
{% end %}
|
||||
end
|
||||
|
||||
macro file(filename)
|
||||
def to_s(__io__)
|
||||
Kilt.embed({{filename}}, "__io__")
|
||||
macro file(filename, io_name = "__kilt_io__")
|
||||
def to_s({{io_name.id}})
|
||||
Kilt.embed({{filename}}, {{io_name}})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Kilt
|
||||
VERSION = "0.1.0"
|
||||
VERSION = "0.1.1"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue