• R/O
  • SSH

kink: Commit

Kink runtime


Commit MetaInfo

Revision1ff17c624932f5ddc37e90ae24975baaf8a18248 (tree)
Time2020-02-10 23:10:01
Authormiyakawataku
Commitermiyakawataku

Log Message

rename BLOCK.block?? to BLOCK.is?

Change Summary

Incremental Difference

diff -r bb58292a1a5f -r 1ff17c624932 src/main/resources/kink-mods/kink/doc/model/BLOCK.kn
--- a/src/main/resources/kink-mods/kink/doc/model/BLOCK.kn Mon Feb 10 23:00:03 2020 +0900
+++ b/src/main/resources/kink-mods/kink/doc/model/BLOCK.kn Mon Feb 10 23:10:01 2020 +0900
@@ -117,10 +117,10 @@
117117 }
118118 ]
119119
120-## BLOCK.block?(Val)
120+## BLOCK.is?(Val)
121121 #
122-# block? returns whether Val is a block.
123-:block? <- {(:Val)
122+# BLOCK.is? returns whether Val is a block.
123+:is? <- {(:Val)
124124 Val.var_syms.have_all?(Block_var_syms)
125125 }
126126
diff -r bb58292a1a5f -r 1ff17c624932 src/main/resources/kink-mods/kink/doc/model/SECTION.kn
--- a/src/main/resources/kink-mods/kink/doc/model/SECTION.kn Mon Feb 10 23:00:03 2020 +0900
+++ b/src/main/resources/kink-mods/kink/doc/model/SECTION.kn Mon Feb 10 23:10:01 2020 +0900
@@ -37,7 +37,7 @@
3737 STR.is?(Title) && _valid_title?(Title) || raise(
3838 '{}: for title, required: {}, but got: {}'
3939 .format(Desc Title_req Title.repr))
40- VEC.is?(Blocks) && Blocks.for_all?(BLOCK$block?) || raise(
40+ VEC.is?(Blocks) && Blocks.for_all?(BLOCK$is?) || raise(
4141 '{}: required vec of blocks for Blocks, but got {}'.format(Desc Blocks.repr))
4242 VEC.is?(Subsections) && Subsections.for_all?($section?) || raise(
4343 '{}: required vec of sections for Subsections, but got {}'.format(Desc Subsections.repr))
diff -r bb58292a1a5f -r 1ff17c624932 src/test/kink/doc/model/BLOCK_test.kn
--- a/src/test/kink/doc/model/BLOCK_test.kn Mon Feb 10 23:00:03 2020 +0900
+++ b/src/test/kink/doc/model/BLOCK_test.kn Mon Feb 10 23:10:01 2020 +0900
@@ -4,19 +4,19 @@
44 :FLAT_MAP.require_from('kink/container/')
55 :JSON_VAL.require_from('kink/json/')
66
7-TEST.group('BLOCK.block?'){ # {{{1
7+TEST.group('BLOCK.is?'){ # {{{1
88 TEST.test('returns true for paragraph block'){
99 :Para = BLOCK.new_paragraph('hey ho')
10- BLOCK.block?(Para) || raise('got false')
10+ BLOCK.is?(Para) || raise('got false')
1111 }
1212
1313 TEST.test('returns true for code block'){
1414 :Code = BLOCK.new_code("foo()\n")
15- BLOCK.block?(Code) || raise('got false')
15+ BLOCK.is?(Code) || raise('got false')
1616 }
1717
1818 TEST.test('returns false for nada'){
19- BLOCK.block?(nada) && raise('got true')
19+ BLOCK.is?(nada) && raise('got true')
2020 }
2121 }
2222
Show on old repository browser