diff --git a/Novika.html b/Novika.html index 0456f70..1fdcb75 100644 --- a/Novika.html +++ b/Novika.html @@ -1340,7 +1340,7 @@
"0.1.3"
+ VERSION = "0.1.4"
An Array
is an ordered, integer-indexed collection of objects of type T.
A pool of BlockIdMap
objects.
Regex that can be used to search for a pattern in Block
comments.
Returns whether the output of Novika should be colorful.
","abstract":false,"location":{"filename":"src/novika.cr","line_number":58,"url":null},"def":{"name":"colorful?","return_type":"Bool","visibility":"Public","body":"((STDOUT.tty? && STDERR.tty?) && (ENV[\"TERM\"]? != \"dumb\")) && (!(ENV.has_key?(\"NO_COLOR\")))"}}],"types":[{"html_id":"novika/Novika/Block","path":"Novika/Block.html","kind":"class","full_name":"Novika::Block","name":"Block","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/block.cr","line_number":338,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"MAX_COUNT_TO_S","name":"MAX_COUNT_TO_S","value":"128","doc":"Maximum amount of forms to display in block string representation.","summary":"Maximum amount of forms to display in block string representation.
"},{"id":"MAX_NESTED_COUNT_TO_S","name":"MAX_NESTED_COUNT_TO_S","value":"12","doc":"Maximum amount of forms to display in string representation\nof *nested* blocks.","summary":"Maximum amount of forms to display in string representation of nested blocks.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Blocks are fundamental to Novika.\n\nThey are a kind of AST node, they hold continuations and\nare continuations, they are arrays, stacks, and hash tables,\nall at the same time.\n\nIn this sense, blocks have *roles*. But any block can be\nany role, and change its role as often and whenever it\nwants or needs to.","summary":"Blocks are fundamental to Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":441,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"block\""}},{"html_id":"with(array:Array(Form),leaf:Bool|Nil=nil)-class-method","name":"with","doc":"Creates and returns an orphan block with *array* being\nits tape substrate's container. See `Tape.for`.","summary":"Creates and returns an orphan block with array being its tape substrate's container.
","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"args_string":"(array : Array(Form), leaf : Bool | Nil = nil)","args_html":"(array : Array(Form), leaf : Bool | Nil = nil)","location":{"filename":"src/novika/forms/block.cr","line_number":411,"url":null},"def":{"name":"with","args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"new(parent: nil, tape: Tape.for(array), leaf: leaf.nil? ? array.includes?(Block) : leaf)"}},{"html_id":"with(form1:Form,form2:Form)-class-method","name":"with","doc":"Double-*form* optimized version of `Block.with`.","summary":"Double-form optimized version of Block.with
.
Single-form optimized version of Block.with
.
Loose equality: for two blocks to be loosely equal, their tapes and their dictionaries must be loosely equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other) : Bool","args_html":"(other) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":1136,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"return_type":"Bool","visibility":"Public","body":"if other.is_a?(self)\nelse\n return false\nend\nif same?(other)\n return true\nend\nif count == other.count\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive(:==) do\n result = true\n if has_tape? || other.has_tape?\n result && (result = tape == other.tape)\n end\n if has_dict? || other.has_dict?\n result && (result = dict == other.dict)\n end\nend\nexecuted && result\n"}},{"html_id":"a(type:T.class,_depth=0):TforallT-instance-method","name":"a","doc":"Converts this block into the given *type*. Code execution\nmay be required, hence the need for *engine*. If failed,\nsame as `Form#a`.","summary":"Converts this block into the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"args_string":"(type : T.class, _depth = 0) : T forall T","args_html":"(type : T.class, _depth = 0) : T forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1237,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"return_type":"T","visibility":"Public","body":"if self.is_a?(T)\n return self\nend\n(case T\nwhen Decimal.class\n a?(Hook.as_decimal, type, _depth)\nwhen Quote.class\n a?(Hook.as_quote, type, _depth)\nwhen Word.class\n a?(Hook.as_word, type, _depth)\nwhen Color.class\n a?(Hook.as_color, type, _depth)\nwhen Boolean.class\n a?(Hook.as_boolean, type, _depth)\nwhen QuotedWord.class\n a?(Hook.as_quoted_word, type, _depth)\nwhen Byteslice.class\n a?(Hook.as_byteslice, type, _depth)\nend) || (afail(T))\n"}},{"html_id":"add(form:Form):self-instance-method","name":"add","doc":"Adds *form* to the tape.","summary":"Adds form to the tape.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":628,"url":null},"def":{"name":"add","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"impl = ->(other : Form) do\n if other.is_a?(Block)\n self.leaf = false\n end\n self.tape = tape.add(other)\nend\nif hook = flat_at?(Hook.on_shove)\n default = Builtin.new(\"__shove__\", desc: \"( F -- ): default __shove__ implementation. Pushes Form to\\n the block it was captured in.\") do |_, stack|\n impl.call(stack.drop)\n end\n stack = Block.with(form, default)\n Engine.exhaust(Engine.current.capabilities, hook, stack)\nelse\n impl.call(form)\nend\nself\n"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a block of forms between *b* and *e*, both\ninclusive. Clamps *b* and *e* to bounds.","summary":"Returns a block of forms between b and e, both inclusive.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/block.cr","line_number":568,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"if has_tape?\nelse\n return Block.new\nend\nb = Math.max(b, 0)\ne = Math.min(e, count - 1)\nBlock.with((b..e).map do |index|\n at(index)\nend)\n"}},{"html_id":"at(name:Form,entry:Entry):self-instance-method","name":"at","doc":"Binds *name* to *entry* in this block's dictionary.","summary":"Binds name to entry in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : self","args_html":"(name : Form, entry : Entry) : self","location":{"filename":"src/novika/forms/block.cr","line_number":995,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"self","visibility":"Public","body":"tap do\n dict.set(name, entry)\nend"}},{"html_id":"at(name:Form,form:Form):self-instance-method","name":"at","doc":"Binds *name* to *form* in this block's dictionary.","summary":"Binds name to form in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form) : self","args_html":"(name : Form, form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1000,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"at(name, Entry.new(form))"}},{"html_id":"at(index:Int32):Form-instance-method","name":"at","doc":"Returns the form at *index* in the tape. Dies if *index*\nis out of bounds. See `Tape#at?`.","summary":"Returns the form at index in the tape.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : Form","args_html":"(index : Int32) : Form","location":{"filename":"src/novika/forms/block.cr","line_number":560,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"index out of bounds\")\nend\n(tape.at?(index)) || (die(\"index out of bounds\"))\n"}},{"html_id":"at(name:String,desc=\"abuiltin\",&code:Engine,Block->):self-instance-method","name":"at","doc":"Makes an `OpenEntry` called *name* for *code* wrapped\nin `Builtin`.","summary":"Makes an OpenEntry
called name for code wrapped in Builtin
.
Makes an OpenEntry
called name for code wrapped in Builtin
.
Returns the form at index, or nil.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/forms/block.cr","line_number":552,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.at?(index)\n"}},{"html_id":"befriend(other:Block):self-instance-method","name":"befriend","doc":"Adds *other* to the friendlist of this block.","summary":"Adds other to the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":747,"url":null},"def":{"name":"befriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"friends.add(other)\nself\n"}},{"html_id":"can_be?(type:T.class):BoolforallT-instance-method","name":"can_be?","doc":"Returns whether this block implements hook(s) needed\nfor behaving like *type*. See also: `a(type)`.","summary":"Returns whether this block implements hook(s) needed for behaving like type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : Bool forall T","args_html":"(type : T.class) : Bool forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1253,"url":null},"def":{"name":"can_be?","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"Bool","visibility":"Public","body":"if self.is_a?(T)\n return true\nend\ncase T\nwhen Decimal.class\n flat_has?(Hook.as_decimal)\nwhen Quote.class\n flat_has?(Hook.as_quote)\nwhen Word.class\n flat_has?(Hook.as_word)\nwhen Color.class\n flat_has?(Hook.as_color)\nwhen Boolean.class\n flat_has?(Hook.as_boolean)\nwhen QuotedWord.class\n flat_has?(Hook.as_quoted_word)\nwhen Byteslice.class\n flat_has?(Hook.as_byteslice)\nelse\n false\nend\n"}},{"html_id":"clear_entries:self-instance-method","name":"clear_entries","doc":"Removes all owned dictionary entries in this block.","summary":"Removes all owned dictionary entries in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1052,"url":null},"def":{"name":"clear_entries","return_type":"self","visibility":"Public","body":"dict.clear\nself\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of forms in this block.","summary":"Returns the amount of forms in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":526,"url":null},"def":{"name":"count","visibility":"Public","body":"has_tape? ? tape.count : 0"}},{"html_id":"cursor-instance-method","name":"cursor","doc":"Returns the cursor position in this block.","summary":"Returns the cursor position in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":521,"url":null},"def":{"name":"cursor","visibility":"Public","body":"has_tape? ? tape.cursor : 0"}},{"html_id":"delete_at(index:Int32):self-instance-method","name":"delete_at","doc":"Deletes the form at *index*. Does nothing if index is out\nof bounds.","summary":"Deletes the form at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1034,"url":null},"def":{"name":"delete_at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if delpt = tape.to?(index + 1)\nelse\n return self\nend\nif delpt.drop?\nelse\n return self\nend\nself.tape = (tape.to?(Math.min(cursor, delpt.count))).not_nil!\nself\n"}},{"html_id":"delete_entry(name:Form):self-instance-method","name":"delete_entry","doc":"Deletes the entry corresponding to *name* form from the\ndictionary of this block if it exists there. Otherwise,\ndoes nothing.","summary":"Deletes the entry corresponding to name form from the dictionary of this block if it exists there.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : self","args_html":"(name : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1045,"url":null},"def":{"name":"delete_entry","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"dict.del(name)\nself\n"}},{"html_id":"delete_if(&:Form->Bool):self-instance-method","name":"delete_if","doc":"Yields forms from left to right until the block returns `true`\nfor one, then deletes that form. If the block does not return\n`true` for any form, does nothing.","summary":"Yields forms from left to right until the block returns true
for one, then deletes that form.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/block.cr","line_number":437,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << (prototype.comment? || \"a block\")"}},{"html_id":"describe_with?(comment:String,force=false):String|Nil-instance-method","name":"describe_with?","doc":"Sets the block comment of this block to *comment* in\ncase it doesn't have a comment already.\n\nSetting the comment can also be forced by making *force* true.","summary":"Sets the block comment of this block to comment in case it doesn't have a comment already.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"args_string":"(comment : String, force = false) : String | Nil","args_html":"(comment : String, force = false) : String | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":463,"url":null},"def":{"name":"describe_with?","args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"return_type":"String | ::Nil","visibility":"Public","body":"if force || (!comment?)\n @comment = dedent(comment)\nend"}},{"html_id":"drop:Form-instance-method","name":"drop","doc":"Removes and returns the top form. Dies if none.","summary":"Removes and returns the top form.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":695,"url":null},"def":{"name":"drop","return_type":"Form","visibility":"Public","body":"impl = -> do\n top.tap do\n self.tape = tape.drop? || (raise(\"unreachable\"))\n end\nend\nif hook = flat_at?(Hook.on_cherry)\n default = Builtin.new(\"__cherry__\", desc: \"( -- ): default __cherry__ implementation.\") do\n impl.call\n end\n stack = Block.with(default)\n (Engine.exhaust(Engine.current.capabilities, hook, stack)).top\nelse\n impl.call\nend\n"}},{"html_id":"dupe:self-instance-method","name":"dupe","doc":"Duplicates the form before the cursor, dies if none.","summary":"Duplicates the form before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":673,"url":null},"def":{"name":"dupe","return_type":"self","visibility":"Public","body":"add(top)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields all forms in this block, *going from left to right*.","summary":"Yields all forms in this block, going from left to right.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":536,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.each do |form|\n yield form\nend\n"}},{"html_id":"each_entry(&)-instance-method","name":"each_entry","doc":"Yields entry names and `Entry` objects from the dictionary\nof this block.","summary":"Yields entry names and Entry
objects from the dictionary of this block.
Yields entry name forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":908,"url":null},"def":{"name":"each_entry_name","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |name, _|\n yield name\nend"}},{"html_id":"each_entry_value(&)-instance-method","name":"each_entry_value","doc":"Yields entry value forms in this block's dictionary.","summary":"Yields entry value forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":915,"url":null},"def":{"name":"each_entry_value","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |_, entry|\n yield entry.form\nend"}},{"html_id":"each_friend(&)-instance-method","name":"each_friend","doc":"Yields friends of this block. Asserts each is a block,\notherwise, dies (e.g. the user may have mistakenly\nadded some other form).","summary":"Yields friends of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":735,"url":null},"def":{"name":"each_friend","yields":1,"block_arity":1,"visibility":"Public","body":"if has_friends?\nelse\n return\nend\nfriends.reverse_each do |friend|\n if friend.is_a?(Block)\n else\n die(\"expected a block, got #{friend.class.typedesc} for a friend\")\n end\n yield friend\nend\n"}},{"html_id":"each_neighbor(payload:Block->T|Nil,visited:BlockIdMap|Nil=nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","args_html":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":856,"url":null},"def":{"name":"each_neighbor","args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"visibility":"Public","body":"each do |form|\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\nif has_dict?\nelse\n return\nend\ndict.each do |_, entry|\n form = entry.form\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\n"}},{"html_id":"each_neighbor(visited:BlockIdMap|Nil=nil,&payload:Block->T|Nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","args_html":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":893,"url":null},"def":{"name":"each_neighbor","args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"yields":1,"block_arity":1,"block_arg":{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},"visibility":"Public","body":"each_neighbor(payload, visited)"}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* found in this\nblock. Matching is done using loose equality `==(other)`.","summary":"Yields occurrences of the given pattern found in this block.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/block.cr","line_number":1159,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\neach do |form|\n if pattern == form\n yield index\n end\n index = index + 1\nend\n"}},{"html_id":"each_relative_fetch(fetcher:Block->T|Nil,seen:BlockIdMap|Nil=nil,skip_self:Bool=false,history:Block|Nil=nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"args_string":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","args_html":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":792,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"return_type":"T | ::Nil","visibility":"Public","body":"if skip_self && (!has_relatives?)\n return\nend\nif history\nelse\n v0 = skip_self ? nil : self\n ilist = PIlist.make(self)\n ilist.each(v0) do |fastpath|\n if value = fetcher.call(fastpath)\n else\n next\n end\n return value\n end\nend\nacquired = seen.nil?\nseen || (seen = BlockMaps.acquire)\nbegin\n fetch = EachRelativeFetch.new(fetcher, seen, history)\n fetch.on(self, ignore: ilist)\nensure\n if acquired\n BlockMaps.release(seen)\n end\nend\n"}},{"html_id":"each_relative_fetch(*args,**kwargs,&fetcher:Block->T|Nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","args_html":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":827,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"block_arg":{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},"return_type":"T | ::Nil","visibility":"Public","body":"each_relative_fetch(fetcher, *args, **kwargs)"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1273,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << (prototype.comment? =~ EFFECT_PATTERN ? $~[1] : \"a block\")"}},{"html_id":"eject:Form-instance-method","name":"eject","doc":"Drops and returns the form after the cursor. Dies if\ncursor is at the end.","summary":"Drops and returns the form after the cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":612,"url":null},"def":{"name":"eject","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"eject out of bounds\")\nend\nself.tape, _ = tape.eject? || (die(\"eject out of bounds\"))\n"}},{"html_id":"entry_count-instance-method","name":"entry_count","doc":"Returns the amount of entries owned by (defined in) this block.","summary":"Returns the amount of entries owned by (defined in) this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":531,"url":null},"def":{"name":"entry_count","visibility":"Public","body":"has_dict? ? dict.count : 0"}},{"html_id":"entry_for(name:Form):Entry-instance-method","name":"entry_for","doc":"Returns the dictionary entry for *name*, or dies.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or dies.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry","args_html":"(name : Form) : Entry","location":{"filename":"src/novika/forms/block.cr","line_number":942,"url":null},"def":{"name":"entry_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry","visibility":"Public","body":"(entry_for?(name)) || (die(\"no value form for '#{name}'\"))"}},{"html_id":"entry_for?(name:Form):Entry|Nil-instance-method","name":"entry_for?","doc":"Returns the dictionary entry for *name*, or nil.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or nil.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":950,"url":null},"def":{"name":"entry_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if entry = flat_at?(name)\n return entry\nend\neach_relative_fetch(skip_self: true, &.flat_at?(name))\n"}},{"html_id":"flat_at?(name:Form):Entry|Nil-instance-method","name":"flat_at?","doc":"Returns the dictionary entry corresponding to *name*.\nDoes not traverse the block hierarchy.","summary":"Returns the dictionary entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":980,"url":null},"def":{"name":"flat_at?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if has_dict?\nelse\n return\nend\ndict.get(name) do\nend\n"}},{"html_id":"flat_has?(name:Form):Bool-instance-method","name":"flat_has?","doc":"Returns whether this block's (and this block's only)\ndictionary has an entry corresponding to *name*.","summary":"Returns whether this block's (and this block's only) dictionary has an entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":988,"url":null},"def":{"name":"flat_has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"if has_dict?\nelse\n return false\nend\ndict.has?(name)\n"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":962,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"(entry_for?(name)).try(&.form)"}},{"html_id":"has_comment?:Bool-instance-method","name":"has_comment?","doc":"Returns whether this block has a comment.","summary":"Returns whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":455,"url":null},"def":{"name":"has_comment?","return_type":"Bool","visibility":"Public","body":"!(!comment?)"}},{"html_id":"has_dict?:Bool-instance-method","name":"has_dict?","doc":"Returns whether this block has a dict.","summary":"Returns whether this block has a dict.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":372,"url":null},"def":{"name":"has_dict?","return_type":"Bool","visibility":"Public","body":"!(!@dict)"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":958,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(!each_relative_fetch do |block|\n (block.flat_has?(name)) || nil\nend)"}},{"html_id":"has_friends?:Bool-instance-method","name":"has_friends?","doc":"Returns whether this block has any friends.","summary":"Returns whether this block has any friends.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":723,"url":null},"def":{"name":"has_friends?","return_type":"Bool","visibility":"Public","body":"(!(!@friends)) && (!friends.count.zero?)"}},{"html_id":"has_relatives?:Bool-instance-method","name":"has_relatives?","doc":"Returns whether this block has a parent, friends, or both.","summary":"Returns whether this block has a parent, friends, or both.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":728,"url":null},"def":{"name":"has_relatives?","return_type":"Bool","visibility":"Public","body":"(!(!parent?)) || has_friends?"}},{"html_id":"has_tape?:Bool-instance-method","name":"has_tape?","doc":"Returns whether this block has a tape.","summary":"Returns whether this block has a tape.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":361,"url":null},"def":{"name":"has_tape?","return_type":"Bool","visibility":"Public","body":"!(!@tape)"}},{"html_id":"import!(fromdonor:Block):self-instance-method","name":"import!","doc":"Imports entries from *donor* to this block's dictionary\nby mutating this block's dictionary.","summary":"Imports entries from donor to this block's dictionary by mutating this block's dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"from","restriction":"Block"}],"args_string":"(from donor : Block) : self","args_html":"(from donor : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":578,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"from","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"dict.import!(donor.dict)\nself\n"}},{"html_id":"includes?(other:Form):Bool-instance-method","name":"includes?","doc":"Returns whether the tape of this block includes *other*,\nas per loose equality `==(other)`.","summary":"Returns whether the tape of this block includes other, as per loose equality #==(other)
.
Adds form after the cursor.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":605,"url":null},"def":{"name":"inject","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"self.tape = tape.inject(form)\nself\n"}},{"html_id":"instance(parentnew_parent:Block=self,shallow=false,__tr:BlockIdMap|Nil=nil):Block-instance-method","name":"instance","doc":"Creates and returns an instance of this block, under the\ngiven *parent*.","summary":"Creates and returns an instance of this block, under the given parent.
","abstract":false,"args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"args_string":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","args_html":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","location":{"filename":"src/novika/forms/block.cr","line_number":1169,"url":null},"def":{"name":"instance","args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"return_type":"Block","visibility":"Public","body":"copy = self.class.new(parent: new_parent, tape: has_tape? ? tape.copy : nil, prototype: prototype)\nif leaf? || shallow\n return copy\nend\n__tr || (__tr = BlockIdMap.new)\n__tr[object_id] = copy\ncopy.tape = copy.tape.map! do |form|\n if form.is_a?(Block)\n else\n next\n end\n __tr[form.object_id]? || (form.instance(same?(form.parent?) ? copy : form, __tr: __tr))\nend\ncopy.leaf = false\ncopy\n"}},{"html_id":"next?:Form|Nil-instance-method","name":"next?","doc":"See `Tape#next?`.","summary":"See Tape#next?
.
Schedules this block for execution in engine using the safe scheduling method (see Engine#schedule
).
Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":970,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"(entry_for(name)).opener?"}},{"html_id":"parent:Block|Nil-instance-method","name":"parent","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent","return_type":"Block | ::Nil","visibility":"Public","body":"if (value = @parent).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#parent cannot be nil\"))\nelse\n value\nend"}},{"html_id":"parent=(parent:Block|Nil)-instance-method","name":"parent=","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil)","args_html":"(parent : Block | Nil)","location":{"filename":"src/novika/forms/block.cr","line_number":388,"url":null},"def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"parent?:Block|Nil|Nil-instance-method","name":"parent?","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent?","return_type":"Block | ::Nil | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"paste(forms:Block)-instance-method","name":"paste","doc":"Mutably adds forms before the cursor in *forms* block's\ntape after the cursor in this block's tape.","summary":"Mutably adds forms before the cursor in forms block's tape after the cursor in this block's tape.
","abstract":false,"args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"args_string":"(forms : Block)","args_html":"(forms : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":654,"url":null},"def":{"name":"paste","args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"visibility":"Public","body":"if forms.count.zero?\n return\nend\nself.tape = tape.paste(forms.tape)\n"}},{"html_id":"path_to_entry?(name:Form):Tuple(Entry,Block)|Nil-instance-method","name":"path_to_entry?","doc":"Returns a tuple that consists of the dictionary entry\ncorresponding to *name*, followed by the path block which\nholds all blocks leading to the entry.\n\nReturns nil if *name* could not be found.\n\nIn general works like `entry_for` and friends, the only\ndifference being that it also tracks and returns the path.\nThe latter makes this method slightly slower that `entry_for`.","summary":"Returns a tuple that consists of the dictionary entry corresponding to name, followed by the path block which holds all blocks leading to the entry.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Tuple(Entry, Block) | Nil","args_html":"(name : Form) : Tuple(Entry, Block) | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":930,"url":null},"def":{"name":"path_to_entry?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"::Tuple(Entry, Block) | ::Nil","visibility":"Public","body":"path = Block.new\nif entry = each_relative_fetch(history: path, &.flat_at?(name))\nelse\n return\nend\n{entry, path}\n"}},{"html_id":"prototype:Block-instance-method","name":"prototype","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype","return_type":"Block","visibility":"Public","body":"if (value = @prototype).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#prototype cannot be nil\"))\nelse\n value\nend"}},{"html_id":"prototype=(prototype:Block)-instance-method","name":"prototype=","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"args_string":"(prototype : Block)","args_html":"(prototype : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":392,"url":null},"def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"prototype?:Block|Nil-instance-method","name":"prototype?","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype?","return_type":"Block | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":974,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(opener?(name))"}},{"html_id":"resub(other:Block):self-instance-method","name":"resub","doc":"Replaces this block's tape with *other*'s.","summary":"Replaces this block's tape with other's.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1105,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"self.tape = has_tape? ? tape.resub(other.tape) : Tape.new(other.tape.substrate)\nself\n"}},{"html_id":"reverse_each(&)-instance-method","name":"reverse_each","doc":"Yields all forms in this block, *going from right to left*.","summary":"Yields all forms in this block, going from right to left.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":543,"url":null},"def":{"name":"reverse_each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\n(0...tape.count).reverse_each do |index|\n yield tape.at!(index)\nend\n"}},{"html_id":"schedule(engine:Engine,stack:Block):self-instance-method","name":"schedule","doc":"Schedules an instance of this block for execution, with *stack*\nset as the stack that will be used by the instance during\nexecution.\n\nMoves the cursor of the instance before the first form\nso that the entire block will be executed by *engine*.","summary":"Schedules an instance of this block for execution, with stack set as the stack that will be used by the instance during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1087,"url":null},"def":{"name":"schedule","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\ninstance.schedule!(engine, stack)\nself\n"}},{"html_id":"schedule!(engine:Engine,stack:Block):self-instance-method","name":"schedule!","doc":"Schedules this block for execution, with *stack* set as the\nstack that will be used by this block during execution.\n\nMoves the cursor before the first form so that the entire\nblock will be executed by *engine*.","summary":"Schedules this block for execution, with stack set as the stack that will be used by this block during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1073,"url":null},"def":{"name":"schedule!","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\nengine.schedule!(stack: stack, block: to(0))\nself\n"}},{"html_id":"shallow:Block-instance-method","name":"shallow","doc":"Returns a shallow copy of this block.","summary":"Returns a shallow copy of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1096,"url":null},"def":{"name":"shallow","return_type":"Block","visibility":"Public","body":"self.class.new(parent: parent?, tape: has_tape? ? tape.copy : nil, dict: has_dict? ? dict.copy : nil, prototype: prototype)"}},{"html_id":"slice:Tuple(Block,Block)-instance-method","name":"slice","doc":"Slices this block at cursor. This results in two halves,\nwhich are consequently returned.","summary":"Slices this block at cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":685,"url":null},"def":{"name":"slice","return_type":"::Tuple(Block, Block)","visibility":"Public","body":"if has_tape?\nelse\n return {Block.new(parent: self), Block.new(parent: self)}\nend\nlhs, rhs = tape.slice\n{Block.new(parent: self, tape: lhs), Block.new(parent: self, tape: rhs)}\n"}},{"html_id":"slurp(source:String):self-instance-method","name":"slurp","doc":"Parses all forms in string *source*, and adds them to\nthis block.","summary":"Parses all forms in string source, and adds them to this block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String) : self","args_html":"(source : String) : self","location":{"filename":"src/novika/forms/block.cr","line_number":508,"url":null},"def":{"name":"slurp","args":[{"name":"source","external_name":"source","restriction":"String"}],"return_type":"self","visibility":"Public","body":"classifier = Classifier.new(source, block: self)\nScissors.cut(source) do |start, count, dot|\n classifier.classify(start, count, dot)\nend\nclassifier.end\nself\n"}},{"html_id":"sort_using!(&cmp:Form,Form->Int32):self-instance-method","name":"sort_using!","doc":"Sorts this block's tape inplace, calls *cmp* comparator proc\nfor each form pair for a comparison integer -1, 0, or 1.","summary":"Sorts this block's tape inplace, calls cmp comparator proc for each form pair for a comparison integer -1, 0, or 1.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":715,"url":null},"def":{"name":"sort_using!","yields":2,"block_arity":2,"block_arg":{"name":"cmp","external_name":"cmp","restriction":"(Form, Form -> Int32)"},"return_type":"self","visibility":"Public","body":"if has_tape?\nelse\n return self\nend\nself.tape = tape.sort_using!(cmp)\nself\n"}},{"html_id":"spot(io,vicinity=10,colorful=true)-instance-method","name":"spot","doc":"Appends a string representation of this block to *io* in\nwhich only forms in the negative and positive *vicinity*\nof this block's cursor are present, and the word before\nthe cursor is emphasized.\n\nDoes not respect `MAX_COUNT_TO_S`. Does not display quotes.\nDoes not display nested blocks.","summary":"Appends a string representation of this block to io in which only forms in the negative and positive vicinity of this block's cursor are present, and the word before the cursor is emphasized.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"args_string":"(io, vicinity = 10, colorful = true)","args_html":"(io, vicinity = 10, colorful = true)","location":{"filename":"src/novika/forms/block.cr","line_number":1284,"url":null},"def":{"name":"spot","args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"visibility":"Public","body":"io << \"[\"\nb = (cursor - vicinity).clamp(0..(count - 1))\ne = (cursor + vicinity).clamp(0..(count - 1))\n(b..e).each do |index|\n form = at(index)\n focus = index == (cursor - 1)\n (Colorize.with.bold.toggle(focus && colorful)).surround(io) do\n case form\n when Block\n io << \" […]\"\n when Quote\n io << \" '…'\"\n else\n (io << \" \") << form\n end\n end\n if focus\n io << (\" |\".colorize.toggle(colorful)).red\n end\nend\nio << \" ]\"\n"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/block.cr","line_number":966,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(entry_for?(name)).try(&.submit(form))"}},{"html_id":"swap:self-instance-method","name":"swap","doc":"Swaps two forms before the cursor, dies if none.","summary":"Swaps two forms before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":678,"url":null},"def":{"name":"swap","return_type":"self","visibility":"Public","body":"self.tape = tape.swap? || (die(\"at least two forms required before the cursor\"))\nself\n"}},{"html_id":"thru:Form-instance-method","name":"thru","doc":"Returns form after cursor, and moves cursor past it.\n\nSimilar to `eject`, but doesn't modify the block.","summary":"Returns form after cursor, and moves cursor past it.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":621,"url":null},"def":{"name":"thru","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"thru out of bounds\")\nend\nself.tape, _ = tape.thru? || (die(\"thru out of bounds\"))\n"}},{"html_id":"to(index:Int32):self-instance-method","name":"to","doc":"Moves tape cursor to *index*. Dies if *index* is out\nof bounds. See `Tape#to?`.","summary":"Moves tape cursor to index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":593,"url":null},"def":{"name":"to","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if (!has_tape?) && index.zero?\n return self\nend\nif has_tape?\nelse\n die(\"cursor index out of bounds\")\nend\nself.tape = (tape.to?(index)) || (die(\"cursor index out of bounds\"))\nself\n"}},{"html_id":"to_dict_block:Block-instance-method","name":"to_dict_block","doc":"Builds and returns a dictionary block for this block.\n\nDictionary block is an *orphan* block whose dictionary is a shallow\ncopy of this block's dictionary; and whose tape is empty.","summary":"Builds and returns a dictionary block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1122,"url":null},"def":{"name":"to_dict_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, dict: has_dict? ? dict.copy : nil)"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1269,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"(a?(Hook.as_quote, Quote)) || super()"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1309,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if repr = a?(Hook.as_quote, Quote)\n io << repr.string\n return\nend\nexecuted = exec_recursive(:to_s) do\n io << \"[\"\n if has_tape? && (!tape.empty?)\n (0...cursor).each do |index|\n (io << \" \") << (at(index))\n end\n if cursor == count\n else\n io << \" |\"\n (cursor...count).each do |index|\n (io << \" \") << (at(index))\n end\n end\n end\n if has_dict? && (!dict.empty?)\n io << \" ·\"\n dict.each do |name, entry|\n ((((io << \" \") << (entry.opener? ? \"@\" : \"$\")) << \"{\") << name) << \" :: \"\n entry.effect(io)\n io << \"}\"\n end\n end\n io << \" ]\"\nend\nif executed\nelse\n io << \"⭮\"\nend\n"}},{"html_id":"to_tape_block:Block-instance-method","name":"to_tape_block","doc":"Builds and returns a tape block for this block.\n\nTape block is an *orphan* block whose tape is a shallow copy\nof this block's tape; and whose dictionary is empty.","summary":"Builds and returns a tape block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1114,"url":null},"def":{"name":"to_tape_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, tape: has_tape? ? tape.copy : nil, leaf: leaf?)"}},{"html_id":"top:Form-instance-method","name":"top","doc":"Returns the top form, dies if none.","summary":"Returns the top form, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":661,"url":null},"def":{"name":"top","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"no top for block\")\nend\ntop? || (die(\"no top for block\"))\n"}},{"html_id":"top?:Form|Nil-instance-method","name":"top?","doc":"Returns the top form, or nil if none.","summary":"Returns the top form, or nil if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":668,"url":null},"def":{"name":"top?","return_type":"Form | ::Nil","visibility":"Public","body":"tape.top?"}},{"html_id":"unfriend(other:Block):self-instance-method","name":"unfriend","doc":"Removes *other* from the friendlist of this block.","summary":"Removes other from the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":754,"url":null},"def":{"name":"unfriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if has_friends?\nelse\n return self\nend\nfriends.delete_if do |friend|\n friend.is_a?(Block) && (friend.same?(other))\nend\nself\n"}}]},{"html_id":"novika/Novika/BlockIdMap","path":"Novika/BlockIdMap.html","kind":"alias","full_name":"Novika::BlockIdMap","name":"BlockIdMap","abstract":false,"locations":[{"filename":"src/novika/forms/block.cr","line_number":327,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Hash(UInt64, Novika::Block)","aliased_html":"Hash(UInt64, Novika::Block)","const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Maps block unique identifiers (currently, object ids are used as\nsuch) to blocks they identify.\n\nUsed instead of Sets for forcing identity-based lookup rather\nthan hash-based lookup.","summary":"Maps block unique identifiers (currently, object ids are used as such) to blocks they identify.
"},{"html_id":"novika/Novika/BlockPool","path":"Novika/BlockPool.html","kind":"class","full_name":"Novika::BlockPool","name":"BlockPool","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":549,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Creates a block pool by exploring the given pivot block's hierarchy, forms, etc.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"args_string":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","args_html":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","location":{"filename":"src/novika/image.cr","line_number":777,"url":null},"def":{"name":"new","args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"visibility":"Public","body":"pool = new\nvisitor = BlockVisitor.new(caps.block, mode)\nvisitor.enter(pivot)\npool.cb = caps.block.object_id\npool.pivot = pivot.object_id\npool.blocks = visitor.blocks\npool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":550,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"blocks:Array(FrozenBlock)-instance-method","name":"blocks","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"def":{"name":"blocks","return_type":"Array(FrozenBlock)","visibility":"Public","body":"@blocks"}},{"html_id":"blocks=(blocks:Array(FrozenBlock))-instance-method","name":"blocks=","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"args_string":"(blocks : Array(FrozenBlock))","args_html":"(blocks : Array(FrozenBlock))","def":{"name":"blocks=","args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"visibility":"Public","body":"@blocks = blocks"}},{"html_id":"cb:UInt64-instance-method","name":"cb","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"def":{"name":"cb","return_type":"UInt64","visibility":"Public","body":"@cb"}},{"html_id":"cb=(cb:UInt64)-instance-method","name":"cb=","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"args_string":"(cb : UInt64)","args_html":"(cb : UInt64)","def":{"name":"cb=","args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"visibility":"Public","body":"@cb = cb"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"pivot:UInt64-instance-method","name":"pivot","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"def":{"name":"pivot","return_type":"UInt64","visibility":"Public","body":"@pivot"}},{"html_id":"pivot=(pivot:UInt64)-instance-method","name":"pivot=","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"args_string":"(pivot : UInt64)","args_html":"(pivot : UInt64)","def":{"name":"pivot=","args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"visibility":"Public","body":"@pivot = pivot"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs (melts if necessary) the pivot block, its\nblock hierarchy, its forms etc. Returns the resulting\n`Block` form.","summary":"Reconstructs (melts if necessary) the pivot block, its block hierarchy, its forms etc.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":764,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"assembler = BlockAssembler.new(blocks, caps.block)\nassembler.resolve!(cb, caps.block)\nassembler.fetch(pivot)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Represents a boolean (true/false) value.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/boolean.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"boolean\""}}],"constructors":[{"html_id":"[](object):Boolean-class-method","name":"[]","doc":"Creates a `Boolean` subclass for the given *object*.","summary":"Creates a Boolean
subclass for the given object.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Snapshot of a boolean form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BooleanSnapshot]","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 0, cls: Novika::BooleanSnapshot, onlyif: nil, verify: nil}] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Boolean)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"args_string":"(form : Boolean)","args_html":"(form : Boolean)","location":{"filename":"src/novika/image.cr","line_number":85,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"visibility":"Public","body":"bool = new\nbool.state = form.is_a?(True)\nbool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":73,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"state:Bool-instance-method","name":"state","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state","return_type":"Bool","visibility":"Public","body":"@state == 1"}},{"html_id":"state=(state:UInt8)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"args_string":"(state : UInt8)","args_html":"(state : UInt8)","def":{"name":"state=","args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"visibility":"Public","body":"@state = state"}},{"html_id":"state=(value:Bool)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@state = UInt8.new(value ? 1 : 0)"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":81,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Boolean[state]"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Builtin","path":"Novika/Builtin.html","kind":"struct","full_name":"Novika::Builtin","name":"Builtin","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/builtin.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Wraps a snippet of Crystal (native) code, namely a Crystal\n`Proc`, for usage in the Novika-land.","summary":"Wraps a snippet of Crystal (native) code, namely a Crystal Proc
, for usage in the Novika-land.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/builtin.cr","line_number":20,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << @desc"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":33,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@desc =~ EFFECT_PATTERN ? (io << $~[1]) : \"native code\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the identifier of this builtin.
","abstract":false,"location":{"filename":"src/novika/forms/builtin.cr","line_number":9,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/builtin.cr","line_number":28,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"code.call(engine, engine.stack)\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":37,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[native code for: '\") << id) << \"']\""}}]},{"html_id":"novika/Novika/BuiltinSnapshot","path":"Novika/BuiltinSnapshot.html","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BuiltinSnapshot]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Builtin)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"args_string":"(form : Builtin)","args_html":"(form : Builtin)","location":{"filename":"src/novika/image.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"visibility":"Public","body":"builtin = new\nbuiltin.id = form.id\nbuiltin\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":246,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":252,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"assembler.cb.form_for(Novika::Word.new(id))"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Byteslice","path":"Novika/Byteslice.html","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/byteslice.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DEFAULT_PREVIEW","name":"DEFAULT_PREVIEW","value":"\"byteslice\"","doc":"Holds the default preview string for byteslices.","summary":"Holds the default preview string for byteslices.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":23,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"byteslice\""}}],"constructors":[{"html_id":"new(bytes:Bytes,preview:String=DEFAULT_PREVIEW,mutable:Bool=true)-class-method","name":"new","doc":"Initializes a byteslice from *bytes*.","summary":"Initializes a byteslice from bytes.
","abstract":false,"args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"args_string":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","args_html":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":15,"url":null},"def":{"name":"new","args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(bytes, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(io:IO,preview=DEFAULT_PREVIEW,mutable=true)-class-method","name":"new","doc":"Initializes a byteslice form from the given *io*.","summary":"Initializes a byteslice form from the given io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"args_string":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","args_html":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":19,"url":null},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(io, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(&)-class-method","name":"new","doc":"Yields an IO to the block, then returns a raw bytes\nform for it.","summary":"Yields an IO to the block, then returns a raw bytes form for it.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":82,"url":null},"def":{"name":"new","yields":1,"block_arity":1,"visibility":"Public","body":"io = IO::Memory.new\nyield io\nnew(io)\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @bytes == (other.@bytes)\nelse\n return false\nend\nif @mutable == (other.@mutable)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address-instance-method","name":"address","doc":"Returns the memory address where this byteslice points to.","summary":"Returns the memory address where this byteslice points to.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":66,"url":null},"def":{"name":"address","visibility":"Public","body":"@bytes.to_unsafe.address"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a sub-slice starting at *b*-th byte, and\nending at *e*-th byte.\n\nThe resulting byteslice *does not* preserve the\npreview string of this byteslice.","summary":"Returns a sub-slice starting at b-th byte, and ending at e-th byte.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":39,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nByteslice.new(@bytes[b..e], mutable: @mutable)\n"}},{"html_id":"at(index:Int32)-instance-method","name":"at","doc":"Returns the *index*-th byte.","summary":"Returns the index-th byte.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":28,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"byte = @bytes[index]? || (die(\"index out of bounds\"))\nDecimal.new(byte)\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of bytes in this byteslice.","summary":"Returns the amount of bytes in this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":46,"url":null},"def":{"name":"count","visibility":"Public","body":"@bytes.size"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":50,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @bytes.hash(hasher)\nhasher = @mutable.hash(hasher)\nhasher\n"}},{"html_id":"mutable?:Bool-instance-method","name":"mutable?","doc":"Returns whether this byteslice is mutable.","summary":"Returns whether this byteslice is mutable.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":12,"url":null},"def":{"name":"mutable?","return_type":"Bool","visibility":"Public","body":"@mutable"}},{"html_id":"points_to?(address:UInt64)-instance-method","name":"points_to?","doc":"Returns whether this byteslice points to the given *address*.","summary":"Returns whether this byteslice points to the given address.
","abstract":false,"args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"args_string":"(address : UInt64)","args_html":"(address : UInt64)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":89,"url":null},"def":{"name":"points_to?","args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"visibility":"Public","body":"address == self.address"}},{"html_id":"preview:String-instance-method","name":"preview","doc":"Returns the preview string of this byteslice.","summary":"Returns the preview string of this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":9,"url":null},"def":{"name":"preview","return_type":"String","visibility":"Public","body":"@preview"}},{"html_id":"same?(other:Byteslice)-instance-method","name":"same?","doc":"Returns whether this and *other* byteslices point to the same\nlocation in memory, and have the same mutability status.","summary":"Returns whether this and other byteslices point to the same location in memory, and have the same mutability status.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"args_string":"(other : Byteslice)","args_html":"(other : Byteslice)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":95,"url":null},"def":{"name":"same?","args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"visibility":"Public","body":"(other.points_to?(address)) && (@mutable == other.mutable?)"}},{"html_id":"to_io:IO::Memory-instance-method","name":"to_io","doc":"Wraps the underlying byte slice in an IO.","summary":"Wraps the underlying byte slice in an IO.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":71,"url":null},"def":{"name":"to_io","return_type":"IO::Memory","visibility":"Public","body":"IO::Memory.new(@bytes)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":54,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"[\") << @preview) << \", consists of \") << count) << \" \"\nio << (@mutable ? \"mutable\" : \"immutable\")\nio << \" byte(s)]\"\n"}},{"html_id":"to_unsafe:Bytes-instance-method","name":"to_unsafe","doc":"Returns the underlying byte slice.","summary":"Returns the underlying byte slice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":61,"url":null},"def":{"name":"to_unsafe","return_type":"Bytes","visibility":"Public","body":"@bytes"}},{"html_id":"write_to(io:IO)-instance-method","name":"write_to","doc":"Writes this byteslice to *io*.","summary":"Writes this byteslice to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":76,"url":null},"def":{"name":"write_to","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io.write(@bytes)"}}]},{"html_id":"novika/Novika/BytesliceSnapshot","path":"Novika/BytesliceSnapshot.html","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":268,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BytesliceSnapshot]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.size\nend}, {type: \"bytes\", name: content, cls: Bytes, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Byteslice)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"args_string":"(form : Byteslice)","args_html":"(form : Byteslice)","location":{"filename":"src/novika/image.cr","line_number":278,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"visibility":"Public","body":"byteslice = new\nbyteslice.content = form.to_unsafe\nbyteslice\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":269,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"content:Bytes-instance-method","name":"content","abstract":false,"def":{"name":"content","return_type":"Bytes","visibility":"Public","body":"@content"}},{"html_id":"content=(content:Bytes)-instance-method","name":"content=","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"args_string":"(content : Bytes)","args_html":"(content : Bytes)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"visibility":"Public","body":"@content = content"}},{"html_id":"count:UInt64-instance-method","name":"count","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":274,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Byteslice.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Capabilities","path":"Novika/Capabilities.html","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities","abstract":false,"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/disk.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/ink.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/system.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Capabilities/IConsole","path":"Novika/Capabilities/IConsole.html","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"BG_DEFAULT","name":"BG_DEFAULT","value":"Color.new(Decimal.new(0), Decimal.new(0), Decimal.new(0))","doc":"Background color used when there is no user-provided\nbackground color.","summary":"Background color used when there is no user-provided background color.
"},{"id":"FG_DEFAULT","name":"FG_DEFAULT","value":"Color.new(Decimal.new(255), Decimal.new(255), Decimal.new(255))","doc":"Foreground color used when there is no user-provided\nforeground color.","summary":"Foreground color used when there is no user-provided foreground color.
"}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Console","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables the console API.\n\nExposed vocabulary:\n\n* `console:on`, implemented by `on`\n* `console:off`, implemented by `off`\n* `console:256`, implemented by `colors_256`\n* `console:compat`, implemented by `colors_compat`\n* `console:truecolor`, implemented by `colors_truecolor`\n* `console:readKey`, implemented by `read_key`\n* `console:size`, implemented by `size`\n* `console:hadKeyPressed?`, implemented by `had_key_pressed?`\n* `console:hadCtrlPressed?`, implemented by `had_ctrl_pressed?`\n* `console:hadAltPressed?`, implemented by `had_alt_pressed?`\n* `console:hadShiftPressed?`, implemented by `had_shift_pressed?`\n* `console:hadBackspacePressed?`, implemented by `had_backspace_pressed?`\n* `console:hadFnPressed?`, implemented by `had_fn_pressed?`\n* `console:hadInsertPressed?`, implemented by `had_insert_pressed?`\n* `console:hadDeletePressed?`, implemented by `had_delete_pressed?`\n* `console:hadHomePressed?`, implemented by `had_home_pressed?`\n* `console:hadEndPressed?`, implemented by `had_end_pressed?`\n* `console:hadPgupPressed?`, implemented by `had_pgup_pressed?`\n* `console:hadPgdnPressed?`, implemented by `had_pgdn_pressed?`\n* `console:hadLeftPressed?`, implemented by `had_left_pressed?`\n* `console:hadRightPressed?`, implemented by `had_right_pressed?`\n* `console:hadUpPressed?`, implemented by `had_up_pressed?`\n* `console:hadDownPressed?`, implemented by `had_down_pressed?`\n* `console:getCharPressed`, implemented by `get_char_pressed`\n* `console:change`, implemented by `change`\n* `console:appendEcho`, implemented by `append_echo`\n* `console:present`, implemented by `present`\n* `console:clear`, implemented by `clear`","summary":"Enables the console API.
","class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":45,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"console\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":53,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":49,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"enables the console API\""}}],"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/console.cr","line_number":152,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"bg-instance-method","name":"bg","doc":"Returns the active primary background color.","summary":"Returns the active primary background color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":168,"url":null},"def":{"name":"bg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg1|\n __arg1.bg.last?\nend) || BG_DEFAULT"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/console.cr","line_number":158,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":""}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":64,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":67,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":70,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"fg-instance-method","name":"fg","doc":"Returns the active primary foreground color.","summary":"Returns the active primary foreground color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":163,"url":null},"def":{"name":"fg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg0|\n __arg0.fg.last?\nend) || FG_DEFAULT"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/console.cr","line_number":147,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":95,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":101,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":139,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":92,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":110,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":134,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":116,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":104,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":113,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":107,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":89,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":125,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":122,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":119,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":128,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":98,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":131,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/console.cr","line_number":172,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"console:on\", \"( -- ): enables the console. Must be called before using\\n any other console-related word.\") do |engine|\n on(engine)\nend\ntarget.at(\"console:off\", \"( -- ): disables the console. Must be called at the end\\n of your program or when you don't need console anymore.\") do |engine|\n off(engine)\nend\ntarget.at(\"console:compat\", \"( -- ): enables the compatibility color output mode. In\\n this mode, only 8 colors are available. All RGB colors\\n are automatically reduced to one of those 8 colors.\") do |engine|\n colors_compat(engine)\nend\ntarget.at(\"console:256\", \"( -- ): enables the 256-color output mode. In this mode,\\n 256 colors are available. All RGB colors are automatically\\n reduced to one of those 256 colors.\") do |engine|\n colors_256(engine)\nend\ntarget.at(\"console:truecolor\", \"( -- ): enables the truecolor output mode. In this mode,\\nall colors are available and are passed to the console\\nas-is.\") do |engine|\n colors_truecolor(engine)\nend\ntarget.at(\"console:size\", \"( -- Cw Ch ): leaves the Console width (in columns) and\\n Console height (in rows).\") do |engine, stack|\n w, h = size(engine)\n w.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"console:setTimeout\", \"( D -- ): sets input timeout to Duration, given in *milliseconds*.\\n\\n * If Duration is negative, `console:readKey` will wait\\n for input indefinitely (i.e., until there is input).\\n\\n * If Duration is zero, `console:readKey` won't wait for\\n input at all, but make note if there is any at the moment.\\n\\n * If Duration is positive, `console:readKey` will peek\\n during the timeout window.\") do |_, stack|\n @timeout = stack.drop.a(Decimal)\nend\ntarget.at(\"console:readKey\", \"( -- ): peeks or waits for input. See `console:setTimeout`.\\n Refreshes the input state. Use `console:hadKeyPressed` and\\n friends to explore the input state afterwards.\") do |engine|\n read_key(engine, @timeout)\nend\ntarget.at(\"console:hadKeyPressed?\", \"( -- true/false ): leaves whether any key was pressed.\") do |engine, stack|\n (had_key_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCtrlPressed?\", \"( -- true/false ): leaves whether the CTRL key was pressed.\") do |engine, stack|\n (had_ctrl_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadAltPressed?\", \"( -- true/false ): leaves whether the ALT key was pressed.\") do |engine, stack|\n (had_alt_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadShiftPressed?\", \"( -- true/false ): leaves whether the SHIFT key was pressed.\") do |engine, stack|\n (had_shift_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadBackspacePressed?\", \"( -- true/false ): leaves whether the Backspace key was pressed.\") do |engine, stack|\n (had_backspace_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadFnPressed?\", \"( -- true/false ): leaves whether one of the function keys\\n F1-F12 was pressed.\") do |engine, stack|\n (had_fn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadInsertPressed?\", \"( -- true/false ): leaves whether the INSERT key was pressed.\") do |engine, stack|\n (had_insert_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDeletePressed?\", \"( -- true/false ): leaves whether the DELETE key was pressed.\") do |engine, stack|\n (had_delete_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadHomePressed?\", \"( -- true/false ): leaves whether the HOME key was pressed.\") do |engine, stack|\n (had_home_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadEndPressed?\", \"( -- true/false ): leaves whether the END key was pressed.\") do |engine, stack|\n (had_end_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageUpPressed?\", \"( -- true/false ): leaves whether the PAGE UP key was pressed.\") do |engine, stack|\n (had_pgup_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageDownPressed?\", \"( -- true/false ): leaves whether the PAGE DOWN key was pressed.\") do |engine, stack|\n (had_pgdn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadLeftPressed?\", \"( -- true/false ): leaves whether the LEFT ARROW key was pressed.\") do |engine, stack|\n (had_left_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadRightPressed?\", \"( -- true/false ): leaves whether the RIGHT ARROW key was pressed.\") do |engine, stack|\n (had_right_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadUpPressed?\", \"( -- true/false ): leaves whether the UP ARROW key was pressed.\") do |engine, stack|\n (had_up_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDownPressed?\", \"( -- true/false ): leaves whether the DOWN ARROW key was pressed.\") do |engine, stack|\n (had_down_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCharPressed?\", \"( -- true/false ): leaves whether EXCLUSIVELY a printable\\n character key was pressed (no CTRL, ALT, etc.) Whether the\\n SHIFT key was pressed or not is ignored.\") do |engine, stack|\n (had_char_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:getCharPressed\", \"( -- Cq ): leaves Char quote for the key that was pressed.\\n Usually a lowercase or uppercase letter; but also may look\\n like `'\\\\n'` or `'\\\\t'`, etc.)\\n\\nIn case the key that was pressed cannot be represented\\nby the means of a quote, or if the user did not press\\nany key, an empty quote is left in place of Char quote.\") do |engine, stack|\n (get_char_pressed(engine)).onto(stack)\nend\ntarget.at(\"console:change\", \"( X Y -- ): changes the color of the cell at X, Y coordinates\\n to be the foreground, background colors set by ink's\\n `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n change(engine, x, y, fg, bg)\nend\ntarget.at(\"console:appendEcho\", \"( F X Y -- ): appends echo of Form at an X and Y position\\n (in columns and rows correspondingly) using the foreground,\\n background colors set by ink's `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, fg, bg, q)\nend\ntarget.at(\"console:withReverseAppendEcho\", \"( F X Y -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, bg, fg, q)\nend\ntarget.at(\"console:present\", \"( -- ): syncs internal buffer and console.\") do |engine|\n present(engine)\nend\ntarget.at(\"console:clear\", \"( -- ): clears console with primary colors.\") do |engine|\n clear(engine, fg, bg)\nend\n"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":61,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":58,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":155,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":86,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":73,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IDisk","path":"Novika/Capabilities/IDisk.html","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/disk.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Disk","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"disk\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes various disk-related (storage-related) words\""}}],"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":18,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":63,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":35,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":21,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":24,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":27,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":30,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":46,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":79,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"disk:has?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n on the disk.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:canRead?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and is readable.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (can_read?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasDir?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a directory.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_dir?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasFile?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a file.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_file?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasSymlink?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a symlink.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_symlink?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:dirEmpty?\", \"( Pq -- true/false ): leaves whether the directory at Path quote\\n is empty. Dies if Path quote points to something other than\\n a directory, or doesn't exist.\") do |engine, stack|\n path = stack.drop.a(Quote)\n if boolean = dir_empty?(engine, path)\n else\n path.die(\"no directory at path\")\n end\n boolean.onto(stack)\nend\ntarget.at(\"disk:join\", \"( Bpq Cpq -- Pq ): leaves Path quote, which is the result of joining\\n Base path quote and Child path quote using the platform-specific\\n path separator.\\n\\n```\\n'hello' 'world' disk:join leaves: 'hello/world' \\\"On Unix\\\"\\n'hello' 'world' disk:join leaves: 'hello\\\\\\\\world' \\\"On Windows\\\"\\n```\") do |engine, stack|\n cp = stack.drop.a(Quote)\n bp = stack.drop.a(Quote)\n (join(engine, bp, cp)).onto(stack)\nend\ntarget.at(\"disk:pwd\", \"( -- Pq ): leaves Path quote pointing to the current working directory.\") do |engine, stack|\n (pwd(engine)).onto(stack)\nend\ntarget.at(\"disk:home\", \"( -- Pq ): leaves Path quote pointing to the user's home directory.\") do |engine, stack|\n (home(engine)).onto(stack)\nend\ntarget.at(\"disk:touch\", \"( Pq -- ): creates an empty file at the location that Path quote\\n points to. Does nothing if Path already exists.\\n\\n```\\ndisk:pwd 'demo.txt' disk:join $: demoPath\\ndemoPath disk:touch 'Hey!' demoPath disk:write\\ndemoPath disk:read leaves: 'Hey!'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n touch(engine, path)\nend\ntarget.at(\"disk:mkdir\", \"( Pq -- ): creates an empty directory at the location that Path\\n quote points to. Also creates any non-existing intermediate\\n directories. Does nothing if Path quote already points to an\\n existing directory, file, symlink, etc.\\n\\n```\\ndisk:pwd 'demo-dir-a' disk:join\\n 'demo-dir-b' disk:join\\n 'demo-dir-c' disk:join $: demoDirPath\\n\\ndemoDirPath disk:mkdir\\ndemoDirPath disk:hasDir? leaves: true\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n mkdir(engine, path)\nend\ntarget.at(\"disk:copy\", \"( Spq Dpq -- ): copies whatever Source path quote points to, to the\\n location that Destination path quote points to. If Source is a\\n directory, it is copied recursively.\\n\\nIf copy process failed (for instance if there is already something\\nat Destination path quote), dies.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\ndisk:pwd 'b.txt' disk:join $: pathToB\\n\\npathToA disk:touch pathToA 'Content of file a.txt' disk:write\\npathToA pathToB disk:copy\\n\\npathToA disk:read leaves: 'Content of file a.txt'\\npathToB disk:read leaves: 'Content of file a.txt'\\n```\") do |engine, stack|\n dst = stack.drop.a(Quote)\n src = stack.drop.a(Quote)\n if copy(engine, src, dst)\n else\n src.die(\"could not copy\")\n end\nend\ntarget.at(\"disk:read\", \"( Pq -- Q ): leaves Quote containing the content of the file that\\n Path quote points to. Dies if Path quote points to nothing or if\\n it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n if contents = read?(engine, path)\n else\n path.die(\"no file at path\")\n end\n contents.onto(stack)\nend\ntarget.at(\"disk:write\", \"( Q/Bf Pq -- ): (over)writes the content of the file that Path quote\\n points to, with the given Quote or Byteslice form. Dies if Path quote\\n points to nothing or if it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n\\n[ 0 $: count\\n [ count dup 1 + =: count ]\\n] @: counter\\n\\ncounter @: inc\\ninc leaves: 0\\ninc leaves: 1\\ninc leaves: 2\\n\\ndisk:pwd 'counter.nki' disk:join $: pathToCounter\\npathToCounter disk:touch\\n\\n\\\"Save inc state using NKI and write the resulting byteslice\\n to the file we've just created. Note that captureAll is similar\\n to deep copy (it copies the *entire* Novika environment including\\n the standard library), it's not the best way to do this but\\n by far the easiest.\\\"\\n(this -> inc nki:captureAll) pathToCounter disk:write\\n\\npathToCounter disk:read toByteslice nki:toBlock @: incFromDisk\\n\\nincFromDisk leaves: 3\\nincFromDisk leaves: 4\\nincFromDisk leaves: 5\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n content = stack.drop.a(Quote | Byteslice)\n if write?(engine, content, path)\n else\n path.die(\"no file at path\")\n end\nend\n"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":40,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":55,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":43,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":67,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":""}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":50,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":72,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":77,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IFrontend","path":"Novika/Capabilities/IFrontend.html","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Frontend","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"frontend\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes information about the language frontend\""}}],"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":21,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":23,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"novika:version\", \"( -- Vq ): leaves Version of the frontend as a quote.\") do |engine, stack|\n (version(engine)).onto(stack)\nend\ntarget.at(\"novika:capabilities\", \"( -- Lb ): lists the ids of capabilities provided by the\\n frontend in List block.\\n\\n```\\n\\\"Yours may differ!\\\"\\nnovika:capabilities leaves: [ [ 'essential' 'colors' 'console' ] ]\\n```\") do |engine, stack|\n (capabilities(engine)).onto(stack)\nend\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":18,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IInk","path":"Novika/Capabilities/IInk.html","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/ink.cr","line_number":14,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"NO_SYSTEM_ECHO_ERROR","name":"NO_SYSTEM_ECHO_ERROR","value":"\"with...Echo words need 'echo' from capability 'system', but this capability is not available\""}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Ink","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables colorful output using `withColorAppendEcho` and friends.\n\nExposed vocabulary:\n\n* `withEchoFg`, generic implementation\n* `withEchoBg`, generic implementation\n* `dropEchoFg`, generic implementation\n* `dropEchoBg`, generic implementation\n* `withColorAppendEcho`, implemented by `with_color_append_echo`\n* `withEmphasisAppendEcho`, implemented by `with_emphasis_append_echo`\n* `withReverseAppendEcho`, generic implementation; when no\n colors given by the use, `with_reverse_append_echo` is used.","summary":"Enables colorful output using withColorAppendEcho
and friends.
Echo background color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg","visibility":"Public","body":"@bg"}},{"html_id":"bg=(bg:Array(Novika::Color))-instance-method","name":"bg=","doc":"Echo background color stack.","summary":"Echo background color stack.
","abstract":false,"args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"args_string":"(bg : Array(Novika::Color))","args_html":"(bg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg=","args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@bg = bg"}},{"html_id":"enabled=(enabled:Bool)-instance-method","name":"enabled=","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"args_string":"(enabled : Bool)","args_html":"(enabled : Bool)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled=","args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"visibility":"Public","body":"@enabled = enabled"}},{"html_id":"enabled?:Bool-instance-method","name":"enabled?","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled?","return_type":"Bool","visibility":"Public","body":"if (value = @enabled).nil?\n @enabled = (Novika.colorful?)\nelse\n value\nend"}},{"html_id":"fg:Array(Novika::Color)-instance-method","name":"fg","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg","visibility":"Public","body":"@fg"}},{"html_id":"fg=(fg:Array(Novika::Color))-instance-method","name":"fg=","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"args_string":"(fg : Array(Novika::Color))","args_html":"(fg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg=","args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@fg = fg"}},{"html_id":"inject(intotarget)-instance-method","name":"inject","doc":"Injects the colors vocabulary into *target*.","summary":"Injects the colors vocabulary into target.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":62,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"withEchoFg\", \"( C -- ): pushes Color form onto the echo foreground\\n color stack.\") do |_, stack|\n fg << (stack.drop.a(Color))\nend\ntarget.at(\"withEchoBg\", \"( C -- ): pushes Color form onto the echo background\\n color stack.\") do |_, stack|\n bg << (stack.drop.a(Color))\nend\ntarget.at(\"dropEchoFg\", \"( -- ): drops a color from the echo foreground color stack.\") do\n fg.pop?\nend\ntarget.at(\"dropEchoBg\", \"( -- ): drops a color from the echo background color stack.\") do\n bg.pop?\nend\ntarget.at(\"withReverseAppendEcho\", \"( F -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\\n\\nNote: if unsupported by the output stream, will print\\nForm as-is.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? && bg.last?)\n with_color_append_echo(engine, bg.last, fg.last, form)\n else\n with_reverse_append_echo(engine, form)\n end\nend\ntarget.at(\"withEmphasisAppendEcho\", \"( F -- ): same as `withColorAppendEcho`, but also emphasizes\\n echo of Form. Bold style is used by default, but implementors\\n may choose e.g. italic.\") do |engine, stack|\n form = stack.drop\n if enabled?\n with_emphasis_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\ntarget.at(\"withColorAppendEcho\", \"( F -- ): appends Form with last color from the echo\\n foreground color stack set as foreground color, and\\n last color from the echo background stack set as background\\n color, to the standard output stream.\\n\\nNote: some implementations (particularly Novika's default\\nimplementation) choose to restrict foreground and background\\ncolors to system's basic 16 colors for compatibility &\\nportability. If you want more cross-platform control over\\ncolors (and pretty much everything else), take a look at\\nconsole capability.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? || bg.last?)\n with_color_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\n"}},{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":46,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":59,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/Impl","path":"Novika/Capabilities/Impl.html","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl","abstract":false,"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/colors.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/console.cr","line_number":5,"url":null},{"filename":"src/novika/capabilities/impl/disk.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/essential.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ink.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/nki.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/system.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"types":[{"html_id":"novika/Novika/Capabilities/Impl/Bit","path":"Novika/Capabilities/Impl/Bit.html","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"bit\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"allows to interpret decimals as sequences of bits\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"bit:fromLeft\", \"( D I -- B ): leaves Index-th Bit from left in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromLeft leaves: 1\\n0b00010001 1 bit:fromLeft leaves: 0\\n0b00010001 2 bit:fromLeft leaves: 0\\n0b00010001 3 bit:fromLeft leaves: 0\\n0b00010001 4 bit:fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n if bit = decimal.nth_ms_bit?(index)\n else\n index.die(\"bit index out of bounds\")\n end\n bit.onto(stack)\nend\ntarget.at(\"bit:fromRight\", \"( D I -- B ): leaves Index-th Bit from right in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromRight leaves: 1\\n0b00010001 1 bit:fromRight leaves: 0\\n0b00010001 2 bit:fromRight leaves: 0\\n0b00010001 3 bit:fromRight leaves: 0\\n0b00010001 4 bit:fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n (decimal.nth_ls_bit(index)).onto(stack)\nend\ntarget.at(\"bit:count\", \"( D -- Bc ): leaves Bit count, the number of bits in the given\\n Decimal. Dies if Decimal has a fractional part.\\n\\n```\\n0b00010001 bit:count leaves: 4\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n decimal.bitcount.onto(stack)\nend\ntarget.at(\"bit:or\", \"( D D -- D ): combines two Decimal numbers using bitwise or, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b00010001\\n0b10001000 bit:or leaves:\\n0b10011001\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a | b).onto(stack)\nend\ntarget.at(\"bit:and\", \"( D D -- D ): combines two Decimal numbers using bitwise and, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b10011001\\n0b00011000 bit:and leaves:\\n0b00011000\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a & b).onto(stack)\nend\ntarget.at(\"bit:bits\", \"( D -- Bb ): leaves Bits block for the given Decimal, which contains\\n the binary representation of the *absolute value* of Decimal, starting\\n with the most-significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [ 1 0 0 1 1 0 0 1 ]\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n bits = Block.new\n decimal.each_bit(&.onto(bits))\n bits.onto(stack)\nend\ntarget.at(\"bit:fromBits\", \"( Bb -- D ): converts Bits block to a Decimal. Bits block should\\n contain binary digits (represented by `0` or `1`), and should\\n begin with the most significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [[ 1 0 0 1 1 0 0 1 ]]\\n bit:fromBits leaves: 0b10011001\\n```\") do |_, stack|\n bits = stack.drop.a(Block)\n acc = Decimal.new(0)\n pow = Decimal.new(bits.count - 1)\n one = Decimal.new(1)\n two = Decimal.new(2)\n bits.each do |bit|\n acc = acc + (((bit.a(Decimal)).int.in(0..1)) * (two ** pow))\n pow = pow - one\n end\n acc.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Colors","path":"Novika/Capabilities/Impl/Colors.html","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/colors.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"colors\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes vocabulary for working with colors\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"rgb\", \"( R G B -- Cf ): creates a Color form from three decimals\\n Red (0-255), Green (0-255), and Blue (0-255).\\n\\n```\\n36 255 255 rgb toQuote leaves: 'rgb(36, 255 ,255)'\\n```'\") do |_, stack|\n b = ((stack.drop.a(Decimal)).in(0..255)).posint\n g = ((stack.drop.a(Decimal)).in(0..255)).posint\n r = ((stack.drop.a(Decimal)).in(0..255)).posint\n (Color.rgb(r, g, b)).onto(stack)\nend\ntarget.at(\"getRGB\", \"( Cf -- R G B ): leaves Red, Green, Blue values for a\\n Color form.\\n\\n```\\n0 25 3 rgb \\\"rgb(0, 25, 3)\\\" getRGB leaves: [ 0 25 3 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n r, g, b = color.rgb\n r.onto(stack)\n g.onto(stack)\n b.onto(stack)\nend\ntarget.at(\"hsl\", \"( H S L -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Lightness (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSL color is\\nfirst converted into RGB.\\n\\n```\\n206 35 46 hsl toQuote leaves: 'rgb(76, 123, 158)'\\n```\") do |_, stack|\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsl(h, s, l)).onto(stack)\nend\ntarget.at(\"getHSL\", \"( Cf -- H S L ): leaves Hue, Saturation, Lightness for\\n a Color form.\\n\\n```\\n206 35 46 hsl \\\"rgb(76, 123, 158)\\\" getHSL leaves: [ 206 35 46 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, l = color.hsl\n h.onto(stack)\n s.onto(stack)\n l.onto(stack)\nend\ntarget.at(\"hsv\", \"( H S V -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Value (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSV color is\\nfirst converted into RGB.\\n\\n```\\n120 100 100 hsv toQuote leaves: 'rgb(0, 255, 0)'\\n```\") do |_, stack|\n v = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsv(h, s, v)).onto(stack)\nend\ntarget.at(\"getHSV\", \"( Cf -- H S V ): leaves Hue, Saturation, Value for a\\n Color form.\\n\\n```\\n180 100 50 hsv \\\"rgb(0,128,128)\\\" getHSV leaves: [ 180 100 50 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, v = color.hsv\n h.onto(stack)\n s.onto(stack)\n v.onto(stack)\nend\ntarget.at(\"lch\", \"( L C H -- Cf ): creates a Color form from three decimals\\n Lightness (0-100), Chroma (0-132), Hue (0-360).\\n\\nSince color forms are stored as RGB, the LCH color is\\nfirst converted into RGB.\\n\\nLCH colors are tricky to implement but very fun to use.\\nThat's why they're in Novika's standard library.\\n\\nCIELAB encloses more colors than sRGB, so some conversion\\nimprecisions *are* to be expected because some colors just\\nfall out of sRGB gamut (lossiness is especially noticeable\\nin LCH -> RGB -> LCH conversions, but it stabilizes on the\\nlast step because the last step's LCH is guraranteed to be\\ninside the sRGB gamut).\\n\\nAny color out of the sRGB gamut is brought into the sRGB\\ngamut by lowering chroma until it's in the sRGB bounds.\\n\\nHere is a 'good' conversion, meaning it nicely closes\\non itself:\\n\\n```\\n78 74 133 lch $: color\\n\\ncolor toQuote leaves: 'rgb(122, 215, 85)'\\ncolor getLCH leaves: [ 78 74 133 ]\\ncolor getLCH lch toQuote leaves: 'rgb(122, 215, 85)''\\n\\\"And so on...\\\"\\n```\\n\\nAnd here is a bad conversion. At first, though, for it\\ndoes stabilize after a few rounds as it falls firmly\\ninto the sRGB color space.\\n\\n```\\n74 107 26 lch $: color\\ncolor toQuote leaves: 'rgb(255, 154, 151)'\\n\\n\\\"Note how many chroma units we lose! Plus, Lab and\\n LCH have hue shift on chroma changes, hence 26 -> 25.\\\"\\ncolor getLCH leaves: [ 74 41 25 ]\\n\\ncolor getLCH lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\ncolor getLCH lch getLCH leaves: [ 74 41 25 ]\\n\\\"... and so on, conversion had stabilized ...\\\"\\n```\\n\\nYou don't necessarily have to think about this, because\\nthe resulting colors do look very similar, differing in\\npoints rather than magnitudes. Just be aware that the\\nconversion method used by this word and `getLCH` is lossy\\nin some cases.\") do |_, stack|\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n c = ((stack.drop.a(Decimal)).in(0..132)).posint\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n (Color.lch(l, c, h)).onto(stack)\nend\ntarget.at(\"getLCH\", \"( Cf -- L C H ): leaves Lightness, Chroma, Hue for a Color\\n form. Please read documentation for `lch` to understand\\n why `a b c lch getLCH` might not leave `a b c`.\\n\\n```\\n78 74 133 lch toQuote leaves: 'rgb(122, 215, 85)'\\n78 74 133 lch getLCH leaves: [ 78 74 133 ]\\n\\n74 107 26 lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\n\\\"Chroma lowered to fit into sRGB. Lab and LCH have hue\\n shift on chroma changes, 26 -> 25\\\"\\n74 107 26 lch getLCH leaves: [ 74 41 25 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n l, c, h = color.lch\n l.onto(stack)\n c.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"withAlpha\", \"( Cf A -- Cf' ): leaves Color form with alpha channel\\n set to Alpha (0-255).\\n\\n```\\n0 25 3 rgb toQuote leaves: 'rgb(0, 25, 3)'\\n0 25 3 rgb 100 withAlpha toQuote leaves: 'rgba(0, 25, 3, 100)'\\n```\") do |_, stack|\n alpha = ((stack.drop.a(Decimal)).in(0..255)).posint\n color = stack.drop.a(Color)\n color.a = alpha\n color.onto(stack)\nend\ntarget.at(\"getAlpha\", \"( Cf -- A ): leaves Alpha for the given Color form.\\n\\n```\\n0 25 3 rgb getAlpha leaves: 255 \\\"Opaque = 255\\\"\\n0 25 3 rgb 100 withAlpha getAlpha leaves: 100\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n color.a.onto(stack)\nend\ntarget.at(\"fromPalette\", \"( Cf Pb -- Cc ): leaves the Closest color form to Color from\\n a Palette block. How close the color is is determined by\\n distance: the Closest color is that color in Palette block\\n to which Color has least (minimum) distance.\\n\\n```\\n[ 0 0 0 rgb\\n 255 0 0 rgb\\n 0 255 0 rgb\\n 0 0 255 rgb\\n 255 255 255 rgb\\n] vals $: pal\\n\\n0 0 0 rgb pal fromPalette toQuote leaves: 'rgb(0, 0, 0)'\\n76 175 80 rgb pal fromPalette \\\"greenish\\\" toQuote leaves: 'rgb(0, 255, 0)'\\n220 237 200 rgb pal fromPalette \\\"very light green\\\" toQuote leaves: 'rgb(255, 255, 255)'\\n74 20 140 rgb pal fromPalette \\\"very dark purple\\\" toQuote leaves: 'rgb(255, 0, 0)'\\n```\") do |_, stack|\n palette = stack.drop.a(Block)\n color = stack.drop.a(Color)\n colors = [] of Color\n palette.each do |pcolor|\n colors << (pcolor.a(Color))\n end\n (color.closest(colors)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Console","path":"Novika/Capabilities/Impl/Console.html","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/console.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":208,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.print(xi, yi, fg, bg, quote.string[...(Termbox.width - xi)])\nend\n"}},{"html_id":"change(engine,x:Decimal,y:Decimal,fg:Color,bg:Color)-instance-method","name":"change","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":199,"url":null},"def":{"name":"change","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.change(xi, yi, fg, bg)\nend\n"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":221,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nTermbox.clear(fg, bg)\nTermbox.clear\n"}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":21,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M256_A\nTermbox.set_output_mode(Termbox::OutputMode::M256)\n"}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":26,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M8_A\nTermbox.set_output_mode(Termbox::OutputMode::Normal)\n"}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":31,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = nil\nTermbox.set_output_mode(Termbox::OutputMode::Truecolor)\n"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":110,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"if event = @event.as?(Termbox::Event::KeyEvent)\nelse\n return Quote.new(\"\")\nend\nif char = event.char\n return Quote.new(char)\nend\nkey = event.key.not_nil!\ncase key\nwhen .ctrl_tilde?\n char = '~'\nwhen .ctrl_2?\n char = '2'\nwhen .ctrl_a?\n char = 'a'\nwhen .ctrl_b?\n char = 'b'\nwhen .ctrl_c?\n char = 'c'\nwhen .ctrl_d?\n char = 'd'\nwhen .ctrl_e?\n char = 'e'\nwhen .ctrl_f?\n char = 'f'\nwhen .ctrl_g?\n char = 'g'\nwhen .ctrl_h?\n char = 'h'\nwhen .tab?\n char = '\\t'\nwhen .ctrl_i?\n char = 'i'\nwhen .ctrl_j?\n char = 'j'\nwhen .ctrl_k?\n char = 'k'\nwhen .ctrl_l?\n char = 'l'\nwhen .enter?\n char = '\\n'\nwhen .ctrl_m?\n char = 'm'\nwhen .ctrl_n?\n char = 'n'\nwhen .ctrl_o?\n char = 'o'\nwhen .ctrl_p?\n char = 'p'\nwhen .ctrl_q?\n char = 'q'\nwhen .ctrl_r?\n char = 'r'\nwhen .ctrl_s?\n char = 's'\nwhen .ctrl_t?\n char = 't'\nwhen .ctrl_u?\n char = 'u'\nwhen .ctrl_v?\n char = 'v'\nwhen .ctrl_w?\n char = 'w'\nwhen .ctrl_x?\n char = 'x'\nwhen .ctrl_y?\n char = 'y'\nwhen .ctrl_z?\n char = 'z'\nwhen .esc?\n char = '\\e'\nwhen .ctrl_lsq_bracket?\n char = '['\nwhen .ctrl_3?\n char = '3'\nwhen .ctrl_4?\n char = '4'\nwhen .ctrl_backslash?\n char = '\\\\'\nwhen .ctrl_5?\n char = '5'\nwhen .ctrl_rsq_bracket?\n char = ']'\nwhen .ctrl_6?\n char = '6'\nwhen .ctrl_7?\n char = '7'\nwhen .ctrl_slash?\n char = '/'\nwhen .ctrl_underscore?\n char = '_'\nwhen .space?\n char = ' '\nwhen .ctrl_8?\n char = '8'\nwhen .f1?\n char = '1'\nwhen .f2?\n char = '2'\nwhen .f3?\n char = '3'\nwhen .f4?\n char = '4'\nwhen .f5?\n char = '5'\nwhen .f6?\n char = '6'\nwhen .f7?\n char = '7'\nwhen .f8?\n char = '8'\nwhen .f9?\n char = '9'\nwhen .f10?\n char = \"10\"\nwhen .f11?\n char = \"11\"\nwhen .f12?\n char = \"12\"\nelse\n return Quote.new(\"\")\nend\nQuote.new(char)\n"}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":56,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.alt?]\n"}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":80,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n key.backspace? || key.backspace2?\nend"}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":106,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"Boolean[!(!(@event.as?(Termbox::Event::KeyEvent)).try do |__arg5|\n __arg5.char.try(&.printable?)\nend)]"}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":50,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.ctrl?]\n"}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.delete?)"}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":102,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_down?)"}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.end?)"}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":68,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n case key\n when .f1?, .f2?, .f3?, .f4?, .f5?, .f6?, .f7?, .f8?, .f9?, .f10?, .f11?, .f12?\n true\n end\nend"}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.home?)"}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.insert?)"}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":44,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[!(!event)]\n"}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":90,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_left?)"}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgdn?)"}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgup?)"}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":94,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_right?)"}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":62,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && (event.char.try(&.uppercase?) || event.mod.shift?)]\n"}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":98,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_up?)"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":17,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.disable"}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":13,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.enable"}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":217,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.present"}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":40,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":"@event = Termbox.peek?(timeout.to_i)"}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":36,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":"{Decimal.new(Termbox.width), Decimal.new(Termbox.height)}"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Disk","path":"Novika/Capabilities/Impl/Disk.html","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/disk.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":5,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.readable?(path.string)]"}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":51,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if File.exists?(src.string)\nelse\n return false\nend\nFileUtils.cp_r(src.string, dst.string)\ntrue\n"}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":25,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":"if File.directory?(path.string)\n Boolean[Dir.empty?(path.string)]\nend"}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":9,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.exists?(path.string)]"}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":17,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[Dir.exists?(path.string)]"}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":13,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.file?(path.string)]"}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":21,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.symlink?(path.string)]"}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":37,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Path.home.to_s)"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":29,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(File.join(base.string, child.string))"}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":45,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"if File.exists?(path.string)\n return\nend\nFileUtils.mkdir_p(path.string)\n"}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":33,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Dir.current)"}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":59,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if File.file?(path.string)\n Quote.new(File.read(path.string))\nend"}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":41,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"File.touch(path.string)"}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":63,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.write(path.string, content.string)\ntrue\n"}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":71,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.open(path.string, \"wb\") do |handle|\n content.write_to(handle)\nend\ntrue\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Essential","path":"Novika/Capabilities/Impl/Essential.html","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/essential.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"essential\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes essential native code vocabulary, such as 'hydrate' and 'new'\""}}],"instance_methods":[{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(Word.new(\"true\"), True.new)\ntarget.at(Word.new(\"false\"), False.new)\ntarget.at(\"prototype\", \"( B -- Pb ): leaves the Prototype block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.prototype.onto(stack)\nend\ntarget.at(\"parent\", \"( B -- Pb ): leaves the Parent block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n if parent = block.parent?\n else\n block.die(\"no parent for block\")\n end\n parent.onto(stack)\nend\ntarget.at(\"address\", \"( B -- A ): leaves pointer Address of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.object_id)).onto(stack)\nend\ntarget.at(\"conts\", \"( -- Cb ): pushes the Continuations block.\") do |engine, stack|\n engine.conts.onto(stack)\nend\ntarget.at(\"cont\", \"( -- Cb ): pushes the Continuation block.\") do |engine, stack|\n engine.cont.onto(stack)\nend\ntarget.at(\"newContinuation\", \"( S B -- C ): creates a Continuation from a Stack and\\n a Block.\") do |_, stack|\n Engine.cont(block: stack.drop.a(Block), stack: stack.drop.a(Block)).onto(stack)\nend\ntarget.at(\"getContBlock\", \"( C -- Cb ): leaves the Code block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_BLOCK_AT)).onto(stack)\nend\ntarget.at(\"getContStack\", \"( C -- Sb ): leaves the Stack block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_STACK_AT)).onto(stack)\nend\ntarget.at(\"this\", \"( -- B ): pushes the Block it's opened in.\\n\\n```\\n[ this ] open echo\\n\\\"STDOUT: [ this ]⏎ (instance of `[ this ]`)\\\"\\n```\") do |engine, stack|\n engine.block.onto(stack)\nend\ntarget.at(\"stack\", \"( -- S ): pushes the Stack it's opened in.\\n\\n```\\nstack dup echo\\n\\\"STDOUT: [ ⭮ ]⏎\\\"\\n\\n'foo' <<\\nstack echo\\n\\\"STDOUT: [ ⭮ 'foo' ]⏎\\\"\\n```\") do |_, stack|\n stack.onto(stack)\nend\ntarget.at(\"ahead\", \"( -- B ): leaves the block that will be executed after\\n `this` finishes.\\n\\n```\\n100 [ ahead 1 inject ] open + leaves: 101 \\\"(i.e. 100 1 +)\\\"\\n```\") do |engine, stack|\n cont = engine.conts.at(engine.conts.count - 2)\n cont = (cont.as?(Block)) || (cont.die(\"malformed continuation\"))\n ahead = cont.at(Engine::C_BLOCK_AT)\n ahead.onto(stack)\nend\ntarget.at(\"resume\", \"( B -- ): closes blocks all the way up to, but not\\n including, Block.\") do |engine, stack|\n block = stack.drop.a(Block)\n conts = engine.conts\n found = false\n while !(conts.tape.empty? || (found = block.same?(engine.block)))\n conts.drop\n end\n if found\n else\n block.die(\"resume: no such block in continuations\")\n end\nend\ntarget.at(\"dup\", \"( F -- F F ): duplicates the Form before cursor.\\n\\n```\\n'hello' dup leaves: [ 'hello' 'hello' ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ dup ] hydrate\\nblock leaves: [ [ 1 2 2 | 3 ] ]\\n```\") do |_, stack|\n stack.dupe\nend\ntarget.at(\"drop\", \"( F -- ): drops the Form before cursor.\\n\\n```\\n'hello' drop leaves: [ ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ drop ] hydrate\\nblock leaves: [ [ 1 | 3 ] ]\\n```\") do |_, stack|\n stack.drop\nend\ntarget.at(\"swap\", \"( A B -- B A ): swaps two Forms before cursor.\\n\\n```\\n1 2 swap leaves: [ 2 1 ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ swap ] hydrate\\nblock leaves: [ [ 2 1 | 3 ] ]\\n```\") do |_, stack|\n stack.swap\nend\ntarget.at(\"hydrate\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, it is added to\\n Stack (equivalent to `<<`), If Form is a block, its\\n instance is opened. To open a block without creating\\n an instance of it (unsafe), use `hydrate!`.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"hydrate!\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, the behavior is\\n the same as in `hydrate`. If Form is a block, performs\\n unsafe hydration (hydrates without making an instance\\n of the block). For a safer alternative, see `hydrate`.\\n Use if you know what you're doing, or if you're ready\\n to make an instance yourself.\\n\\nDetails: `hydrate!` is considered unsafe because hydration\\nartifacts are exposed to the user and/or its blocks. The\\ncontents of a block after hydration may differ from its\\ncontents before unsafe hydration. Indeed, `hydrate!` is\\nalmost as unsafe as pushing into `conts`; the only benefit\\nit provides is that it is able to catch infinite/very\\ndeep recursion.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule!(form, new_stack)\nend\ntarget.at(\"open\", \"( F -- F' ): opens Form in the active stack. Equivalent\\n to `stack F hydrate`.\\n\\n```\\n100 open leaves: 100\\n\\n1 [ 2 + ] open leaves: 3\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, stack)\nend\ntarget.at(\"there\", \"( S B -- S ): opens Block with Stack set as the active\\n stack. Leaves Stack. Ahead is transferred to block.\\n\\n```\\n[ 1 2 ] [ + ] there leaves: [ [ 3 ] ]\\n[ 1 2 ] [ ahead thruBlock open ] there + leaves: [ [ 3 ] ]\\n```\") do |engine, stack|\n form = stack.drop\n new_stack = stack.top.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"do\", \"( F -- ): opens Form with an empty stack activated, and\\n disposed when Form has been evaluated.\\n\\n```\\n[ 'Hi!' echo ] do\\n\\\"STDOUT: Hi!⏎\\\"\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, Block.new)\nend\ntarget.at(\"new\", \"( B -- I ): leaves an Instance of a Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance.onto(stack)\nend\ntarget.at(\"shallowNew\", \"( B -- Si ): leaves a Shallow instance of Block.\\n\\n`shallowNew` is different from `new` in that it does not reparent\\nsub-blocks to the parent instance recursively. Instead, it only\\ncreates an instance of Block, and does not look at skips its\\ncontent entirely.\\n\\n```\\n[ $: x [ x ] ] @: newBox\\n\\n1 newBox $: fooBox1\\n2 newBox $: fooBox2\\n3 newBox $: fooBox3\\n\\nfooBox1 open leaves: 1\\nfooBox2 open leaves: 2\\nfooBox3 open leaves: 3\\n\\n[ fooBox1 fooBox2 fooBox3 ] vals $: boxes\\n\\nboxes shallowNew $: shallowBoxesInstance\\nshallowBoxesInstance 0 fromLeft open leaves: 1\\nshallowBoxesInstance 1 fromLeft open leaves: 2\\nshallowBoxesInstance 2 fromLeft open leaves: 3\\n\\n\\\"Works as expected! Note that sub-blocks are exactly the same as\\n those in the original 'boxes' block. However, 'shallowBoxesInstance'\\n and 'boxes' are different blocks now:\\\"\\n\\n(shallowBoxesInstance 0 fromLeft) (boxes 0 fromLeft) same? leaves: true\\n(shallowBoxesInstance 1 fromLeft) (boxes 1 fromLeft) same? leaves: true\\n(shallowBoxesInstance 2 fromLeft) (boxes 2 fromLeft) same? leaves: true\\n\\nboxes shallowBoxesInstance same? leaves: false\\n\\n\\\"... and 'shallowBoxesInstance' does indeed have 'boxes' as its parent:\\\"\\n\\n(shallowBoxesInstance parent) boxes same? leaves: true\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance(shallow: true).onto(stack)\nend\ntarget.at(\"sel\", \"( D A B -- A/B ): selects A (Determiner is truthy) or B\\n (Determiner is falsey)\") do |_, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n (det.sel(a, b)).onto(stack)\nend\ntarget.at(\"br\", \"( D T F -- ? ): opens True/False forms depending on\\n Determiner being true/false.\") do |engine, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n engine.schedule(det.sel(a, b), stack)\nend\ntarget.at(\"<\", \"( A B -- S ): leaves whether A is smaller than (less than) B.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n Boolean[a < b].onto(stack)\nend\ntarget.at(\"same?\", \"( F1 F2 -- true/false ): leaves whether two Forms are the\\n same (by reference for block, by value for any other form).\\n\\n```\\n1 2 same? leaves: false\\n1 1 same? leaves: true\\n\\n'hello' 'hello world' same? leaves: false\\n'hello' 'hello' same? leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 same? leaves: false \\\"They're different blocks, content doesn't matter!\\\"\\n\\nb1 b1 same? leaves: true\\nb2 b2 same? leaves: true\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n (Boolean.same?(a, b)).onto(stack)\nend\ntarget.at(\"=\", \"( F1 F2 -- true/false ): leaves whether two Forms are equal by\\n content (they may or may not be the same forms reference-wise,\\n i.e., those for which `same?` would leave true).\\n\\n```\\n1 2 = leaves: false\\n1 1 = leaves: true\\n\\n'hello' 'hello world' = leaves: false\\n'hello' 'hello' = leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 = leaves: true \\\"They're equal by content!\\\"\\n\\nb1 b1 = leaves: true\\nb2 b2 = leaves: true\\n\\n\\\"Supports self-reference:\\\"\\n[ ] $: b3\\nb3 b3 shove\\nb3 b3 = leaves: true\\n(b3 first) b3 = leaves: true\\n\\\"etc...\\\"\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n Boolean[a == b].onto(stack)\nend\ntarget.at(\"anyof?\", \"( F B -- true/false ): leaves whether any form in Block is\\n equal (via `=`) to Form.\\n\\n```\\n1 [ 1 2 3 ] anyof? leaves: true\\n'hello' [ 'hello' 'world' 1 ] anyof? leaves: true\\n'hello' [ 1 2 3 ] anyof? leaves: false\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n form = stack.drop\n Boolean[form.in?(block)].onto(stack)\nend\ntarget.at(\"occurrences\", \"( B/Q Pf/Pq -- Bi ): leaves Begin indices of all occurrences\\n of Pattern form/Pattern quote in Block/Quote. Begin indices\\n is an orphan with no entries.\\n\\nWorks in a similar way to `anyof?` in that it compares each\\nelement of the Block/Quote with Pattern form/Pattern quote\\nlike `=` (but not using `=`, at least in the quote case\\nwhere KMP is used).\\n\\n```\\n[ ] 123 occurrences leaves: [ [ ] ]\\n\\n[ 1 1 2 0 0 1 2 1 3 4 8 ] $: haystack\\nhaystack 0 occurrences leaves: [ [ 3 4 ] ]\\nhaystack 1 occurrences leaves: [ [ 0 1 5 7 ] ]\\nhaystack 'foo' occurrences leaves: [ [ ] ]\\n\\n'' 'foobar' occurrences leaves: [ [ ] ]\\n'foobar' '' occurrences leaves: [ [ ] ]\\n\\n'foobra' $: haystack\\nhaystack 'o' occurrences leaves: [ [ 1 2 ] ]\\nhaystack 'foo' occurrences leaves: [ [ 0 ] ]\\nhaystack 'ra' occurrences leaves: [ [ 4 ] ]\\n\\n'GATCCATATG' $: haystack\\nhaystack 'ATAAT' occurrences leaves: [ [ ] ]\\nhaystack 'ATAT' occurrences leaves: [ [ 5 ] ]\\n```\") do |_, stack|\n pattern = stack.drop\n iterable = stack.drop.a(Block | Quote)\n case iterable\n in Quote\n fail = iterable.empty? || (pattern.is_a?(Quote) && pattern.empty?)\n in Block\n fail = iterable.count.zero?\n end\n if fail\n Block.new.onto(stack)\n next\n end\n occurrences = [] of Form\n iterable.each_occurrence_of(pattern) do |index|\n occurrences << (Decimal.new(index))\n end\n (Block.with(occurrences, leaf: false)).onto(stack)\nend\ntarget.at(\"uppercase?\", \"( Q -- true/false ): leaves whether Quote is all-uppercase.\\n If Quote is empty, leaves false.\\n\\n```\\n'' uppercase? leaves: false\\n'A' uppercase? leaves: true\\n'hello' uppercase? leaves: false\\n'Hello' uppercase? leaves: false\\n'HELLO' uppercase? leaves: true\\n'HELLO WORLD' uppercase? leaves: false\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n string = quote.string\n case string.size\n when 0\n isup = false\n when 1\n isup = string[0].uppercase?\n else\n isup = true\n string.each_char do |char|\n if char.uppercase?\n else\n isup = false\n break\n end\n end\n end\n Boolean[isup].onto(stack)\nend\ntarget.at(\"toUppercase\", \"( Q -- Uq ): leaves all- Uppercase quote for Quote: converts\\n lowercase character(s) in Quote to uppercase. If Quote is empty,\\n leaves empty quote.\\n\\n```\\n'' toUppercase leaves: ''\\n'hello' toUppercase leaves: 'HELLO'\\n'hello world' toUppercase? leaves: 'HELLO WORLD'\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n (Quote.new(quote.string.upcase)).onto(stack)\nend\ntarget.at(\"block?\", \"( F -- true/false ): leaves whether Form is a block.\") do |_, stack|\n Boolean[stack.drop.is_a?(Block)].onto(stack)\nend\ntarget.at(\"asBlock\", \"( F -- B ): asserts that Form is a Block, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBlock\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n[] asBlock leaves: [ [] \\\"(the same block)\\\" ]\\n```\") do |_, stack|\n stack.top.a(Block)\nend\ntarget.at(\"word?\", \"( F -- true/false ): leaves whether Form is a word form,\\n or a block that implements '__word__'.\\n\\n```\\n#foo word? leaves: true\\n\\n[ #foo $: __word__ this ] open word? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Word) || (form.is_a?(Block) && (form.can_be?(Word)))].onto(stack)\nend\ntarget.at(\"private?\", \"( W -- true/false ): leaves whether Word is private (by convention).\\n\\nA Word prefixed by one or more underscores '_' *but that which\\ndoes not end with one(s)* is considered private by convention.\\nHook words such as `__quote__` are *not* considered private.\\n\\nThe fact that privacy is defined \\\"by convention\\\" means that nothing\\nactually stops anyone from obtaining the word's associated value form.\\n\\n```\\n#hello private? leaves: false\\n#_hello private? leaves: true\\n#_ private? leaves: false \\\"Beware!\\\"\\n```\") do |_, stack|\n Boolean[(stack.drop.a(Word)).private?].onto(stack)\nend\ntarget.at(\"toWord\", \"( F -- W ): converts Form into Word.\\n 1. If Form is a word, behaves as noop\\n 2. If Form is a quote, dies only if quote contains\\n Unicode whitespace characters or is itself empty.\\n 3. If Form is a quoted word, peels off **all** quoting\") do |_, stack|\n form = stack.drop.a((Word | QuotedWord) | Quote)\n case form\n in Word\n form.onto(stack)\n in QuotedWord\n form.to_word.onto(stack)\n in Quote\n string = form.string\n if string.empty?\n form.die(\"toWord: quote argument is empty\")\n else\n if string.each_char.any?(&.whitespace?)\n form.die(\"toWord: quote argument contains whitespace\")\n end\n end\n (Word.new(form.string)).onto(stack)\n end\nend\ntarget.at(\"asWord\", \"( F -- W ): asserts that Form is a Word form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#foo asWord leaves: [ foo ]\\n```\\n\\n`__word__` hook can make a block usable in place of a word,\\nprovided its definition leaves a word or a block which\\nimplements '__word__':\\n\\n```\\n[ $: x x $: __word__ this ] @: a\\n#foo a asWord \\\"beware: leaves instance of a\\\"\\n#boo a a asWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Word)\nend\ntarget.at(\"quotedWord?\", \"( F -- true/false ): leaves whether Form is a quoted word\\n form, or a block that implements '__quotedWord__'.\\n\\n```\\n##foo quotedWord? leaves: true\\n[ ##foo $: __quotedWord__ this ] open quotedWord? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(QuotedWord) || (form.is_a?(Block) && (form.can_be?(QuotedWord)))].onto(stack)\nend\ntarget.at(\"asQuotedWord\", \"( F -- Qw ): asserts that Form is a Quoted word form,\\n dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuotedWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n##foo asQuotedWord leaves: #foo\\n```\\n\\n`__quotedWord__` hook can make a block usable in place of\\na quoted word, provided its definition leaves a quoted\\nword or a block that implements `__quotedWord__`:\\n\\n```\\n[ $: x x $: __quotedWord__ this ] @: a\\n##foo a asQuotedWord \\\"beware: leaves instance of a\\\"\\n##boo a a asQuotedWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(QuotedWord)\nend\ntarget.at(\"decimal?\", \"( F -- true/false ): leaves whether Form is a decimal form,\\n or a block that implements '__decimal__'.\\n\\n```\\n123 decimal? leaves: true\\n[ 123 $: __decimal__ this ] open decimal? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Decimal) || (form.is_a?(Block) && (form.can_be?(Decimal)))].onto(stack)\nend\ntarget.at(\"toQuotedWord\", \"( Qw/W -- #Qw/#W ): adds a layer of \\\"quoting\\\" to Quoted\\n word or Word.\\n\\n```\\n\\\"Note that in quoted word literals (here on the left hand\\n side) one layer of quoting is 'eaten off' by the parser!\\\"\\n\\n#foo toQuotedWord leaves: #foo\\n##foo toQuotedWord leaves: ##foo\\n```\") do |_, stack|\n form = stack.drop.a(Word | QuotedWord)\n form.to_quoted_word.onto(stack)\nend\ntarget.at(\"asDecimal\", \"( F -- D ): asserts that Form is a Decimal form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asDecimal\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n100 asDecimal leaves: 100\\n```\\n\\n`__decimal__` hook can make a block usable in place of a\\ndecimal, provided its definition leaves a decimal or a\\nblock that implements `__decimal__`:\\n\\n```\\n[ $: x x $: __decimal__ this ] @: a\\n100 a asDecimal \\\"beware: leaves an instance of a\\\"\\n200 a a asDecimal \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Decimal)\nend\ntarget.at(\"quote?\", \"( F -- true/false ): leaves whether Form is a quote form,\\n or a block that implements '__quote__'.\\n\\n```\\n'foo' quote? leaves: true\\n[ 'foo' $: __quote__ this ] open quote? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Quote) || (form.is_a?(Block) && (form.can_be?(Quote)))].onto(stack)\nend\ntarget.at(\"asQuote\", \"( F -- Q ): asserts that Form is a Quote form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuote\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'foo' asQuote leaves: 'foo'\\n```\\n\\n`__quote__` hook can make a block usable in place of a\\nquote, provided its definition leaves a quote or a block\\nthat implements `__quote__`:\\n\\n```\\n[ $: x x $: __quote__ this ] @: a\\n'foo' a asQuote \\\"beware: leaves instance of a\\\"\\n'boo' a a asQuote \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Quote)\nend\ntarget.at(\"boolean?\", \"( F -- true/false ): leaves whether Form is a boolean form,\\n or a block that implements '__boolean__'.\\n\\n```\\ntrue boolean? leaves: true\\n[ true $: __boolean__ this ] open boolean? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Boolean) || (form.is_a?(Block) && (form.can_be?(Boolean)))].onto(stack)\nend\ntarget.at(\"asBoolean\", \"( F -- true/false ): asserts that Form is a boolean form, dies\\n if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBoolean\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\ntrue asBoolean leaves: true\\nfalse asBoolean leaves: false\\n```\\n\\n`__boolean__` hook can make a block usable in place of a\\nboolean, provided its definition leaves a boolean or a\\nblock that implements `__boolean__`:\\n\\n```\\n[ $: x x $: __boolean__ this ] @: a\\ntrue a asBoolean \\\"beware: leaves an instance of a\\\"\\ntrue a a asBoolean \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Boolean)\nend\ntarget.at(\"builtin?\", \"( F -- true/false ): leaves whether Form is a builtin form.\") do |_, stack|\n Boolean[stack.drop.is_a?(Builtin)].onto(stack)\nend\ntarget.at(\"asBuiltin\", \"( F -- B ): asserts Form is a Builtin, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asBuiltin\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#+ here asBuiltin toQuote leaves: '[ native code ]'\\n```\") do |_, stack|\n stack.top.a(Builtin)\nend\ntarget.at(\"color?\", \"( F -- true/false ): leaves whether Form is a color form,\\n or a block that implements '__color__'.\\n\\n```\\n0 0 0 rgb color? leaves: true\\n[ 0 0 0 rgb $: __color__ this ] open color? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Color) || (form.is_a?(Block) && (form.can_be?(Color)))].onto(stack)\nend\ntarget.at(\"asColor\", \"( F -- C ): asserts that Form is a Color form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asColor\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n0 0 0 rgb asColor toQuote leaves: 'rgb(0, 0, 0)'\\n```\\n\\n`__color__` hook can make a block usable in place of a\\ncolor, provided its definition leaves a color or a block\\nthat implements `__color__`:\\n\\n```\\n[ $: x x $: __color__ this ] @: a\\n0 0 0 rgb a asColor \\\"beware: leaves an instance of a\\\"\\n0 0 0 rgb a a asColor \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Color)\nend\ntarget.at(\"byteslice?\", \"( F -- true/false ): leaves whether Form is a byteslice\\n form, or a block that implements '__byteslice__'.\\n\\n```\\n'hello world' toByteslice byteslice? leaves: true\\n[ [ 'Hi!' toByteslice ] $: __byteslice__ this ] open byteslice? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Byteslice) || (form.is_a?(Block) && (form.can_be?(Byteslice)))].onto(stack)\nend\ntarget.at(\"asByteslice\", \"( F -- B ): asserts that Form is a Byteslice form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asByteslice\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'hello world' toByteslice asByteslice leaves: '[byteslice, consists of 11 mutable byte(s)]'\\n```\\n\\n`__byteslice__` hook can make a block usable in place of\\na byteslice, provided its definition leaves a byteslice\\nor a block that implements `__byteslice__`:\\n\\n```\\n[ $: x x $: __byteslice__ this ] @: a\\n'foo' toByteslice a asByteslice \\\"beware: leaves an instance of a\\\"\\n'foo' toByteslice a a asByteslice \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Byteslice)\nend\ntarget.at(\"pushes\", \"( B N F -- ): creates a definition for Name in Block that\\n pushes Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form))\nend\ntarget.at(\"opens\", \"( B N F -- ): creates a definition for Name in Block that\\n opens Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form, opener: true))\nend\ntarget.at(\"entry:submit\", \"( Ss N F -- ): replaces the value form of an existing\\n definition for Name in Submittable store (usually a block)\\n to Form. Does not change whether the definition opens\\n or pushes.\\n\\n```\\n[ 'John Doe' $: fullName\\n [ fullName count ] @: fullNameLength\\n] obj $: person\\n\\nperson.fullName leaves: 'John Doe'\\nperson.fullNameLength leaves: 8\\n\\n\\\"Let's try to change the name:\\\"\\nperson #fullName 'Alice Bobette' entry:submit\\nperson.fullName leaves: 'Alice Bobette'\\nperson.fullNameLength leaves: 13\\n\\n\\\"Now let's change the way we compute the length; let's count\\n how many double-Ts there are in the full name.\\\"\\nperson #fullNameLength [ person.fullName 'tt' occurrences count ] entry:submit\\n\\n\\\"... just one:\\\"\\nperson.fullNameLength leaves: 1\\n\\n\\\"... or maybe multiple:\\\"\\nperson #fullName 'Tette Mopettitte' entry:submit\\nperson.fullName leaves: 'Tette Mopettitte'\\nperson.fullNameLength leaves: 3\\n```\") do |_, stack|\n form = stack.drop\n name = stack.drop\n submittable = stack.drop.a(ISubmittableStore)\n submittable.submit(name, form)\nend\ntarget.at(\"entry:exists?\", \"( Rs N -- true/false ): leaves whether Readable store\\n (usually a block) can fetch value for Name.\\n\\n```\\n[ orphan $: table\\n orphan extendWith: [\\n [ ${ name age score }\\n [ name $: name\\n age $: age ] obj toDict $: record\\n table record score pushes\\n ] @: set\\n [ ${ name age } table (this toDict) entry:fetch ] @: get\\n [ ${ name age } table (this toDict) entry:exists? ] @: has?\\n [ table entry:names map: [ $: record\\n [\\n record.name (31 ' ' lpad) (31 '...' fit)\\n record.age toQuote (15 ' ' lpad) (15 '...' fit)\\n (table record entry:fetch) toQuote (16 ' ' lpad) (16 '...' fit)\\n ] vals sepBy: ' |'\\n ] sepBy: '\\n'\\n ] @: __quote__\\n ]\\n] @: newScoreboard\\n\\nnewScoreboard $: scoreboard\\n\\n'John Doe' 42 '100 points' scoreboard.set\\n'Johnanna Doe' 28 '170 points' scoreboard.set\\n'Alice H.' 19 '250 points' scoreboard.set\\n'David A.' 67 '90 points' scoreboard.set\\n\\nscoreboard echo\\n\\n\\\"\\\"\\\"STDOUT:\\n John Doe | 42 | 100 points⏎\\n Johnanna Doe | 28 | 170 points⏎\\n Alice H. | 19 | 250 points⏎\\n David A. | 67 | 90 points⏎\\n\\\"\\\"\\\"\\n\\n'John Doe' 42 scoreboard.get leaves: '100 points'\\n'Alice H.' 19 scoreboard.get leaves: '250 points'\\n\\n'David A.' 67 scoreboard.has? leaves: true\\n'David A.' 123 scoreboard.has? leaves: false\\n'Peter Peterson' 19 scoreboard.has? leaves: false\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.has_form_for?(name)].onto(stack)\nend\ntarget.at(\"entry:fetch\", \"( Rs N -- F ): leaves the value Form with the given Name\\n in Readable store (usually a block). Does not open the\\n value form. Dies if Store does not contain an entry\\n for Name.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: a\\n\\na #x entry:fetch leaves: 100\\na #y entry:fetch leaves: 200\\na #a entry:fetch leaves: a \\\"via inheritance\\\"\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n (store.form_for(name)).onto(stack)\nend\ntarget.at(\"entry:fetch?\", \"( Rs N -- F true / false ): leaves value Form of the entry with\\n the given Name in Readable store (usually a block), follows it\\n with `true`. If there is no entry with the given name leaves\\n `false` only. Does not open the value form.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: a\\n\\na #x entry:fetch? leaves: [ 100 true ]\\na #y entry:fetch? leaves: false\\n\\na ('Enter name> ' readLine or: okbye toWord) entry:fetch? br:\\n [ 'Here is its value: ' _ ~ ]\\n 'Entry does not exist :('\\necho\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n if form = store.form_for?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:open\", \"( Rs C N -- ... ): resolves Name in Readable store and *opens*\\n it if it is an opener, assuming Caller to be the opener block.\") do |_, stack|\n name = stack.drop.a(Word)\n caller = stack.drop.a(Block)\n store = stack.drop.a(IReadableStore)\n if store.is_a?(Block)\n else\n form = store.form_for(name)\n form.onto(stack)\n next\n end\n entry = store.entry_for(name)\n if entry.opener?\n caller.inject(Word.new(\"open\"))\n end\n entry.onto(stack)\nend\ntarget.at(\"entry:flatFetch?\", \"( B N -- F true / false ): leaves the value Form of the entry with the\\n given Name in Block's dictionary. Follows it by `true` if it exists.\\n Leaves only `false` if there is no such entry in Block. Block hierarchy\\n (friends, parents) is not traversed. This word only looks at Block's\\n own dictionary). Does not open the value Form.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: myParent\\n[ 'hello' $: x ] obj $: myChild\\n\\n(myParent -- myChild) drop\\n\\nmyParent #x entry:flatFetch? leaves: [ 100 true ]\\nmyParent #y entry:flatFetch? leaves: [ 200 true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\nmyChild #x entry:flatFetch? leaves: [ 'hello' true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\n\\\"Even though myChild is a child of myParent and has access to 'y',\\n `entry:flatFetch?` doesn't care.\\\"\\nmyChild #y entry:flatFetch? leaves: false \\\"doesn't inherit!\\\"\\n\\n\\\"Compare it with `entry:fetch?`:\\\"\\nmyChild #y entry:fetch? leaves: [ 200 true ]\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if form = block.flat_at?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:opener?\", \"( Rs N -- true/false ): leaves whether an entry with the given\\n Name is an opener entry in Readable store (usually a block).\\n Dies if Readable store has no entry with the given Name.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: foo\\n\\nfoo #x entry:opener? leaves: false\\nfoo.x leaves: 100\\n\\n\\\"Change not only the value form for 'x' but also its type: make\\n it an opener.\\\"\\nfoo extend: [ [ 1 2 + ] @: x ]\\n\\nfoo #x entry:opener? leaves: true\\nfoo.x leaves: 3\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.opener?(name)].onto(stack)\nend\ntarget.at(\"entry:delete\", \"( B N -- ): removes the entry corresponding to Name form\\n from the dictionary of Block if it exists there. Otherwise,\\n does nothing.\\n\\n```\\n100 $: x\\n\\n[ 200 $: x ] obj $: foo\\n\\n\\\"'x' of foo shadows 'x' of toplevel block\\\"\\nfoo.x leaves: 200\\n\\n\\\"Let's try to remove it so it doesn't:\\\"\\nfoo #x entry:delete\\nfoo.x leaves: 100\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n block.delete_entry(name)\nend\ntarget.at(\"entry:wipeout\", \"( B -- ): removes all *owned* dictionary entries in Block.\\n\\n```\\n[ 100 $: x\\n 200 $: y\\n] obj $: numbers\\n\\nnumbers entry:names leaves: [ [x y] ]\\n\\nnumbers entry:wipeout\\nnumbers entry:names leaves: [ [] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.clear_entries\nend\ntarget.at(\"entry:pathTo?\", \"( B N -- P F true / false ): leaves Path, a block describing the\\n path to Form (including Block itself) under the corresponding\\n Name (like `entry:fetch?`). Follows Path and Form with `true`\\n indicating success, otherwise *only* `false` indicating that\\n there is no Form corresponding to Name in Block or any of the\\n blocks reachable from Block.\\n\\nThis word exists mainly for testing word lookup sanity. Feel free\\nto use it if you find any reason to!\\n\\n```\\n[ 100 $: x 'a' $: __quote__ ] obj $: a\\n[ 200 $: y 'b' $: __quote__ ] obj $: b\\n[ 300 $: z 'c' $: __quote__ ] obj $: c\\n\\na -- b -- c drop\\n\\n[ a #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ a ] 100 true'\\n[ b #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ b a ] 100 true'\\n[ c #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b a ] 100 true'\\n\\n[ b #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ b ] 200 true'\\n[ c #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b ] 200 true'\\n\\n[ c #z entry:pathTo? ] vals sepBy: ' ' leaves: '[ c ] 300 true'\\n\\n[ c #foo entry:pathTo? ] vals sepBy: ' ' leaves: 'false'\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if result = block.path_to_entry?(name)\n else\n Boolean[false].onto(stack)\n next\n end\n needle, path = result\n path.onto(stack)\n needle.onto(stack)\n Boolean[true].onto(stack)\nend\ntarget.at(\"entry:names\", \"( B -- Nb ): gathers all *owned* dictionary entry names of Block\\n into Name block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop \\\"for good measure :)\\\"\\n\\nmyParent entry:names leaves: [ [y x] ]\\nmyChild entry:names leaves: [ [z] ]\\nmyFriend entry:names leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_name do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:names*\", \"( B -- Nb ): gathers all dictionary entry names *reachable* from\\n Block to Name block. That is, gathers all entry names in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance of\\nBlock's relative graph.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:names* leaves: [ [y x greeting] ]\\nmyChild entry:names* leaves: [ [z y x greeting] ]\\nmyFriend entry:names* leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n names = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_name do |name|\n names << name\n if leaf\n next\n end\n leaf = name.is_a?(Block)\n end\n nil\n end\n names.uniq!\n (Block.with(names, leaf)).onto(stack)\nend\ntarget.at(\"entry:values\", \"( B -- Vb ): gathers all *owned* dictionary entry value forms of\\n Block into Value block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values leaves: [ [200 100] ]\\nmyChild entry:values leaves: [ [300] ]\\nmyFriend entry:values leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_value do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:values*\", \"( B -- Nb ): gathers all dictionary entry values *reachable* from\\n Block to Name block. That is, gathers all entry values in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance\\nof Block's relative graph. Values may repeat if some blocks\\nin this graph define entries with the same name.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values* leaves: [ [200 100 'Hello World'] ]\\nmyChild entry:values* leaves: [ [300 200 100 'Hello World'] ]\\nmyFriend entry:values* leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n values = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_value do |value|\n values << value\n if leaf\n next\n end\n leaf = value.is_a?(Block)\n end\n nil\n end\n (Block.with(values, leaf)).onto(stack)\nend\ntarget.at(\"entry:count\", \"( B -- Ec ): leaves Entry count, that is, the amount of entries\\n owned by (defined in) Block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myBlock\\n\\nmyBlock entry:count leaves: 2 \\\"'x' and 'y'\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.entry_count)).onto(stack)\nend\ntarget.at(\"shallowCopy\", \"( B -- C ): makes a shallow copy (sub-blocks are not copied)\\n of Block's tape and dictionary, and leaves a Copy block with\\n the tape copy, dictionary copy set as its tape, dictionary.\\n\\n```\\n[ 1 2 3 ] $: a\\na shallowCopy $: b\\na #x 0 pushes\\nb #y 1 pushes\\nb 1 shove\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 1 · ${y :: 1} ]⏎\\\"\\n```\") do |_, stack|\n (stack.drop.a(Block)).shallow.onto(stack)\nend\ntarget.at(\"resub\", \"( O B -- ): replaces the substrate of Block with Other's\\n substrate. This is useful if you want to swap Block's\\n contents with Other's without changing Block's identity:\\n\\n```\\n[ 1 2 3 ] $: a\\n[ 'a' 'b' 'c' ] $: b\\nb #x 0 pushes\\nb echo\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n```\\n\\nNote that since *substrate* is replaced, not *tape*, the\\ncursor position is saved:\\n\\n```\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\nb 2 |-\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' | 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 | 2 3 · ${x :: 0} ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n other = stack.drop.a(Block)\n block.resub(other)\nend\ntarget.at(\"fromLeft\", \"( B/Q/Bf I -- E ): leaves Index-th Element from left in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(index.to_i)).onto(stack)\nend\ntarget.at(\"fromRight\", \"( B/Q/Bf I -- E ): leaves Index-th Element from right in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromRight leaves: 3\\n[ 1 2 3 ] 1 fromRight leaves: 2\\n[ 1 2 3 ] 2 fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at((form.count - index.to_i) - 1)).onto(stack)\nend\ntarget.at(\"fromLeft*\", \"( B/Q/Bf N -- Eb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from left in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromLeft* leaves: [ [ 1 ] ]\\n[ 1 2 3 ] 2 fromLeft* leaves: [ [ 1 2 ] ]\\n[ 1 2 3 ] 3 fromLeft* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromLeft* leaves: [ [ 1 2 3 ] ]\\n'hello' 3 fromLeft* leaves: 'hel'\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(0, size.to_i - 1)).onto(stack)\nend\ntarget.at(\"fromRight*\", \"( B/Q/Bf N -- Fb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from right in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromRight* leaves: [ [ 3 ] ]\\n[ 1 2 3 ] 2 fromRight* leaves: [ [ 2 3 ] ]\\n[ 1 2 3 ] 3 fromRight* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromRight* leaves: [ [ 1 2 3 ] ]\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(form.count - size.to_i, form.count - 1)).onto(stack)\nend\ntarget.at(\"+\", \"( A B -- S ): leaves the Sum of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a + b)\nend\ntarget.at(\"-\", \"( A B -- D ): leaves the Difference of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a - b)\nend\ntarget.at(\"*\", \"( A B -- P ): leaves the Product of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a * b)\nend\ntarget.at(\"/\", \"( A B -- Q ): leaves the Quotient of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"division by zero\")\n end\n stack.add(a / b)\nend\ntarget.at(\"mod\", \"( A B -- M ): leaves the Modulo of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"modulo by zero\")\n end\n stack.add(a % b)\nend\ntarget.at(\"**\", \"( A B -- R ): raises A to the power B, leaves Result.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a ** b)\nend\ntarget.at(\"round\", \"( D -- Rd ): rounds Decimal towards the nearest integer,\\n leaves the corresoinding Rounded decimal. If both neighboring\\n integers are equidistant, rounds towards the even neighbor\\n (Banker's rounding).\\n\\n```\\n1 round leaves: 1\\n1.23 round leaves: 1\\n\\n1.5 round leaves: 2\\n1.67 round leaves: 2\\n\\n2.5 round leaves: 2 \\\"rounds towards the even neighbor\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.round.onto(stack)\nend\ntarget.at(\"floor\", \"( D -- Rd ): rounds Decimal *down* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 floor leaves: 1\\n1.23 floor leaves: 1\\n\\n1.5 floor leaves: 1\\n1.67 floor leaves: 1\\n\\n2.5 floor leaves: 2\\n\\n-2.5 floor leaves: -3 \\\"rounds down!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.floor.onto(stack)\nend\ntarget.at(\"ceil\", \"( D -- Rd ): rounds Decimal *up* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 ceil leaves: 1\\n1.23 ceil leaves: 2\\n\\n1.5 ceil leaves: 2\\n1.67 ceil leaves: 2\\n\\n2.5 ceil leaves: 3\\n\\n-2.5 ceil leaves: -2 \\\"rounds up!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.ceil.onto(stack)\nend\ntarget.at(\"trunc\", \"( D -- Rd ): rounds Decimal towards zero, leaves the resulting\\n Rounded decimal.\\n\\n```\\n1 trunc leaves: 1\\n1.23 trunc leaves: 1\\n1.5 trunc leaves: 1\\n1.67 trunc leaves: 1\\n2.5 trunc leaves: 2\\n\\n-2.3 trunc leaves: -2\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.trunc.onto(stack)\nend\ntarget.at(\"sqrt\", \"( D -- R ): leaves the square Root of Decimal.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.sqrt.onto(stack)\nend\ntarget.at(\"cos\", \"( Air -- Dc ): leaves Decimal cosine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_cos.onto(stack)\nend\ntarget.at(\"sin\", \"( Air -- Ds ): leaves Decimal sine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_sin.onto(stack)\nend\ntarget.at(\"rand\", \"( -- Rd ): leaves a Random decimal between 0 and 1.\") do |_, stack|\n (Decimal.new(rand)).onto(stack)\nend\ntarget.at(\"sliceQuoteAt\", \"( Q Sp -- Pb Pa ): for the given Quote, leaves the Part\\n before and Part after Slice point.\\n\\n```\\n'hello world' 2 sliceQuoteAt leaves: [ 'he' 'llo world' ]\\n```\") do |_, stack|\n spt = stack.drop.a(Decimal)\n quote = stack.drop.a(Quote)\n qpre, qpost = quote.slice_at(spt.to_i)\n qpre.onto(stack)\n qpost.onto(stack)\nend\ntarget.at(\"count\", \"( B/Q/Bf -- N ): leaves N, the amount of elements/graphemes/\\n bytes in Block/Quote/Byteslice form.\") do |_, stack|\n form = stack.drop.a((Block | Quote) | Byteslice)\n (Decimal.new(form.count)).onto(stack)\nend\ntarget.at(\"chr\", \"( Uc -- Q ): leaves a quote that consists of a single\\n character with the given Unicode codepoint.\") do |_, stack|\n ord = (stack.drop.a(Decimal)).posint.in(0..55295, 57344..1114111)\n (Quote.new(ord.chr)).onto(stack)\nend\ntarget.at(\"ord\", \"( Q -- Uc ): leaves the Unicode codepoint for the first\\n character in Quote. Dies if Quote is empty.\") do |_, stack|\n quote = stack.drop.a(Quote)\n if ord = quote.ord?\n else\n quote.die(\"ord: quote must contain at least one character\")\n end\n (Decimal.new(ord)).onto(stack)\nend\ntarget.at(\"lpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the left of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' lpad leaves: '-----hello'\\n'hello' 10 ':-' lpad leaves: ':----hello'\\n'hello' 7 'XYZABC' lpad leaves: 'XYhello'\\n'hello' 9 'XYZABC' lpad leaves: 'XYZAhello'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Left)).onto(stack)\nend\ntarget.at(\"rpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the right of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' rpad leaves: 'hello-----'\\n'hello' 10 ' -' rpad leaves: 'hello ----'\\n'hello' 7 'foobar' rpad leaves: 'hellofo'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Right)).onto(stack)\nend\ntarget.at(\"fit\", \"( Q Tl Eq -- Fq ): if Quote is longer than Total length, truncates\\n it so that it can fit Ellipsis quote, and stitches the truncated\\n Quote with the Ellipsis quote, forming Fit quote which is then\\n left on the stack.\\n\\nEssentially, Fit quote is guaranteed to be of Total length\\ncharacters **or less!**.\\n\\n```\\n'hello' 10 '…' fit leaves: 'hello'\\n'hello world' 10 '…' fit leaves: 'hello wor…'\\n'hello world' 8 '' fit leaves: 'hello wo'\\n'Lorem ipsum dolor sit amet' 10 '-' fit leaves: 'Lorem ipsu-'\\n'Lorem ipsum dolor sit amet' 24 '… (hidden)' fit leaves: 'Lorem ipsum do… (hidden)'\\n```\") do |_, stack|\n ellipsis = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.fit(total.to_i, ellipsis)).onto(stack)\nend\ntarget.at(\"|at\", \"( B -- N ): leaves N, the position of the cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n cursor = Decimal.new(block.cursor)\n cursor.onto(stack)\nend\ntarget.at(\"|to\", \"( B N -- ): moves the cursor in Block to N.\") do |_, stack|\n cursor = stack.drop.a(Decimal)\n block = stack.drop.a(Block)\n block.to(cursor.to_i)\nend\ntarget.at(\"<|\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor - 1)\nend\ntarget.at(\"|>\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor + 1)\nend\ntarget.at(\"|slice\", \"( B -- Lh Rh ): slices Block at cursor. Leaves Left half\\n and Right half.\") do |_, stack|\n block = stack.drop.a(Block)\n lhs, rhs = block.slice\n lhs.onto(stack)\n rhs.onto(stack)\nend\ntarget.at(\"cherry\", \"( [ ... E | ... ]B ~> [ ... | ... ]B -- E ): drops Block\\n and Element before cursor in Block (and moves cursor back\\n once), leaves Element.\") do |_, stack|\n (stack.drop.a(Block)).drop.onto(stack)\nend\ntarget.at(\"shove\", \"( [ ... | ... ]B E ~> [ ... E | ... ]B -- ): adds Element\\n before cursor in Block (and moves cursor forward once),\\n drops both.\") do |_, stack|\n stack.drop.onto(stack.drop.a(Block))\nend\ntarget.at(\"shove*\", \"( [ ...bl | ...br ]B [ ...el | ...er ]Eb ~> [ ...bl ...el | ...br ]B -- ): adds\\n elements before cursor in Element block after the cursor in Block.\\n\\n```\\n[ 1 2 3 ] $: xs\\nxs [ 4 5 6 ] shove*\\nxs leaves: [ [ 1 2 3 4 5 6 \\\"|\\\" ] ]\\n\\n[ 1 | 2 3 ] $: ys\\nys [ 100 200 300 ] shove*\\nys leaves: [ 1 100 200 300 | 2 3 ]\\n```\") do |_, stack|\n elems = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.paste(elems)\nend\ntarget.at(\"eject\", \"( [ ... | F ... ]B ~> [ ... | ... ]B -- F ): drops and\\n leaves the Form after cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.eject\n form.onto(stack)\nend\ntarget.at(\"inject\", \"( B F -- ): inserts Form to Block: adds Form to Block,\\n and moves cursor back again.\") do |_, stack|\n form = stack.drop\n block = stack.drop.a(Block)\n block.inject(form)\nend\ntarget.at(\"thru\", \"( [ ... | F ... ] -> [ ... F | ... ] -- F ): moves cursor\\n after Form, and leaves Form. Dies if cursor is at the end.\\n\\nNote: prefer `thru` to `eject` because `eject` modifies\\nthe block, and that may cause a tape copy which uses up\\na bit of memory and resources. The difference would matter\\nonly in high load scenarios, though.\\n\\nNote: anything that *does not* `ahead inject` will be OK\\nwith `ahead thru`. And even if it does `ahead inject`,\\nstill, there are ways to overcome the problems from not\\n`ahead eject`ing.\") do |_, stack|\n block = stack.drop.a(Block)\n block.thru.onto(stack)\nend\ntarget.at(\"thruBlock\", \"( B -- Bf / [ Vf ] ): similar to `thru` for Block. If\\n form after cursor is a Block form, it is left. If it is\\n a Value form, then it is enclosed in a new block whose\\n parent is Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.thru\n if form.is_a?(Block)\n form.onto(stack)\n else\n child = Block.new(block)\n child.add(form)\n child.onto(stack)\n end\nend\ntarget.at(\"top\", \"( [ ... F | ... ]B -- F ): leaves the top Form in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.top.onto(stack)\nend\ntarget.at(\"mergeDicts\", \"( Rb Db -- ): copies entries from Donor block's dictionary\\n to Recipient block's dictionary. Donor entries override\\n same-named entries in Recipient. Donor entries starting\\n with one or more underscores are not imported.\\n\\n```\\n[ ] $: a\\na #x 100 pushes\\na #_private 'Fool!' pushes\\n[ ] $: b\\nb #y 200 pushes\\n\\na b 2echo\\n\\\"STDOUT: [ · ${x :: 100} ${_private :: 'Fool!'} ]⏎\\\"\\n\\\"STDOUT: [ · ${y :: 200} ]⏎\\\"\\n\\nb a mergeDicts\\nb echo\\n\\\"STDOUT: [ · ${y :: 200} ${x :: 100} ]⏎\\\"\\n```\") do |_, stack|\n donor = stack.drop.a(Block)\n recpt = stack.drop.a(Block)\n recpt.import!(from: donor)\nend\ntarget.at(\"sortUsing!\", \"( B Cb -- B ): leaves Block sorted inplace. Forms in Block\\n are compared using Comparator block.\\n\\nComparator block is opened with two forms on the stack; let's\\ncall them A and B. If Comparator block leaves a negative decimal\\n(conventionally `-1`), then `A < B`. If Comparator block leaves\\n`0`, then `A = B`. If Comparator block leaves a positive decimal\\n(conventionally `1`), then `A > B`.\\n\\nDies if Comparator block leaves any other (kind of) form.\\n\\nIgnores all forms but the topmost for Comparator block.\\n\\n\\n```\\n[ 3 2 1 ] [ - ] sortUsing! leaves: [ 1 2 3 ]\\n```\") do |_, stack|\n cmp = stack.drop.a(Block)\n block = stack.top.a(Block)\n block.sort_using! do |a, b|\n stack = Block.with(a, b)\n ((Engine.exhaust(Engine.current.capabilities, cmp, stack)).top.a(Decimal)).to_i\n end\nend\ntarget.at(\"getErrorDetails\", \"( Eo -- Dq ): leaves Details quote containing error details\\n of an Error object.\") do |_, stack|\n error = stack.drop.a(Error)\n (Quote.new(error.details)).onto(stack)\nend\ntarget.at(\"toQuote\", \"( F -- Qr ): leaves Quote representation of Form.\") do |_, stack|\n stack.drop.to_quote.onto(stack)\nend\ntarget.at(\"toByteslice\", \"( Q -- B ): leaves immutable Byteslice for Quote.\") do |_, stack|\n (stack.drop.a(Quote)).to_byteslice.onto(stack)\nend\ntarget.at(\"replaceAll\", \"( Sq Pq Q -- Rq ): replaces all instances of Pattern quote\\n in Source quote with Quote. Leaves the Resulting quote.\\n\\n```\\n'hello' 'l' 'y' replaceAll leaves: 'heyyo'\\n```\") do |_, stack|\n repl = stack.drop.a(Quote)\n pattern = stack.drop.a(Quote)\n quote = stack.drop.a(Quote)\n (quote.replace_all(pattern, repl)).onto(stack)\nend\ntarget.at(\"effect\", \"( F -- Eq ): leaves Effect quote for Form.\\n\\nIf Form is not a block nor a builtin, it is simply converted\\nto quote in the same way as `toQuote`.\\n\\nIf Form is a block or a builtin, an attempt is made at\\nextracting a stack effect expression from its comment.\\nIf the attempt fails, Form's description is left. If the\\nattempt was successful, the extracted stack effect quote\\nis added onto the stack as Effect quote.\\n\\n```\\n100 effect leaves: '100'\\ntrue effect leaves: 'true'\\n\\n[] effect leaves: 'a block'\\n[ \\\"Hello World\\\" ] effect leaves: 'a block'\\n[ \\\"( -- ) \\\"] effect leaves: '( -- )'\\n\\n#+ here effect leaves: '( A B -- S )' \\\"(yours may differ)\\\"\\n#map: here effect leaves: '( Lb B -- MLb )'\\n```\") do |_, stack|\n (Quote.new(stack.drop.effect)).onto(stack)\nend\ntarget.at(\"die\", \"( D/Eo -- ): dies with Details quote/Error object.\") do |engine, stack|\n form = stack.drop.a(Quote | Error)\n case form\n in Quote\n raise(engine.die(form.string))\n in Error\n raise(form)\n end\nend\ntarget.at(\"stitch\", \"( Q1 Q2 -- Q3 ): quote concatenation.\") do |_, stack|\n b = stack.drop.a(Quote)\n a = stack.drop.a(Quote)\n stack.add(a.stitch(b))\nend\ntarget.at(\"reparent\", \"( Cb Pb -- Cb ): changes the parent of Child block to Parent block.\\n Lookup cycles are allowed and handled gracefully.\") do |_, stack|\n parent = stack.drop.a(Block)\n child = stack.top.a(Block)\n child.parent = parent\nend\ntarget.at(\"befriend\", \"( B F -- ): adds Friend to Block's friend list.\\n\\nFriends are asked for word entries after parents, grandparents\\netc. have failed to retrieve them. This recurses, e.g. friends\\nask their own friends and so on, until the entry is found. Lookup\\ncycles are allowed and handled gracefully.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\nb a befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\nb.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\nb.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\na #x [ 'I\\\\'ve changed!' echo ] opens\\n\\na.x\\n\\\"STDOUT: I've changed!⏎\\\"\\nb.x\\n\\\"STDOUT: I've changed!⏎\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.befriend(friend)\nend\ntarget.at(\"unfriend\", \"( B F -- ): removes Friend from Block's friend list. Does\\n nothing if Friend is not in the friend list. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na b unfriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n source = stack.drop.a(Block)\n source.unfriend(friend)\nend\ntarget.at(\"friends\", \"( B -- Fl ): leaves Friend list of Block. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na friends count echo\\n\\\"STDOUT: 1⏎\\\"\\na friends first b same? echo\\n\\\"STDOUT: true⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na friends [ drop ] hydrate\\na friends count echo\\n\\\"STDOUT: 0⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n source = stack.drop.a(Block)\n source.friends.onto(stack)\nend\ntarget.at(\"slurp\", \"( B Q -- B ): parses Quote and adds all forms from Quote\\n to Block.\") do |_, stack|\n source = stack.drop.a(Quote)\n block = stack.top.a(Block)\n block.slurp(source.string)\nend\ntarget.at(\"orphan\", \"( -- B ): creates and leaves a new orphan Block.\\n\\nOrphan blocks are blocks without a parent. Therefore, they do not\\nparticipate in any block hierarchy until they acquire some friends,\\nor a parent, and when (and whether) this should happen if for you —\\nnot Novika, as is usually the case — to decide.\\n\\n```\\n'Outer A' $: a\\n'Outer B' $: b\\n\\norphan $: x\\n\\n[ [ drop 'I die!' ] @: __died__ x.a ] do leaves: 'I die!'\\n[ [ drop 'I die too!' ] @: __died__ x.b ] do leaves: 'I die too!'\\n\\n\\\"Define `a` and `b` on the block itself. As you can see there\\n is no inheritance.\\\"\\nx extend: [\\n 100 $: a\\n 200 $: b\\n]\\n\\n\\\"Now `a` and `b` are looked up fine.\\\"\\nx.a leaves: 100\\nx.b leaves: 200\\n```\") do |_, stack|\n Block.new.onto(stack)\nend\ntarget.at(\"orphan?\", \"( B -- true/false ): leaves whether the given Block is an orphan\\n (see `orphan`).\\n\\n```\\norphan orphan? leaves: true\\n[ \\\"I'm not an orphan\\\" ] orphan? leaves: false\\n```\") do |_, stack|\n Boolean[!(stack.drop.a(Block)).parent?].onto(stack)\nend\ntarget.at(\"toOrphan\", \"( B -- B ): makes Block an orphan (destroys the link with\\n its parent).\\n\\n```\\n0 $: x\\n[ ] $: b\\nb . x echo\\n\\\"STDOUT: 0⏎\\\"\\n\\nb toOrphan leaves: [ [ ] ]\\n. x\\n\\\"Sorry: no value form found for 'x'\\\"\\\"\\n```\") do |_, stack|\n (stack.top.a(Block)).parent = nil\nend\ntarget.at(\"toTape\", \"( B -- Tb ): leaves Tape block for Block, i.e., the tape part\\n of Block. Useful for e.g. comparing two blocks only for tape\\n content, when Block may have dictionary entries.\\n\\nLookup hierarchy is destroyed: Tape block is an orphan.\\n\\n```\\n[ 1 2 3 ] $: a\\na #x 0 pushes\\na (a toTape) 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_tape_block.onto(stack)\nend\ntarget.at(\"toDict\", \"( B -- Db ): leaves Dictionary block for Block, i.e., the dictionary\\n part of Block. Useful for e.g. comparing two blocks only for dictionary\\n content in case tape contents differ.\\n\\nLookup hierarchy is destroyed: Dictionary block is an orphan.\\n\\n```\\n[ ${ x y } this ] @: createPoint\\n\\n10 20 createPoint $: a\\n10 20 createPoint $: b\\n\\na b = leaves: false\\n\\n\\\"And not for the reason you might think of. Their TAPES are not\\n equal; `a` and `b` are not only objects, they are also pieces\\n of code that led to each one's creation (sort of).\\\"\\na toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\nb toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\n\\n\\\"Let's strip the code using toDict:\\\"\\na toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\nb toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\n = leaves: true \\\"< now they're equal\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_dict_block.onto(stack)\nend\ntarget.at(\"desc\", \"( F -- Dq ): leaves the Description quote of the given Form.\\n\\n```\\n100 desc leaves: 'decimal number 100'\\n'foobar' desc leaves: 'quote \\\\\\\\'foobar\\\\\\\\''\\n[ 1 2 3 ] desc leaves: 'a block'\\n[ \\\"I am a block\\\" 1 2 3 ] desc leaves: 'I am a block'\\ntrue desc leaves: 'boolean true'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.desc)\n quote.onto(stack)\nend\ntarget.at(\"typedesc\", \"( F -- Dq ): leaves the type Description quote of the\\n given Form.\\n\\n```\\n100 typedesc leaves: 'decimal'\\n'foobar' typedesc leaves: 'quote'\\n[ 1 2 3 ] typedesc leaves: 'block'\\n[ \\\"I am a block\\\" 1 2 3 ] typedesc leaves: 'block'\\ntrue typedesc leaves: 'boolean'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.class.typedesc)\n quote.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/FFI","path":"Novika/Capabilities/Impl/FFI.html","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"ffi\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words for working with foreign functions, structs, and unions\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"ffi:library?\", \"( F -- true/false ): leaves whether Form is a foreign\\n library form.\\n\\n```\\n'foo' ffi:getLibrary ffi:library? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Library)].onto(stack)\nend\ntarget.at(\"ffi:layout?\", \"( F -- true/false ): leaves whether Form is a foreign\\n layout form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:layout? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(StructLayoutForm)].onto(stack)\nend\ntarget.at(\"ffi:struct&?\", \"( F -- true/false ): leaves whether Form is a struct\\n reference view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint& ffi:struct&? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.reference?)].onto(stack)\nend\ntarget.at(\"ffi:struct~?\", \"( F -- true/false ): leaves whether Form is an inline\\n struct view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct~ $: point~\\npoint~ ffi:struct~? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.inline?)].onto(stack)\nend\ntarget.at(\"ffi:union?\", \"( F -- true/false ): leaves whether Form is a union\\n view form.\\n\\n```\\n[ chr char ord u8 ] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxU\\nquuxU ffi:union? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.union?)].onto(stack)\nend\ntarget.at(\"ffi:hole?\", \"( F -- true/false ): leaves whether Form is a hole.\\n\\n```\\n#i32 ffi:hole $: intHole\\n\\nintHole ffi:hole? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Hole)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary?\", \"( I -- Lf true / false ): leaves Library form followed by true\\n if dynamic library with the given Id exists and was loaded &\\n retrieved successfully; otherwise, leaves false.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary? leaves: [ \\\"[foreign library]\\\" true ]\\n'random-nonexisting-library' ffi:getLibrary? leaves: false\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n library.onto(stack)\n end\n Boolean[!(!library)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary\", \"( I -- Lf ): leaves Library form if dynamic library with the\\n given Id exists and was loaded & retrieved successfully;\\n otherwise, dies.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary ffi:library? leaves: true\\n'random-nonexisting-library' ffi:getLibrary \\\"Dies: no such library\\\"\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n else\n id.die(\"no such library\")\n end\n library.onto(stack)\nend\ntarget.at(\"ffi:createLayout\", \"( Lb -- Slf ): parses Layout block and leaves the resulting\\n Struct layout form.\\n\\nStruct layouts are a generalization over structs (heap-\\nallocated and stack-allocated) and unions. They literally\\ndescribe how structs (unions) are layed out in memory.\\n\\nLayout block consists of *name words followed by type words*.\\nSee the example below. A reference to another struct layout\\ncan be made in Layout block using the prefixes `&` (heap-\\nallocated struct, i.e., pointer to struct), `~` (inline or\\nstack-allocated struct), and `?` (stack-allocated union).\\n\\nInline struct cycles are forbidden. Union cycles are forbidden.\\nEither could be hidden behind a reference/pointer.\\n\\nLayout block is parsed lazily (on first use, e.g., by `toQuote`,\\n`allocateStruct` variants, `=`, etc.) Therefore, you can define\\nself-referential structs, mutually referential structs, and\\nreference layouts that are defined later.\\n\\nSee FFI documentation on GitHub Wiki for a list of available\\ntypes and the corresponding C types.\\n\\n```\\n[ x f32\\n y f32\\n] ffi:createLayout $: point\\n\\n[ datum ~point \\\"<- inline struct\\\"\\n next &pointNode \\\"<- struct reference\\\"\\n] ffi:createLayout $: pointNode\\n\\n[ asPoint &point\\n asPointNode ~pointNode\\n] ffi:createLayout $: pointNodeUnion\\n\\n[ type u8\\n value ?pointNodeUnion \\\"<- stack-allocated union\\\"\\n] ffi:createLayout $: pointNodeOrPoint\\n```\") do |engine, stack|\n decl = stack.drop.a(Block)\n this = engine.block\n names = [] of Word\n types = [] of Word\n cur, nxt = names, types\n decl.each do |form|\n if form.is_a?(Word)\n else\n form.die(\"only words (for field name and for field type) are allowed in struct layout declaration\")\n end\n cur << form\n cur, nxt = nxt, cur\n end\n if names.size == types.size\n else\n decl.die(\"malformed struct layout: missing field name or type\")\n end\n if names.empty?\n decl.die(\"struct layout must have at least one field\")\n end\n (StructLayoutForm.new(this, names, types, decl.prototype.comment?)).onto(stack)\nend\n{% for method, desc in {inline: {\"~\", :InlineStruct, \"Isv\", \"Inline struct\"}, reference: {\"&\", :StructReference, \"Srv\", \"Struct reference\"}} %}\n\n {% sign, cls, ann, qual = desc %}\n\n target.at(\"ffi:allocateStruct{{ sign.id }}\", <<-END\n ( Slf -- {{ ann.id }} ): allocates {{ qual.id }} view for the\n given Struct layout form. If the struct is no longer in\n use, it is freed by the GC automatically.\n\n This word is **unsafe**: the resulting {{ qual.id }} view is\n in an undefined state (may contain junk) before you (or the\n C code you pass it to) fills it with good values. Showing\n the struct view left by this word to clients may expose your\n program to a whole class of security vulnerabilities.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n point ffi:allocateStruct{{ sign.id }} $: point{{ sign.id }}\n point{{ sign.id }} #x 123 entry:submit\n point{{ sign.id }} #y 456 entry:submit\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=123_i32, y=456_i32⟩'\n ```\n END\n ) do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.{{ method.id }}.make!\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:buildStruct{{ sign.id }}\", <<-END\n ( Eb Slf -- {{ ann.id }} ): allocates and fills {{ qual.id }}\n view with entries by asking Entry block for them.\n\n If Entry block is missing an entry matching a field that\n Struct layout form declares, and that field is of type\n `pointer` or struct reference (`&`), `none` (C nullptr)\n is used as the value. Dies if Entry block is missing\n matching entry or entries for fields of other types.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n\n \"Note: `this` has entries called `x` and `y`. `point` has\n fields called `x` and `y`. A match!\"\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = layout_form.layout\n view = layout.{{ method.id }}.make!\n layout.each_desc_with_index do |desc|\n entry = block.entry_for? Word.new(desc.id)\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n elsif desc.type.is_a?(Novika::FFI::UntypedPointer.class) || desc.type.is_a?(Novika::FFI::StructReferenceType)\n view[desc.id] = Novika::FFI::UntypedPointer.none\n else\n block.die(\n \"block is missing field '#{desc.id}'. Note that none (C nullptr) \\\n as default value is only supported for untyped pointers (`pointer`) \\\n and struct references (`&name`)\")\n end\n end\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:asStruct{{ sign.id }}\", <<-END\n ( A Slf -- {{ ann.id }} ): creates and leaves {{ qual.id }} view\n for the given Address, according to Struct layout form.\n\n This word is **unsafe**: it does not check whether Address\n points at something that is layed out according to Struct\n layout form. Passing 0 (none aka null pointer) for Address\n will lead to segfault. Passing Address that is outside of\n your program's memory will lead to segfault. Passing Address\n that *is* in the bounds of your program's memory, but one\n not pointing at a struct in accordance with Struct layout\n form, will lead to undefined behavior (most likely junk\n values in {{ qual.id }} view).\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} ffi:addressof $: addr\n\n addr point ffi:asStruct{{ sign.id }} $: addrPoint{{ sign.id }}\n addrPoint{{ sign.id }}.x leaves: x\n addrPoint{{ sign.id }}.y leaves: y\n addrPoint{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::{{ cls.id }}View.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n StructViewForm.new(view).onto(stack)\n end\n {% end %}\ntarget.at(\"ffi:allocateUnion\", \"( Slf -- Uv ): allocates Union view for the given Struct\\n layout form.\\n\\nThis word is **unsafe**: the resulting Union view is in\\nan undefined (uninitialized) state (may be zeroed out,\\ncontain junk, or both) before you (or the C code you pass\\nit to) fills it with good values. Showing the uninitialized\\nunion to clients may expose your program to a whole class\\nof security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxUnion\\nquuxUnion #chr 'A' entry:submit\\nquuxUnion.ord leaves: 65\\n\\n\\\"Union toQuote avoids printing values, because that could\\n cause a segfault/overflow in some cases, and would mostly\\n output junk anyway.\\\"\\nquuxUnion toQuote leaves: '(⋃ ⟪chr=char, ord=u8⟫)'\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.union.make!\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:buildUnion\", \"( Eb Slf -- Uv ): allocates and fills Union view with an\\n entry by asking Entry block for any *one* entry out of\\n those specified in Struct layout form, in the order they\\n are specified in Struct layout form. If the union is no\\n longer in use, it is freed by the GC automatically.\\n\\nEntry block must have at least one of the Struct layout\\nform's fields defined. Otherwise, this word dies.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n[ 'A' $: chr\\n this quux ffi:buildUnion\\n] val $: unionByChr\\n\\n[ 66 $: ord\\n this quux ffi:buildUnion\\n] val $: unionByOrd\\n\\n[ 'A' $: chr\\n 123 $: ord\\n this quux ffi:buildUnion\\n] val $: unionBoth\\n\\nunionByChr.ord leaves: 65\\nunionByOrd.chr leaves: 'B'\\n\\n\\\"'chr' is defined first, therefore, it is used rather\\n than 'ord'\\\"\\nunionBoth.chr leaves: 'A'\\nunionBoth.ord leaves: 65\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = form.layout\n view = layout.union.make!\n had_entry = false\n layout.each_desc_with_index do |desc|\n entry = block.entry_for?(Word.new(desc.id))\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n had_entry = true\n break\n end\n end\n if had_entry\n else\n block.die(\"block must have one of the union's fields defined\")\n end\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:asUnion\", \"( A Slf -- Uv ): creates and leaves a Union view for the\\n given Address, according to Struct layout form.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is layed out according to Struct\\nlayout form. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing\\nAddress that *is* in the bounds of your program's memory,\\nbut one not pointing at a union in accordance with Struct\\nlayout form, will lead to undefined behavior (most likely\\njunk values in Union view). Showing ill-formed results of\\nthis word to clients may expose your program to a whole\\nclass of security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n'A' $: chr\\n\\nthis quux ffi:buildUnion $: quuxUnion\\n\\nquuxUnion ffi:addressof $: addr\\n\\naddr quux ffi:asUnion $: addrUnion\\naddrUnion.chr leaves: 'A'\\naddrUnion.ord leaves: 65\\n```\") do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::UnionView.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:hole\", \"( T/Oh -- H ): allocates garbage-collected memory for Hole\\n that will hold a value of the given Type. If Other hole\\n is passed, wraps that Other hole instead (this could be\\n useful in C situations like `int**`)\\n\\nHoles are (just a bit) safer way of letting C write to a\\nmemory location. You first create the hole, then pass it\\nto C, then read from the hole by opening it.\\n\\nNote: this word is **unsafe**: since we cannot check whether\\nthe hole was written to, reading from hole (opening it) before\\nwriting to it will result in undefined behavior.\\n\\n```\\n\\\"\\\"\\\"\\nvoid outputCInt(int* x)\\n{\\n *x = 123;\\n}\\n\\\"\\\"\\\"\\n\\n#i32 ffi:hole $: intBox\\n\\nintBox outputCInt\\nintBox open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word | Hole)\n type = case typename\n in Hole\n Novika::FFI::UntypedPointer.new(typename.address)\n in Word\n (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n end\n (Hole.new(type)).onto(stack)\nend\ntarget.at(\"ffi:box\", \"( F T -- A ): allocates garbage-collected memory for Type, and\\n writes Form there. Form must be of (or convertible to) Type;\\n otherwise, this word dies. Leaves Address of the beginning of\\n the allocated memory.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n pointer = (type.from(form)).box\n (Decimal.new(pointer.address)).onto(stack)\nend\ntarget.at(\"ffi:unbox\", \"( A T -- F ): interprets whatever Address points at as a\\n value of the given Type, and leaves the matching Form.\\n Inverse of `ffi:box`.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is of the given Type. Passing 0\\n(none aka null pointer) for Address will lead to segfault.\\nPassing Address that points outside of your program's memory\\nwill lead to segfault. Passing Address that *is* in the bounds\\nof your program's memory, but one not pointing at a value of\\nthe given Type, will lead to undefined behavior (most likely\\njunk value of Form). Showing ill-formed results of this word to\\nclients, or letting clients control Address or Type, may expose\\nyour program to a whole class of security vulnerabilities.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n base = Pointer(Void).new(address.to_u64)\n form = (type.unbox(base)).to_form?.not_nil!\n form.onto(stack)\nend\ntarget.at(\"ffi:unsafeWrite\", \"( A F T -- ): interprets Form as that of the given Type,\\n and writes it at Address.\\n\\nThis word is **unsafe**: it does not check whether Address\\ncan be written to, whether there is enough memory to fully\\nwrite Form, etc. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing Address\\nthat *is* in the bounds of your program's memory and can\\nbe written to may lead to undefined behavior.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n value = type.from(form)\n base = Pointer(Void).new(address.to_u64)\n value.write_to!(base)\nend\ntarget.at(\"ffi:viewLayout\", \"( Svf -- Slf ): leaves Struct layout form for the given\\n Struct view form (an inline struct view, struct reference\\n view, or union view).\\n\\n```\\n[ x f32 y f32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint ffi:allocateStruct~ $: point~\\npoint ffi:allocateUnion $: pointU\\n\\npoint& ffi:viewLayout leaves: point\\npoint~ ffi:viewLayout leaves: point\\npointU ffi:viewLayout leaves: point\\n```\") do |_, stack|\n view = stack.drop.a(StructViewForm)\n view.layout.onto(stack)\nend\ntarget.at(\"ffi:sizeof\", \"( T -- B ): leaves the size of Type, in Bytes.\\n\\n```\\n#u8 ffi:sizeof leaves: 1\\n#u16 ffi:sizeof leaves: 2\\n#u32 ffi:sizeof leaves: 4\\n#u64 ffi:sizeof leaves: 8\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n (Decimal.new(type.sizeof)).onto(stack)\nend\ntarget.at(\"ffi:addressof\", \"( Svf/H -- A ): leaves Address of the given Struct view form\\n (an inline struct view, struct reference view, or union view),\\n or Hole in memory.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |_, stack|\n form = stack.drop.a(Hole | StructViewForm)\n (Decimal.new(form.address)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Frontend","path":"Novika/Capabilities/Impl/Frontend.html","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":7,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":"list = Block.new\ncapabilities.enabled.each do |klass|\n list.add(Quote.new(klass.id))\nend\nlist\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":3,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Novika::VERSION)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Ink","path":"Novika/Capabilities/Impl/Ink.html","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ink.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"COMPAT","name":"COMPAT","value":"{Color.rgb(0, 0, 0) => :black, Color.rgb(128, 0, 0) => :red, Color.rgb(0, 128, 0) => :green, Color.rgb(128, 128, 0) => :yellow, Color.rgb(0, 0, 128) => :blue, Color.rgb(128, 0, 128) => :magenta, Color.rgb(0, 128, 128) => :cyan, Color.rgb(192, 192, 192) => :light_gray, Color.rgb(128, 128, 128) => :dark_gray, Color.rgb(255, 0, 0) => :light_red, Color.rgb(0, 255, 0) => :light_green, Color.rgb(255, 255, 0) => :light_yellow, Color.rgb(0, 0, 255) => :light_blue, Color.rgb(255, 0, 255) => :light_magenta, Color.rgb(0, 255, 255) => :light_cyan, Color.rgb(255, 255, 255) => :white}"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":42,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"string = form.to_quote.string\ncolorful = string.colorize\nif fg\n colorful = colorful.fore(COMPAT[fg.closest(COMPAT.keys)])\nend\nif bg\n colorful = colorful.back(COMPAT[bg.closest(COMPAT.keys)])\nend\nappend_echo(engine, colorful)\n"}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":38,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"append_echo(engine, form.to_quote.string.colorize.reverse)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Nki","path":"Novika/Capabilities/Impl/Nki.html","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/nki.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"nki\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words to capture, read, and manipulate Novika images\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"nki:toBlock\", \"( Bf -- B ): leaves Block for the given Byteslice form,\\n assumed to contain a well-formed Novika image created\\n with `nki:captureAll`, `nki:captureNeighborhood`, or\\n otherwise. Dies if Byteslice form is an invalid Novika\\n image, or isn't a Novika image.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n bytes = stack.drop.a(Byteslice)\n begin\n image = bytes.to_io.read_bytes(Image)\n rescue error : BinData::ReadingVerificationException\n bytes.die(\"apparently, this byteslice is not a Novika image\")\n end\n (image.to_block(engine.capabilities)).onto(stack)\nend\ntarget.at(\"nki:captureAll\", \"( B -- Bf ): thoroughly, recursively captures entire\\n hierarchy of Block (its parents, prototype, friends,\\n tape, and dictionary), and leaves the resulting Novika\\n image as a Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nIf you're a visual type of person, imagine this word and\\nall related facilities as a kind of \\\"mold\\\", which carefully,\\nin an ordered fashion \\\"fills up\\\" a maze, until all paths\\nwere explored and all exits found.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhood\", \"( B -- Bf ): like `nki:captureAll`, but rather than\\n capturing all reachable blocks, captures only Block's\\n neighborhood. Leaves the resulting Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nWe store each block in Block's tape and dictionary in\\na list, then ask that block to do the same. When recursion\\nfinishes, the resulting list is called *block neighborhood*.\\n\\nParent, friends, and prototype of the given block are\\nreconstructed *if and only if they are in the block\\nneighborhood*.\\n\\n```\\n[ 1 2 3 ] nki:captureNeighborhood $: imgN\\n\\nimgN toQuote leaves: '[byteslice, consists of 111 byte(s)]' \\\"yours may differ!\\\"\\nimgN nki:toBlock leaves: [ [ 1 2 3 ] ]\\n\\n\\\"As opposed to nki:captureAll, which will capture EVERYTHING\\n it can reach:\\\"\\n[ 1 2 3 ] nki:captureAll $: imgA\\n\\nimgA toQuote leaves: '[byteslice, consists of 38298 byte(s)]' \\\"yours may differ!\\\"\\n\\n\\\"Note: [ 1 2 3 ] lives in a parallel universe now, with\\n its own friends, prototypes, toplevel block, and so on!\\n It doesn't have any links whatsoever to the whoever-it-was\\n that called nki:captureAll!\\\"\\nimgA nki:toBlock leaves: [ [ 1 2 3 ] ]\\n```\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllRaw\", \"( B -- Bf ): same as `nki:captureAll`, but does not archive\\n image payload obtained from capturing Block. May yield very\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodRaw\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but does not\\n archive image payload obtained from capturing Block. May yield\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllGzipBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodGzipBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliFast\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliFast\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/System","path":"Novika/Capabilities/Impl/System.html","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"ancestors":[{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/system.cr","line_number":100,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":101,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"print(form.to_quote.string)"}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":130,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":"exit(code.to_i)"}},{"html_id":"monotonic(engine):Decimal-instance-method","name":"monotonic","doc":"Returns a reading from the monotonic clock, in milliseconds.","summary":"Returns a reading from the monotonic clock, in milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":122,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(Time.monotonic.total_milliseconds)"}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":126,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":"sleep(millis.to_i.milliseconds)"}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":111,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":"string = prompt.to_quote.string\nprint(string)\nanswer = gets\n{answer ? Quote.new(answer) : nil, Boolean[!(!answer)]}\n"}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":118,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":"error.report(STDERR)"}}]}]},{"html_id":"novika/Novika/Capabilities/ISystem","path":"Novika/Capabilities/ISystem.html","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/System","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":77,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"system\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":85,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":81,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes all sorts of OS-related vocabulary, such as 'echo' and 'nap'\""}}],"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/system.cr","line_number":90,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":114,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/system.cr","line_number":116,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"appendEcho\", \"( F -- ): enquotes and appends Form to the standard\\n output stream.\") do |engine, stack|\n append_echo(engine, stack.drop)\nend\ntarget.at(\"readLine\", \"( Pf -- Aq true / false ): enquotes and prints Prompt\\n form to the standard output stream. Waits for the user\\n to answer, enquotes the answer and leaves it.\\n\\nIf user answered the prompt, leaves Answer quote followed\\nby boolean true. Otherwise, leaves boolean false.\\n\\n```\\n'What is your name? ' readLine => echo\\n\\n\\\"INPUT: What is your name? John Doe⏎\\\"\\n\\\"STDOUT: John Doe⏎\\\"\\n\\n\\\"INPUT: What is your name?Returns a reading from the monotonic clock, in milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/system.cr","line_number":111,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":""}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":108,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/system.cr","line_number":99,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":""}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/system.cr","line_number":105,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Capabilities/ISystem/PromptConfig","path":"Novika/Capabilities/ISystem/PromptConfig.html","kind":"struct","full_name":"Novika::Capabilities::ISystem::PromptConfig","name":"PromptConfig","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DELIMITERS","name":"DELIMITERS","value":"Word.new(\"delimiters\")"},{"id":"HISTORY","name":"HISTORY","value":"Word.new(\"history\")"},{"id":"MORE","name":"MORE","value":"Word.new(\"more?\")"},{"id":"PROMPT","name":"PROMPT","value":"Word.new(\"prompt\")"},{"id":"SUGGEST","name":"SUGGEST","value":"Word.new(\"suggest\")"}],"namespace":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"doc":"A thin wrapper around the prompt configuration block of `readLine*`.","summary":"A thin wrapper around the prompt configuration block of readLine*
.
Returns word delimiter quote, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":23,"url":null},"def":{"name":"delimiters?","return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(DELIMITERS)\nelse\n return\nend\n(Engine.exhaust(Engine.current.capabilities, entry)).top.a(Quote)\n"}},{"html_id":"history_entry?:Entry|Nil-instance-method","name":"history_entry?","doc":"Returns the history entry in the carrier block, if any.","summary":"Returns the history entry in the carrier block, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":17,"url":null},"def":{"name":"history_entry?","return_type":"Entry | ::Nil","visibility":"Public","body":"@carrier.entry_for?(HISTORY)"}},{"html_id":"more?(expression:String):Form|Nil-instance-method","name":"more?","doc":"Returns `false` or nil if no more input is expected after\n*expression*, otherwise, returns some form that the user\nassigned \"more\" to or that they left on top of the stack\n(interpreted as `true`).","summary":"Returns false
or nil if no more input is expected after expression, otherwise, returns some form that the user assigned "more" to or that they left on top of the stack (interpreted as true
).
Returns the prompt quote for the given line_number, or nil if no prompt should be used.
","abstract":false,"args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"args_string":"(line_number : Int32) : Quote | Nil","args_html":"(line_number : Int32) : Quote | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":43,"url":null},"def":{"name":"prompt?","args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(PROMPT)\nelse\n return\nend\nstack = Block.with(Decimal.new(line_number))\nform = (Engine.exhaust(Engine.current.capabilities, entry, stack)).top\nform.to_quote\n"}},{"html_id":"suggest?(word:String,prior:String):Tuple(Quote,Block)|Nil-instance-method","name":"suggest?","doc":"Returns the title quote followed by suggestions block for\nthe given *word* and input *prior* to *word*.","summary":"Returns the title quote followed by suggestions block for the given word and input prior to word.
","abstract":false,"args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"args_string":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","args_html":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":54,"url":null},"def":{"name":"suggest?","args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"return_type":"::Tuple(Quote, Block) | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(SUGGEST)\nelse\n return\nend\nif entry.opener?\n stack = Block.with(Quote.new(prior), Quote.new(word))\n block = Engine.exhaust(Engine.current.capabilities, entry, stack)\nelse\n block = entry.form.a(Block)\n if block.count == 2\n else\n block.die(\"expected block of the form [ title:quote [ ...suggestion:quote ] ]\")\n end\nend\ntitle, suggestions = block.at(block.count - 2), block.at(block.count - 1)\n{title.a(Quote), suggestions.a(Block)}\n"}}]}]}]},{"html_id":"novika/Novika/Capability","path":"Novika/Capability.html","kind":"module","full_name":"Novika::Capability","name":"Capability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":31,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Merges instance-side and class-side interfaces to a Novika\ncapability. Automatically includes `ICapabilityClass` and\n`ICapability` for you.","summary":"Merges instance-side and class-side interfaces to a Novika capability.
"},{"html_id":"novika/Novika/CapabilityCollection","path":"Novika/CapabilityCollection.html","kind":"class","full_name":"Novika::CapabilityCollection","name":"CapabilityCollection","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capability.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A collection of language capability implementations.\n\nCapability implementations can indirectly (by id) interact\nwith each other by sharing the capability collection they're\nmembers of.\n\n```\n# (!) Compile with -Dnovika_console\n\ncaps = CapabilityCollection.new\n\n# Add capability classes:\ncaps << Capabilities::Impl::Essential\ncaps << Capabilities::Impl::System\ncaps << Capabilities::Impl::Console\n\n# Enable capabilities. At this point you kinda don't know\n# which implementation is used under the hood, so you\n# need to refer to the capability by its id.\ncaps.enable(\"essential\")\ncaps.enable(\"system\")\ncaps.enable(\"console\")\n\nblock = Block.new(caps.block)\nblock.slurp(\"console:on 1000 nap console:off\")\n\nEngine.exhaust(block, caps)\n```","summary":"A collection of language capability implementations.
","class_methods":[{"html_id":"available:Array(ICapabilityClass)-class-method","name":"available","doc":"Lists *all* available (registered) capability classes.\n\nFor a capability class to be registered (available), it\nshould be the last subclass of a `Capability` includer\n(subclass depth is irrelevant), or have no subclasses\nand directly include `Capability`.","summary":"Lists all available (registered) capability classes.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":282,"url":null},"def":{"name":"available","return_type":"Array(ICapabilityClass)","visibility":"Public","body":"{% if true %}\n [{% for capability in Capability.includers %}\n {% subclasses = capability.all_subclasses %}\n {% if (!capability.abstract?) && subclasses.empty? %}\n {{ capability }},\n {% else %}{% if subclass = subclasses.reject(&.abstract?).last %}\n {{ subclass }},\n {% end %}{% end %}\n {% end %}] of ICapabilityClass\n {% end %}"}},{"html_id":"with_available-class-method","name":"with_available","doc":"Creates a capability collection, and adds *all* available\ncapabilities (see `CapabilityCollection.available`). Does\nnot enable any of them.\n\nReturns the resulting capability collection.","summary":"Creates a capability collection, and adds all available capabilities (see CapabilityCollection.available
).
Creates a capability collection, and adds capabilities that are on by default.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":256,"url":null},"def":{"name":"with_default","visibility":"Public","body":"caps = CapabilityCollection.new\navailable.each do |cap|\n if cap.on_by_default?\n else\n next\n end\n caps << cap\nend\ncaps\n"}}],"constructors":[{"html_id":"new(parent:Block|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil = nil)","args_html":"(parent : Block | Nil = nil)","location":{"filename":"src/novika/capability.cr","line_number":72,"url":null},"def":{"name":"new","args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(parent)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(cls:ICapabilityClass)-instance-method","name":"<<","doc":"Adds a capability class *cls* to this collection.","summary":"Adds a capability class cls to this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"args_string":"(cls : ICapabilityClass)","args_html":"(cls : ICapabilityClass)","location":{"filename":"src/novika/capability.cr","line_number":217,"url":null},"def":{"name":"<<","args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"visibility":"Public","body":"@classes[cls.id] = cls"}},{"html_id":"<<(library:Library)-instance-method","name":"<<","doc":"Adds a *library* to this collection. Overwrites any previous\nlibrary with the same id.","summary":"Adds a library to this collection.
","abstract":false,"args":[{"name":"library","external_name":"library","restriction":"Library"}],"args_string":"(library : Library)","args_html":"(library : Library)","location":{"filename":"src/novika/capability.cr","line_number":223,"url":null},"def":{"name":"<<","args":[{"name":"library","external_name":"library","restriction":"Library"}],"visibility":"Public","body":"@libraries[library.id] = library"}},{"html_id":"[]?(cls:T.class):T|NilforallT-instance-method","name":"[]?","doc":"Returns the instance of the given capability class *cls*,\nif such instance can be found in this collection. Otherwise,\nreturns nil.","summary":"Returns the instance of the given capability class cls, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class) : T | Nil forall T","args_html":"(cls : T.class) : T | Nil forall T","location":{"filename":"src/novika/capability.cr","line_number":154,"url":null},"def":{"name":"[]?","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"@objects[cls.id]?.try do |__arg1|\n __arg1.as(T)\nend"}},{"html_id":"block:Block-instance-method","name":"block","doc":"Returns the *capability block*: a block managed by this\ncollection, which includes the vocabulary injected by\nthe enabled capabilities.","summary":"Returns the capability block: a block managed by this collection, which includes the vocabulary injected by the enabled capabilities.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":70,"url":null},"def":{"name":"block","return_type":"Block","visibility":"Public","body":"@block"}},{"html_id":"copy:CapabilityCollection-instance-method","name":"copy","doc":"Copies this capability collection.\n\n* This collection shares library load callbacks (themselves,\n *not* the list of them) with the returned collection.\n\n* This collection shares FFI `Library` instances with the\n returned one, by reference.\n\n* This collection shares capability block parent (see `new`)\n with the returned one, by reference.\n\nEverything else is copied or created anew.","summary":"Copies this capability collection.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":239,"url":null},"def":{"name":"copy","return_type":"CapabilityCollection","visibility":"Public","body":"copy = CapabilityCollection.new\n@classes.each_value do |cls|\n copy << cls\nend\n@objects.each_key do |id|\n copy.enable(id)\nend\n@libraries.each_value do |library|\n copy << library\nend\n@load_library_callbacks.each do |callback|\n copy.on_load_library?(callback)\nend\ncopy\n"}},{"html_id":"enable(id:String):Bool-instance-method","name":"enable","doc":"Enables a capability with the given *id*.\n\nTo enable a capability means to create an instance of the\ncorresponding implementation class, and use that instance\nto inject the capability vocabulary into this collection's\n*capabilities block*, `block`. You can then access `block`\nand e.g. inherit from it to access the vocabulary of the\nenabled capabilities.\n\nDoes nothing if the capability is already enabled.\nDoes nothing if there is no capability with the given id.\n\nReturns whether there is a capability with the given *id*.","summary":"Enables a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Bool","args_html":"(id : String) : Bool","location":{"filename":"src/novika/capability.cr","line_number":116,"url":null},"def":{"name":"enable","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"if @objects.has_key?(id)\n return true\nend\nif cap = get_capability_class?(id)\nelse\n return false\nend\nobject = cap.new(self)\nobject.inject(block)\n@objects[id] = object\ntrue\n"}},{"html_id":"enable_all-instance-method","name":"enable_all","doc":"Enables all capabilities unconditionally.\n\nReturns self.","summary":"Enables all capabilities unconditionally.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":145,"url":null},"def":{"name":"enable_all","visibility":"Public","body":"@classes.each_key do |k|\n enable(k)\nend\nself\n"}},{"html_id":"enable_default-instance-method","name":"enable_default","doc":"Enables all capabilities that respond with true when sent\n`ICapabilityClass#on_by_default?`.\n\nFor capabilities that respond with false, you'll need to\ntarget them explicitly with `enable(id)`, or use `enable_all`\ninstead of `enable_default`.\n\nReturns self.","summary":"Enables all capabilities that respond with true when sent ICapabilityClass#on_by_default?
.
Returns an array of capabilities that are enabled in this collection at the moment.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":81,"url":null},"def":{"name":"enabled","visibility":"Public","body":"@objects.values.map(&.class)"}},{"html_id":"fetch(cls:T.class,&:T->U):U|NilforallT,U-instance-method","name":"fetch","doc":"Yields the capability instance of the given capability\nclass *cls* to the block, if such instance can be found\nin this collection.\n\nReturns the result of the block, or nil.","summary":"Yields the capability instance of the given capability class cls to the block, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class, & : T -> U) : U | Nil forall T, U","args_html":"(cls : T.class, & : T -> U) : U | Nil forall T, U","location":{"filename":"src/novika/capability.cr","line_number":210,"url":null},"def":{"name":"fetch","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> U)"},"return_type":"U | ::Nil","visibility":"Public","body":"if impl = self[cls]?\n yield impl\nend"}},{"html_id":"get_capability_class?(id:String)-instance-method","name":"get_capability_class?","doc":"Returns the capability class with the given *id*. Returns nil\nif there is no such capability class in this collection.","summary":"Returns the capability class with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":166,"url":null},"def":{"name":"get_capability_class?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes[id]?"}},{"html_id":"get_library?(id:String)-instance-method","name":"get_library?","doc":"Returns the library with the given *id*. Returns nil if there\nis no such library in this collection.","summary":"Returns the library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":160,"url":null},"def":{"name":"get_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries[id]?"}},{"html_id":"has_capability?(id:String)-instance-method","name":"has_capability?","doc":"Returns whether this collection includes a capability with\nthe given *id*.","summary":"Returns whether this collection includes a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":93,"url":null},"def":{"name":"has_capability?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes.has_key?(id)"}},{"html_id":"has_capability_enabled?(id:String)-instance-method","name":"has_capability_enabled?","doc":"Returns whether this collection has the capability with\nthe given *id* enabled.","summary":"Returns whether this collection has the capability with the given id enabled.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":87,"url":null},"def":{"name":"has_capability_enabled?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@objects.has_key?(id)"}},{"html_id":"has_library?(id:String)-instance-method","name":"has_library?","doc":"Returns whether this collection includes a library with\nthe given *id*.","summary":"Returns whether this collection includes a library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":99,"url":null},"def":{"name":"has_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries.has_key?(id)"}},{"html_id":"load_library?(id:String):Library|Nil-instance-method","name":"load_library?","doc":"Tries to load a library (aka shared object) with the given\n*id*. Returns the resulting `Library` object, or nil.\n\nThe library object is cached: further calls to `load_library?`\nand `get_library?` will return that library object.","summary":"Tries to load a library (aka shared object) with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Library | Nil","args_html":"(id : String) : Library | Nil","location":{"filename":"src/novika/capability.cr","line_number":195,"url":null},"def":{"name":"load_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Library | ::Nil","visibility":"Public","body":"@libraries.fetch(id) do\n @load_library_callbacks.each do |callback|\n if library = callback.call(id)\n return @libraries[id] = library\n end\n end\nend"}},{"html_id":"on_load_library?(callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"args_string":"(callback : String -> Library | Nil)","args_html":"(callback : String -> Library | Nil)","location":{"filename":"src/novika/capability.cr","line_number":181,"url":null},"def":{"name":"on_load_library?","args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"visibility":"Public","body":"@load_library_callbacks << callback"}},{"html_id":"on_load_library?(&callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":186,"url":null},"def":{"name":"on_load_library?","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"},"visibility":"Public","body":"on_load_library?(callback)"}}]},{"html_id":"novika/Novika/CaptureMode","path":"Novika/CaptureMode.html","kind":"enum","full_name":"Novika::CaptureMode","name":"CaptureMode","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":24,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CaptureAll","name":"CaptureAll","value":"0"},{"id":"CaptureNeighborhood","name":"CaptureNeighborhood","value":"1"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"capture_all?-instance-method","name":"capture_all?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":25,"url":null},"def":{"name":"capture_all?","visibility":"Public","body":"self == CaptureAll"}},{"html_id":"capture_neighborhood?-instance-method","name":"capture_neighborhood?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":26,"url":null},"def":{"name":"capture_neighborhood?","visibility":"Public","body":"self == CaptureNeighborhood"}}]},{"html_id":"novika/Novika/Classifier","path":"Novika/Classifier.html","kind":"struct","full_name":"Novika::Classifier","name":"Classifier","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/classifier.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"`Classifier` brings *unclassified forms* to life.\n\n`Classifier` assigns types to fragments of Novika code\nconveniently called *unclassified forms*: this\nunclassified form is a decimal, this one is a word, that\none is a quote.\n\nUnclassified forms are given to `Classifier` by `Scissors`,\nan object dedicated to cutting a big blob of Novika code\ninto smaller fragments.\n\n`Scissors` and `Classifier` are designed to work in\ntandem. Separating one from the other is possible and will\nwork, but is not recommended unless you have read the source\ncode of both.","summary":"Classifier
brings unclassified forms to life.
Initializes a classifier from the given source string and Novika block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"args_string":"(source : String, block : Novika::Block)","args_html":"(source : String, block : Novika::Block)","location":{"filename":"src/novika/classifier.cr","line_number":29,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source, block)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"block:Novika::Block-instance-method","name":"block","doc":"Returns the block used by this classifier.","summary":"Returns the block used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":21,"url":null},"def":{"name":"block","visibility":"Public","body":"@block"}},{"html_id":"bytes:Pointer(UInt8)-instance-method","name":"bytes","doc":"Returns the source code byte pointer used by this classifier.","summary":"Returns the source code byte pointer used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":18,"url":null},"def":{"name":"bytes","visibility":"Public","body":"@bytes"}},{"html_id":"classify(start,count,dot):Nil-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long. *dot* is the byte index of `'.'`.\n\nThese three arguments are assumed to come from `Scissors#cut`.\n\nThis method does practically no bounds checks, is unsafe\nand must be worked with carefully.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"args_string":"(start, count, dot) : Nil","args_html":"(start, count, dot) : Nil","location":{"filename":"src/novika/classifier.cr","line_number":223,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if count.zero?\n return\nend\nbyte = @bytes[start]\ncase byte\nwhen '['\n nest\nwhen ']'\n unnest\nwhen '#'\n if count > 1\n add(Novika::QuotedWord.new(build_raw(start + 1, count - 1)))\n else\n add(Novika::Word.new(\"#\"))\n end\nwhen '|'\n if count > 1\n add(Novika::Word.new(build_raw(start, count)))\n else\n push_cursor(block.count)\n end\nwhen '\\''\n add(Novika::Quote.new(build_quote(start + 1, count - 2)))\nwhen '\"'\n if block.has_comment?\n return\n end\n if block.count.zero?\n else\n return\n end\n block.describe_with?(build_comment(start + 1, count - 2))\nelse\n e = (start + count) - 1\n if dot\n else\n frag = build_raw(start, count)\n if decimal?(start, e, sign: true)\n add(Novika::Decimal.new(frag))\n else\n if number_with_base = number_with_base?(frag)\n number, base = number_with_base\n add(Novika::Decimal.new(number.to_big_i(base)))\n else\n add(Novika::Word.new(frag))\n end\n end\n return\n end\n if ((start < dot && dot < e) && (decimal?(start, dot - 1, sign: true))) && (decimal?(dot + 1, e))\n add(Novika::Decimal.new(build_raw(start, count)))\n else\n classify(start, dot - start, dot: nil)\n add(Novika::Word.new(\".\"))\n classify(dot + 1, e - dot)\n end\nend\n"}},{"html_id":"classify(start,count)-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"args_string":"(start, count)","args_html":"(start, count)","location":{"filename":"src/novika/classifier.cr","line_number":311,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"visibility":"Public","body":"dot = nil\nstart.upto((start + count) - 1) do |index|\n if @bytes[index] === '.'\n dot = index\n break\n end\nend\nclassify(start, count, dot)\n"}},{"html_id":"end-instance-method","name":"end","doc":"Ends classification. Makes sure all blocks are closed\n(have their corresponding `]`).","summary":"Ends classification.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":324,"url":null},"def":{"name":"end","visibility":"Public","body":"if @ceiling.same?(@block)\nelse\n @block.die(\"missing ']'\")\nend"}}]},{"html_id":"novika/Novika/Color","path":"Novika/Color.html","kind":"struct","full_name":"Novika::Color","name":"Color","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/color.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"rgb(r,g,b)-class-method","name":"rgb","doc":"Creates a `Color` from *r*ed (0 <= h <= 255), *g*reen\n(0 <= g <= 255), *b*lue (0 <= b <= 255) channel values.","summary":"Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and lightness (0 <= l <= 100, percents).
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and value (0 <= v <= 100, percents).
Creates a Color
from lightness (0-100), chroma (0-132), hue (0-360).
Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Holds alpha channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a","return_type":"Decimal","visibility":"Public","body":"@a"}},{"html_id":"a=(a:Decimal)-instance-method","name":"a=","doc":"Holds alpha channel value decimal (0-255).\n\nYou can mutate this to set alpha, but do remember that\n`Color` is a struct.","summary":"Holds alpha channel value decimal (0-255).
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"args_string":"(a : Decimal)","args_html":"(a : Decimal)","location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:Decimal-instance-method","name":"b","doc":"Returns blue channel value decimal (0-255).","summary":"Returns blue channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":14,"url":null},"def":{"name":"b","return_type":"Decimal","visibility":"Public","body":"@b"}},{"html_id":"closest(palette:Array(Color))-instance-method","name":"closest","doc":"Returns the color closest to this color from *palette*.\n\nHow close one color is to another is determined by their\ndistance in an HSV-backed coordinate system.","summary":"Returns the color closest to this color from palette.
","abstract":false,"args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"args_string":"(palette : Array(Color))","args_html":"(palette : Array(Color))","location":{"filename":"src/novika/forms/color.cr","line_number":55,"url":null},"def":{"name":"closest","args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"visibility":"Public","body":"h, s, v = hsv\npalette.min_by do |other|\n h1, s1, v1 = other.hsv\n (((h1 - h).to_f64 ** 2) + ((s1 - s).to_f64 ** 2)) + ((v1 - v).to_f64 ** 2)\nend\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":67,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"g:Decimal-instance-method","name":"g","doc":"Returns green channel value decimal (0-255).","summary":"Returns green channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":11,"url":null},"def":{"name":"g","return_type":"Decimal","visibility":"Public","body":"@g"}},{"html_id":"hsl:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsl","doc":"Returns a tuple with H, S, L of this color.","summary":"Returns a tuple with H, S, L of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":31,"url":null},"def":{"name":"hsl","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, l = Color.rgb2hsl(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(l)}\n"}},{"html_id":"hsv:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsv","doc":"Returns a tuple with H, S, V of this color.","summary":"Returns a tuple with H, S, V of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":38,"url":null},"def":{"name":"hsv","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, v = Color.rgb2hsv(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(v)}\n"}},{"html_id":"lch:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"lch","doc":"Returns a tuple with L, C, H of this color.","summary":"Returns a tuple with L, C, H of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":45,"url":null},"def":{"name":"lch","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"l, c, h = LCH.rgb2lch(r.to_i, g.to_i, b.to_i)\n{Decimal.new(l.round), Decimal.new(c.round), Decimal.new(h.round)}\n"}},{"html_id":"r:Decimal-instance-method","name":"r","doc":"Returns red channel value decimal (0-255).","summary":"Returns red channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":8,"url":null},"def":{"name":"r","return_type":"Decimal","visibility":"Public","body":"@r"}},{"html_id":"rgb:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"rgb","doc":"Returns a tuple of R, G, B channel values.","summary":"Returns a tuple of R, G, B channel values.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":26,"url":null},"def":{"name":"rgb","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"{r, g, b}"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":71,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"a255 = Decimal.new(255)\nio << \"rgb\"\nif a == a255\nelse\n io << \"a\"\nend\n(((((io << \"(\") << r) << \", \") << g) << \", \") << b\nif a == a255\nelse\n (io << \", \") << a\nend\nio << \")\"\n"}}]},{"html_id":"novika/Novika/ColorSnapshot","path":"Novika/ColorSnapshot.html","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":95,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ColorSnapshot]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: r, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: g, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: b, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: a, cls: UInt8, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Color)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Color"}],"args_string":"(form : Color)","args_html":"(form : Color)","location":{"filename":"src/novika/image.cr","line_number":116,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Color"}],"visibility":"Public","body":"color = new\ncolor.r = form.r.to_u8\ncolor.g = form.g.to_u8\ncolor.b = form.b.to_u8\ncolor.a = form.a.to_u8\ncolor\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":96,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"a:UInt8-instance-method","name":"a","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"def":{"name":"a","return_type":"UInt8","visibility":"Public","body":"@a"}},{"html_id":"a=(a:UInt8)-instance-method","name":"a=","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"args_string":"(a : UInt8)","args_html":"(a : UInt8)","def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:UInt8-instance-method","name":"b","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"def":{"name":"b","return_type":"UInt8","visibility":"Public","body":"@b"}},{"html_id":"b=(b:UInt8)-instance-method","name":"b=","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"args_string":"(b : UInt8)","args_html":"(b : UInt8)","def":{"name":"b=","args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"visibility":"Public","body":"@b = b"}},{"html_id":"g:UInt8-instance-method","name":"g","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"def":{"name":"g","return_type":"UInt8","visibility":"Public","body":"@g"}},{"html_id":"g=(g:UInt8)-instance-method","name":"g=","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"args_string":"(g : UInt8)","args_html":"(g : UInt8)","def":{"name":"g=","args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"visibility":"Public","body":"@g = g"}},{"html_id":"r:UInt8-instance-method","name":"r","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"def":{"name":"r","return_type":"UInt8","visibility":"Public","body":"@r"}},{"html_id":"r=(r:UInt8)-instance-method","name":"r=","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"args_string":"(r : UInt8)","args_html":"(r : UInt8)","def":{"name":"r=","args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"visibility":"Public","body":"@r = r"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":110,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"color = Color.rgb(Decimal.new(r), Decimal.new(g), Decimal.new(b))\ncolor.a = Decimal.new(a)\ncolor\n"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Decimal","path":"Novika/Decimal.html","kind":"class","full_name":"Novika::Decimal","name":"Decimal","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/decimal.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A representation for decimal numbers inside Novika.","summary":"A representation for decimal numbers inside Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":27,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"decimal\""}}],"constructors":[{"html_id":"new(val:BigDecimal)-class-method","name":"new","abstract":false,"args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"args_string":"(val : BigDecimal)","args_html":"(val : BigDecimal)","location":{"filename":"src/novika/forms/decimal.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"visibility":"Public","body":"_ = allocate\n_.initialize(val)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(object:String|Number)-class-method","name":"new","abstract":false,"args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"args_string":"(object : String | Number)","args_html":"(object : String | Number)","location":{"filename":"src/novika/forms/decimal.cr","line_number":13,"url":null},"def":{"name":"new","args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"visibility":"Public","body":"_ = allocate\n_.initialize(object)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"%(other:Decimal):Decimal-instance-method","name":"%","doc":"Returns the remainder of this and *other* decimal numbers.","summary":"Returns the remainder of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":75,"url":null},"def":{"name":"%","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val % other.val)"}},{"html_id":"&(other:Decimal):Decimal-instance-method","name":"&","doc":"Combines this and *other* decimals using bitwise and.","summary":"Combines this and other decimals using bitwise and.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":99,"url":null},"def":{"name":"&","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value & other.val.value)"}},{"html_id":"*(other:Decimal):Decimal-instance-method","name":"*","doc":"Returns the product of this and *other* decimal numbers.","summary":"Returns the product of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":65,"url":null},"def":{"name":"*","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val * other.val)"}},{"html_id":"**(other:Decimal):Decimal-instance-method","name":"**","doc":"Raises this decimal to the power of *other*.","summary":"Raises this decimal to the power of other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":80,"url":null},"def":{"name":"**","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"if val.scale.zero? && other.val.scale.zero?\n return Decimal.new(val ** other.val.to_i64)\nend\nDecimal.new(val.to_f64 ** other.to_f64)\n"}},{"html_id":"+(other:Decimal):Decimal-instance-method","name":"+","doc":"Returns the sum of this and *other* decimal numbers.","summary":"Returns the sum of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":55,"url":null},"def":{"name":"+","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val + other.val)"}},{"html_id":"-(other:Decimal):Decimal-instance-method","name":"-","doc":"Returns the difference between this and *other* decimal numbers.","summary":"Returns the difference between this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":60,"url":null},"def":{"name":"-","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val - other.val)"}},{"html_id":"/(other:Decimal):Decimal-instance-method","name":"/","doc":"Returns the quotient of this and *other* decimal numbers.","summary":"Returns the quotient of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":70,"url":null},"def":{"name":"/","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val / other.val)"}},{"html_id":"<(other:Decimal):Bool-instance-method","name":"<","doc":"Returns whether this decimal is smaller than *other*.","summary":"Returns whether this decimal is smaller than other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Bool","args_html":"(other : Decimal) : Bool","location":{"filename":"src/novika/forms/decimal.cr","line_number":94,"url":null},"def":{"name":"<","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Bool","visibility":"Public","body":"val < other.val"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
Combines this and other decimals using bitwise or.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":104,"url":null},"def":{"name":"|","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value | other.val.value)"}},{"html_id":"bitcount:Decimal-instance-method","name":"bitcount","doc":"Returns the number of bits in this decimal.","summary":"Returns the number of bits in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":161,"url":null},"def":{"name":"bitcount","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.bit_length)"}},{"html_id":"ceil:Decimal-instance-method","name":"ceil","doc":"Rounds this decimal up.","summary":"Rounds this decimal up.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":132,"url":null},"def":{"name":"ceil","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.ceil)"}},{"html_id":"chr:Char-instance-method","name":"chr","doc":"Returns the character corresponding to this decimal.","summary":"Returns the character corresponding to this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":32,"url":null},"def":{"name":"chr","return_type":"Char","visibility":"Public","body":"to_i.chr"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/decimal.cr","line_number":21,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"decimal number \"\nto_s(io)\n"}},{"html_id":"each_bit(&:Decimal->)-instance-method","name":"each_bit","doc":"Yields each bit in this decimal.","summary":"Yields each bit in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":109,"url":null},"def":{"name":"each_bit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Decimal ->)"},"visibility":"Public","body":"(val.value.to_s(2)).each_char do |char|\n if char == '-'\n next\n end\n yield Decimal.new(char == '1' ? 1 : 0)\nend"}},{"html_id":"floor:Decimal-instance-method","name":"floor","doc":"Rounds this decimal down.","summary":"Rounds this decimal down.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":127,"url":null},"def":{"name":"floor","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.floor)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns whether this decimal is in the bounds of Int64
.
Asserts this decimal is in one of ranges.
","abstract":false,"args":[{"name":"ranges","external_name":"ranges","restriction":""}],"args_string":"(*ranges) : Decimal","args_html":"(*ranges) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":166,"url":null},"def":{"name":"in","args":[{"name":"ranges","external_name":"ranges","restriction":""}],"splat_index":0,"return_type":"Decimal","visibility":"Public","body":"if ranges.any?(&.includes?(val))\n return self\nend\nmessage = String.build do |io|\n io << \"decimal out of range: expected \"\n if ranges.size > 1\n io << \"any of: \"\n end\n ranges.join(io, \", \") do |range|\n (((io << \"[\") << range.begin) << \"; \") << range.end\n io << (range.exclusive? ? \")\" : \"]\")\n end\nend\ndie(message)\n"}},{"html_id":"int:Decimal-instance-method","name":"int","doc":"Asserts this decimal is an integer. Dies if it isn't.","summary":"Asserts this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":184,"url":null},"def":{"name":"int","return_type":"Decimal","visibility":"Public","body":"if integer?\n return self\nend\ndie(\"decimal is not an integer\")\n"}},{"html_id":"integer?-instance-method","name":"integer?","doc":"Returns whether this decimal is an integer.","summary":"Returns whether this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":199,"url":null},"def":{"name":"integer?","visibility":"Public","body":"val.trunc == val"}},{"html_id":"nth_ls_bit(n:Decimal):Decimal-instance-method","name":"nth_ls_bit","doc":"Returns *n*-th least significant bit","summary":"Returns n-th least significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal","args_html":"(n : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":156,"url":null},"def":{"name":"nth_ls_bit","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.abs.bit(n.to_i))"}},{"html_id":"nth_ms_bit?(n:Decimal):Decimal|Nil-instance-method","name":"nth_ms_bit?","doc":"Returns *n*-th most significant bit","summary":"Returns n-th most significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal | Nil","args_html":"(n : Decimal) : Decimal | Nil","location":{"filename":"src/novika/forms/decimal.cr","line_number":147,"url":null},"def":{"name":"nth_ms_bit?","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal | ::Nil","visibility":"Public","body":"str = val.value.to_s(2)\nnint = n.to_i\nif nint < str.size\nelse\n return\nend\nDecimal.new(str[nint + (val.negative? ? 1 : 0)]? == '1' ? 1 : 0)\n"}},{"html_id":"posint:Decimal-instance-method","name":"posint","doc":"Asserts this decimal is a positive integer (i.e., >= 0).\nDies if it isn't.","summary":"Asserts this decimal is a positive integer (i.e., >= 0).
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":192,"url":null},"def":{"name":"posint","return_type":"Decimal","visibility":"Public","body":"if val >= 0 && integer?\n return self\nend\ndie(\"decimal is not a positive integer\")\n"}},{"html_id":"rad_cos:Decimal-instance-method","name":"rad_cos","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":137,"url":null},"def":{"name":"rad_cos","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.cos(val))"}},{"html_id":"rad_sin:Decimal-instance-method","name":"rad_sin","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":142,"url":null},"def":{"name":"rad_sin","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sin(val))"}},{"html_id":"round:Decimal-instance-method","name":"round","doc":"Rounds this decimal.","summary":"Rounds this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":117,"url":null},"def":{"name":"round","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.round)"}},{"html_id":"sqrt:Decimal-instance-method","name":"sqrt","doc":"Returns the square root of this decimal.","summary":"Returns the square root of this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":89,"url":null},"def":{"name":"sqrt","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sqrt(val))"}},{"html_id":"to_f32(*args,**options)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f32(*args, **options)"}},{"html_id":"to_f32(*args,**options,&)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f32(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_f64(*args,**options)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f64(*args, **options)"}},{"html_id":"to_f64(*args,**options,&)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f64(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_i:Int32-instance-method","name":"to_i","doc":"Downgrades this decimal into an integer (`Int32`). Dies\nif too large.","summary":"Downgrades this decimal into an integer (Int32
).
Truncates this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":122,"url":null},"def":{"name":"trunc","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.trunc)"}},{"html_id":"zero?:Bool-instance-method","name":"zero?","doc":"Returns whether this decimal is zero.","summary":"Returns whether this decimal is zero.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":42,"url":null},"def":{"name":"zero?","return_type":"Bool","visibility":"Public","body":"val.zero?"}}]},{"html_id":"novika/Novika/Dict","path":"Novika/Dict.html","kind":"class","full_name":"Novika::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":55,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Default dictionary protocol implementation: default block\ndictionary implementation. Uses a hash map for storage.\n\nNote: setting or getting with blocks as keys performs a\nlinear scan for now. The semantics for this is unstable.","summary":"Default dictionary protocol implementation: default block dictionary implementation.
","instance_methods":[{"html_id":"==(other:Dict)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Dict"}],"args_string":"(other : Dict)","args_html":"(other : Dict)","location":{"filename":"src/novika/dict.cr","line_number":155,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Dict"}],"visibility":"Public","body":"if @store == (other.@store)\nelse\n return false\nend\nif @blockstore.class == (other.@blockstore).class\nelse\n return false\nend\nif bs_l = @blockstore\nelse\n return true\nend\nbs_r = (other.@blockstore).not_nil!\nif bs_l.size == bs_r.size\nelse\n return false\nend\nbs_l.all? do |k_l, v_l|\n bs_r.any? do |k_r, v_r|\n (k_l == k_r) && (v_l == v_r)\n end\nend\n"}},{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":123,"url":null},"def":{"name":"clear","visibility":"Public","body":"@store.clear\n@blockstore.try(&.clear)\n"}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":142,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":"Dict.new(@store.dup, @blockstore.try(&.dup))"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":138,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"@store.size + (@blockstore.try(&.size) || 0)"}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":119,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":"name.is_a?(Block) ? del_block(name) : @store.delete(name)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":146,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"visibility":"Public","body":"@store.each do |k, v|\n yield k, v\nend\n@blockstore.try(&.each do |k, v|\n yield k, v\nend)\n"}},{"html_id":"get(name:Form,&):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, &) : Entry | Nil","args_html":"(name : Form, &) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":113,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"return_type":"Entry | ::Nil","visibility":"Public","body":"if name.is_a?(Block)\n return get_block(name) do\n yield name\n end\nend\n@store.fetch(name) do\n yield name\nend\n"}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":128,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Block) ? has_block?(name) : @store.has_key?(name)"}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":132,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":"donor.each do |k, v|\n if k.is_a?(Word) && k.private?\n else\n set(k, v)\n end\nend"}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":107,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":"if name.is_a?(Block)\n return set_block(name, entry)\nend\n@store[name] = entry\n"}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Executes a fetcher callback on every visited vertex in the block graph starting from an entrypoint block, until the callback returns T
, or until there are no more blocks to explore.
Executes the fetcher callback on every visited vertex in the block graph starting from an entrypoint block, and until the callback returns T
, or until exhausted all reachable vertices.
Same as #on(entrypoint : Block, ignore : Nil)
, the difference being that immediately adjacent block ignore list is taken into account.
Index of the code block in a continuation block.
"},{"id":"C_STACK_AT","name":"C_STACK_AT","value":"1","doc":"Index of the stack block in a continuation block.","summary":"Index of the stack block in a continuation block.
"},{"id":"MAX_CONTS","name":"MAX_CONTS","value":"1024","doc":"Maximum amount of scheduled continuations in `conts`. After\npassing this number, `Error` is raised to bring attention\nto such dangerous depth.","summary":"Maximum amount of scheduled continuations in #conts
.
Maximum number of engines that can be created.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"An engine object is responsible for managing a *continuations block*.\n\nContinuations block consists of *continuatio**n** blocks*.\n\nCanonical continuation blocks themselves contain two blocks\n(see `Engine.cont`):\n\n- *Code block*, more commonly known as simply the block\n (and as *active* block when its continuation is active,\n i.e., when it's being evaluated),\n\n- *Stack block*, more commonly known as simply the stack\n (and as *active* stack when its continuation is active,\n i.e., when it's being evaluated).\n\n`Engine#schedule` is used to create a continuation block\ngiven a `Schedulable` object (usually a `Form`, and in rarer\ncases an `Entry`) and a stack block. It then adds the\ncontinuation block to the continuations block -- effectively\nscheduling it for execution *on the next exhaust loop cycle*.\n\nNote that there are two other methods linked with execution\nand implemented by all forms: `on_open`, and `on_parent_open`.\nThey *perform* whatever action the form wants rather than\nsimply *scheduling* it to be performed some time in the\nfuture. Namely, `on_open` is invoked whenever the form at\nhand is itself the target of opening (aka execution, aka\nevaluation), and `on_parent_open` is invoked when a block\ncontaining the form at hand (its parent block) is the target\nof opening.\n\nAn engine's *exhaust loop* is where most of the magic happens.\nIt is organized very much like the fetch-decode-execute cycle\nin CPUs.\n\nFor *fetch*, the engine finds the top (see `Block#top`)\ncontinuation block, then finds the top form on the code\nblock, and invokes the `on_parent_open` method on it.\n\nThis method is analogous to *decoding* followed by *execution*.\nThe form is free to choose how it wants to make sense of itself,\ngiven an engine. Some forms (e.g. words) end up scheduling\nnew continuation blocks `on_parent_open`, making the engine\ngo through them first.\n\nAfter the cursor of the active block hits the end, `Engine`\ndrops (see `Block#drop`) the continuation block (thereby\n*closing* the code block).\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\nstack = Block.new\n\nengine = Engine.new(caps)\nengine.schedule(block, stack)\nengine.exhaust\n\nputs stack # [ 3 ]\n\n# Or, shorter:\n\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\n\nputs Engine.exhaust(caps, block) # [ 3 ]\n```","summary":"An engine object is responsible for managing a continuations block.
","class_methods":[{"html_id":"cont(*,block,stack)-class-method","name":"cont","doc":"Creates and returns a canonical continuation block.\n\nA continuation block must include two blocks: the first is\ncalled simply the *block* (found at `C_BLOCK_AT`), and the\nsecond is called the *stack* block (found at `C_STACK_AT`).","summary":"Creates and returns a canonical continuation block.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"args_string":"(*, block, stack)","args_html":"(*, block, stack)","location":{"filename":"src/novika/engine.cr","line_number":170,"url":null},"def":{"name":"cont","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"splat_index":0,"visibility":"Public","body":"Block.with([block, stack] of Form, leaf: false)"}},{"html_id":"current-class-method","name":"current","doc":"Returns the current engine. Raises a BUG exception if\nthere is no current engine.","summary":"Returns the current engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":109,"url":null},"def":{"name":"current","visibility":"Public","body":"@@stack.last? || (raise(\"BUG: there is no current engine\"))"}},{"html_id":"exhaust(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"exhaust!(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust!","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule!`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust!","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule!(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"pop(engine:Engine):Engine|Nil-class-method","name":"pop","doc":"Pops *engine* from the engine stack. Raises a BUG exception\n(and does not pop!) if the current engine is not *engine*\n(or if it is absent).","summary":"Pops engine from the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine | Nil","args_html":"(engine : Engine) : Engine | Nil","location":{"filename":"src/novika/engine.cr","line_number":135,"url":null},"def":{"name":"pop","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine | ::Nil","visibility":"Public","body":"if current.same?(engine)\nelse\n raise(\"BUG: lost track of the engine stack: unexpected engine on top!\")\nend\n@@stack.pop\n"}},{"html_id":"push(caps:CapabilityCollection)-class-method","name":"push","doc":"Pushes a new engine with the given capability collection *caps*.\n\nMake sure that you `pop` it yourself or that you know what\nyou're doing!","summary":"Pushes a new engine with the given capability collection caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/engine.cr","line_number":128,"url":null},"def":{"name":"push","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"push(new(caps))"}},{"html_id":"trackers-class-method","name":"trackers","doc":"Holds an array of exhaust tracker objects associated with\nall instances of `Engine`. These objects intercept forms\nbefore/after opening in `Engine#exhaust`. This e.g. allows\nfrontends to analyze/track forms and/or matching blocks.","summary":"Holds an array of exhaust tracker objects associated with all instances of Engine
.
Yields an instance of Engine
.
Pushes engine onto the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine","args_html":"(engine : Engine) : Engine","location":{"filename":"src/novika/engine.cr","line_number":114,"url":null},"def":{"name":"push","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine","visibility":"Public","body":"if @@stack.size.in?(0..MAX_ENGINES)\nelse\n raise(Error.new(\"bad engine stack depth: deep recursion in a __metaword__?\"))\nend\n@@stack << engine\nengine\n"}}],"instance_methods":[{"html_id":"block-instance-method","name":"block","doc":"Returns the block of the active continuation.","summary":"Returns the block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":204,"url":null},"def":{"name":"block","visibility":"Public","body":"(cont.at(C_BLOCK_AT)).a(Block)"}},{"html_id":"capabilities:CapabilityCollection-instance-method","name":"capabilities","doc":"Returns the capability collection used by this engine.","summary":"Returns the capability collection used by this engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":144,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"cont-instance-method","name":"cont","doc":"Returns the active continuation.","summary":"Returns the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":199,"url":null},"def":{"name":"cont","visibility":"Public","body":"conts.top.a(Block)"}},{"html_id":"conts:Novika::Block-instance-method","name":"conts","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Novika::Block)-instance-method","name":"conts=","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"args_string":"(conts : Novika::Block)","args_html":"(conts : Novika::Block)","location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"die(*args,**options)-instance-method","name":"die","doc":"See `Form#die`.","summary":"See Form#die
.
See Form#die
.
Returns the relevant death handler, or nil.
","abstract":false,"args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"args_string":"(avoid_prototype = nil)","args_html":"(avoid_prototype = nil)","location":{"filename":"src/novika/engine.cr","line_number":279,"url":null},"def":{"name":"drop_until_death_handler?","args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"visibility":"Public","body":"while !conts.tape.empty?\n entry = block.entry_for?(Hook.died)\n conts.drop\n if entry\n else\n next\n end\n handler = entry_to_death_handler_block(entry)\n if avoid_prototype && (handler.prototype.same?(avoid_prototype))\n else\n return handler\n end\nend"}},{"html_id":"each_active_block(&)-instance-method","name":"each_active_block","doc":"Yields active blocks, starting from the oldest active block\nup to the current active block.","summary":"Yields active blocks, starting from the oldest active block up to the current active block.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":215,"url":null},"def":{"name":"each_active_block","yields":1,"block_arity":1,"visibility":"Public","body":"conts.each do |cont|\n yield ((cont.a(Block)).at(C_BLOCK_AT)).a(Block)\nend"}},{"html_id":"execute(form:Form)-instance-method","name":"execute","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form)","args_html":"(form : Form)","location":{"filename":"src/novika/engine.cr","line_number":293,"url":null},"def":{"name":"execute","args":[{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"begin\n form.on_parent_open(self)\nrescue error : Error\n error.conts || (error.conts = conts.instance)\n if handler = drop_until_death_handler?(avoid_prototype: block.prototype)\n else\n raise(error)\n end\n schedule(handler, stack: conts.count.zero? ? Block.with(error) : stack.add(error))\nend"}},{"html_id":"exhaust-instance-method","name":"exhaust","doc":"Exhausts all scheduled continuations, starting from the\ntopmost (see `Block#top`) continuation in `conts`.","summary":"Exhausts all scheduled continuations, starting from the topmost (see Block#top
) continuation in #conts
.
See Schedulable#schedule
.
Main authorized point for adding continuations unsafely.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block)","args_html":"(other : Block)","location":{"filename":"src/novika/engine.cr","line_number":232,"url":null},"def":{"name":"schedule!","args":[{"name":"other","external_name":"other","restriction":"Block"}],"visibility":"Public","body":"if conts.count > MAX_CONTS\n die(\"recursion or block open is too deep (> #{MAX_CONTS})\")\nend\ntap do\n conts.add(other)\nend\n"}},{"html_id":"schedule!(*,block:Block,stack:Block)-instance-method","name":"schedule!","doc":"Schedules a continuation with the given *block* and *stack*.","summary":"Schedules a continuation with the given block and stack.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(*, block : Block, stack : Block)","args_html":"(*, block : Block, stack : Block)","location":{"filename":"src/novika/engine.cr","line_number":241,"url":null},"def":{"name":"schedule!","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"splat_index":0,"visibility":"Public","body":"schedule!(Engine.cont(block: block, stack: stack))"}},{"html_id":"stack-instance-method","name":"stack","doc":"Returns the stack block of the active continuation.","summary":"Returns the stack block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":209,"url":null},"def":{"name":"stack","visibility":"Public","body":"(cont.at(C_STACK_AT)).a(Block)"}}]},{"html_id":"novika/Novika/Entry","path":"Novika/Entry.html","kind":"class","full_name":"Novika::Entry","name":"Entry","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":172,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a dictionary entry. Dictionary entries hold the\nvalue form.","summary":"Represents a dictionary entry.
","constructors":[{"html_id":"new(form:Form,opener:Bool=false)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"args_string":"(form : Form, opener : Bool = false)","args_html":"(form : Form, opener : Bool = false)","location":{"filename":"src/novika/dict.cr","line_number":178,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(form, opener)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
See Object#hash(hasher)
Safe #schedule
.
Unsafe #schedule
.
How many trace entries to display at max.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds and accepts information about an error.\n\nErrors are raised when a certain case is undesired, unhandleable,\nor otherwise inappropriate to some form of computation.\n\nErrors can be *handled* and *unhandled*. *Unhandled* errors\ngenerate an error `report` (generally to STDERR, but this\ndepends on the frontend). They are fatal for the program\nthey occur in.\n\n*Death handlers*, or *death traps*, when set up in code blocks\nand/or their relatives, allow errors to be *handled*. For this\nreason, errors are Novika `Form`s, and can be manipulated,\nreported, and inspected from Novika.","summary":"Holds and accepts information about an error.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"error\""}}],"constructors":[{"html_id":"new(details:String,form:Novika::Form|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"args_string":"(details : String, form : Novika::Form | Nil = nil)","args_html":"(details : String, form : Novika::Form | Nil = nil)","location":{"filename":"src/novika/error.cr","line_number":32,"url":null},"def":{"name":"new","args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(details, form)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"conts:Block|Nil-instance-method","name":"conts","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts","return_type":"Block | ::Nil","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Block|Nil)-instance-method","name":"conts=","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"args_string":"(conts : Block | Nil)","args_html":"(conts : Block | Nil)","location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":35,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"error: '\") << details) << \"'\""}},{"html_id":"details:String-instance-method","name":"details","doc":"Returns a string describing the reasons of this error.","summary":"Returns a string describing the reasons of this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":23,"url":null},"def":{"name":"details","return_type":"String","visibility":"Public","body":"@details"}},{"html_id":"form:Form-instance-method","name":"form","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form","return_type":"Form","visibility":"Public","body":"if (value = @form).nil?\n ::raise(NilAssertionError.new(\"Novika::Error#form cannot be nil\"))\nelse\n value\nend"}},{"html_id":"form?:Form|Nil-instance-method","name":"form?","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form?","return_type":"Form | ::Nil","visibility":"Public","body":"@form"}},{"html_id":"report(io:IO)-instance-method","name":"report","doc":"Reports about this error to *io*.\n\nNote: Colorize is used for colors and emphasis. If you\ndo not want Colorize in *io*, you can temporarily disable\nit by setting `Colorize.enabled = false`.","summary":"Reports about this error to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":48,"url":null},"def":{"name":"report","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"if conts = self.conts\n b = Math.max(0, conts.count - MAX_TRACE)\n e = conts.count\n if b.zero?\n else\n ((io << \" │ … \") << (b - 1)) << \" continuation(s) omitted …\"\n io.puts\n end\n (b...e).each do |index|\n io << \" ╿ due to \"\n cont = (conts.at(index)).as?(Block)\n code = cont.try do |__arg0|\n (__arg0.at?(Engine::C_BLOCK_AT)).as?(Block)\n end\n if cont && code\n else\n io.puts(\"[malformed continuation]\")\n next\n end\n if top = code.top?\n ((io << \"'\") << (top || \"[nothing]\").colorize.bold) << \"', which was opened here:\"\n else\n io << \"the following block:\"\n end\n io.puts\n io << \" │ \"\n code.spot(io)\n io.puts\n end\nend\nif form?\n io.puts(\" ╿ this form is invalid, and is the cause of death:\")\n (io << \" │ \") << form\n io.puts\nend\n(io << \"Sorry: \".colorize.red.bold) << details\ncase details.byte_at?(details.bytesize - 1)\nwhen '!', '?', '.'\nelse\n io << '.'\nend\nio.puts\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/error.cr","line_number":96,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << details) << \"]\""}}]},{"html_id":"novika/Novika/False","path":"Novika/False.html","kind":"struct","full_name":"Novika::False","name":"False","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":63,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a falsey `Boolean`. `False` is the only falsey\nform in Novika.","summary":"Represents a falsey Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":64,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean false\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/boolean.cr","line_number":72,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"b"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/boolean.cr","line_number":76,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"false\""}}]},{"html_id":"novika/Novika/FFI","path":"Novika/FFI.html","kind":"module","full_name":"Novika::FFI","name":"FFI","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/FFI/Cchar","path":"Novika/FFI/Cchar.html","kind":"struct","full_name":"Novika::FFI::Cchar","name":"Cchar","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":368,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C char (a u8).\nIn Novika, char is represented by a single-character quote.","summary":"Type-side and value-side representation of C char (a u8).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":396,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":384,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"form.first_byte?.try do |byte|\n new(byte)\nend"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":388,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form.to_u8)"}},{"html_id":"matches?(value:Cchar)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"args_string":"(value : Cchar)","args_html":"(value : Cchar)","location":{"filename":"src/novika/ffi.cr","line_number":417,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":421,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.uint8"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":400,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"char\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":413,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"new((box.as(::Pointer(UInt8))).value)"}}],"constructors":[{"html_id":"new(char:UInt8)-class-method","name":"new","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"args_string":"(char : UInt8)","args_html":"(char : UInt8)","location":{"filename":"src/novika/ffi.cr","line_number":372,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"visibility":"Public","body":"_ = allocate\n_.initialize(char)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":404,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @char)).as(::Pointer(Void))"}},{"html_id":"to_crystal-instance-method","name":"to_crystal","doc":"Returns the corresponding Crystal character.","summary":"Returns the corresponding Crystal character.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":376,"url":null},"def":{"name":"to_crystal","visibility":"Public","body":"@char.chr"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":380,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":392,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"'\") << to_crystal) << \"'\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":408,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @char\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Cstr","path":"Novika/FFI/Cstr.html","kind":"struct","full_name":"Novika::FFI::Cstr","name":"Cstr","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":428,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C string (a u8 pointer).\nIn Novika, C string is represented by a quote.","summary":"Type-side and value-side representation of C string (a u8 pointer).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":456,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":460,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"new(form.string)"}},{"html_id":"matches?(value:Cstr)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"args_string":"(value : Cstr)","args_html":"(value : Cstr)","location":{"filename":"src/novika/ffi.cr","line_number":486,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":490,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":464,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"cstr\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":481,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"handle = Pointer(UInt8).new((box.as(::Pointer(UInt64))).value)\nhandle.null? ? UntypedPointer.none : new(String.new(handle))\n"}}],"constructors":[{"html_id":"new(string:String)-class-method","name":"new","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/novika/ffi.cr","line_number":432,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @string == (other.@string)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":468,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"write_to!((Pointer(UInt64).malloc(1)).as(::Pointer(Void)))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the corresponding Crystal string.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":436,"url":null},"def":{"name":"to_crystal","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":440,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":452,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"\\\"\") << to_crystal) << \"\\\"\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":472,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"bytes = Pointer(UInt8).malloc(@string.bytesize + 1)\nbytes.copy_from(@string.to_unsafe, @string.bytesize)\nbytes[@string.bytesize + 1] = 0\n(base.as(::Pointer(UInt64))).value = bytes.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/DefaultTypeParser","path":"Novika/FFI/DefaultTypeParser.html","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows all parse-able types, from ints to `nothing` to\nstructs and unions.","summary":"Allows all parse-able types, from ints to nothing
to structs and unions.
Type-side and value-side representation of Float32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/F64","path":"Novika/FFI/F64.html","kind":"struct","full_name":"Novika::FFI::F64","name":"F64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":239,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Float64`.","summary":"Type-side and value-side representation of Float64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/FixedArityFunction","path":"Novika/FFI/FixedArityFunction.html","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},"ancestors":[{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1035,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Calls a fixed-arity C function.","summary":"Calls a fixed-arity C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),argtypes:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1038,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, argtypes, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1056,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"args = Array(ForeignValue).new(@argtypes.size)\n@argtypes.reverse_each do |argtype|\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n args.unshift(arg)\nend\n(call(args)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1036,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]},{"html_id":"novika/Novika/FFI/ForeignType","path":"Novika/FFI/ForeignType.html","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":28,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for Novika FFI types.","summary":"Base type for Novika FFI types.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":30,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"from(form:Form):ForeignValue-instance-method","name":"from","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nDies if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue","args_html":"(form : Form) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":48,"url":null},"def":{"name":"from","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue","visibility":"Public","body":"(from?(form)) || (raise(Error.new(\"could not convert #{form} to foreign type #{self}\")))"}},{"html_id":"from?(form:Form):ForeignValue|Nil-instance-method","name":"from?","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nReturns nil if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue | Nil","args_html":"(form : Form) : ForeignValue | Nil","location":{"filename":"src/novika/ffi.cr","line_number":56,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue | ::Nil","visibility":"Public","body":""}},{"html_id":"matches?(value:ForeignValue):Bool-instance-method","name":"matches?","doc":"Returns whether this type corresponds to the given *value*.","summary":"Returns whether this type corresponds to the given value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(value : ForeignValue) : Bool","args_html":"(value : ForeignValue) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":60,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":40,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"(to_ffi_type.@type).value.size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":37,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Base type for Novika FFI values (both heap & stack allocated).
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":7,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"must_be_of(type:ForeignType)-instance-method","name":"must_be_of","doc":"Raises if this value is not of the given `ForeignType` *type*.","summary":"Raises if this value is not of the given ForeignType
type.
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":17,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":true,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":11,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/Function","path":"Novika/FFI/Function.html","kind":"struct","full_name":"Novika::FFI::Function","name":"Function","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1024,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/FixedArityFunction","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction"},{"html_id":"novika/Novika/FFI/VariadicFunction","kind":"struct","full_name":"Novika::FFI::VariadicFunction","name":"VariadicFunction"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for C function call interfaces.","summary":"Base type for C function call interfaces.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":true,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1031,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":1026,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/I16","path":"Novika/FFI/I16.html","kind":"struct","full_name":"Novika::FFI::I16","name":"I16","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":234,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int16`.","summary":"Type-side and value-side representation of Int16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I32","path":"Novika/FFI/I32.html","kind":"struct","full_name":"Novika::FFI::I32","name":"I32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int32`.","summary":"Type-side and value-side representation of Int32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I64","path":"Novika/FFI/I64.html","kind":"struct","full_name":"Novika::FFI::I64","name":"I64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int64`.","summary":"Type-side and value-side representation of Int64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I8","path":"Novika/FFI/I8.html","kind":"struct","full_name":"Novika::FFI::I8","name":"I8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":233,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int8`.","summary":"Type-side and value-side representation of Int8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/InlineStructType","path":"Novika/FFI/InlineStructType.html","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":785,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of an inline struct, e.g. one returned\nfrom a function or passed as an argument, aka stack-allocated\nstructs (like Crystal `struct`).","summary":"Type-side representation of an inline struct, e.g.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":790,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:InlineStructView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"args_string":"(view : InlineStructView) : Bool","args_html":"(view : InlineStructView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":806,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":786,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"padded_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":802,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.struct(@layout.map_desc_with_index do |__arg2|\n __arg2.type.to_ffi_type\nend)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":810,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":794,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"InlineStructView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/InlineStructView","path":"Novika/FFI/InlineStructView.html","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of an inline struct, aka\nstack-allocated struct. Allows to read and write fields (see\n`StructView`). Similar to the `.` operator in C.","summary":"Value-side representation of an inline struct, aka stack-allocated struct.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":974,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":984,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~⟨\"\nsuper(io)\nio << \"⟩\"\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":978,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.padded_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Nothing","path":"Novika/FFI/Nothing.html","kind":"struct","full_name":"Novika::FFI::Nothing","name":"Nothing","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":330,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of void. All value-side\nmethods raise.","summary":"Type-side and value-side representation of void.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":345,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be allocated\")"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":361,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.void"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":353,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"void\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":357,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"Nothing.new"}}],"constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":334,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be boxed\")"}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":342,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":349,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"(void)\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":338,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be written\")"}}]},{"html_id":"novika/Novika/FFI/StructFieldDesc","path":"Novika/FFI/StructFieldDesc.html","kind":"struct","full_name":"Novika::FFI::StructFieldDesc","name":"StructFieldDesc","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":500,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Holds the description of a struct field: its id (purely for\nconvenience), type (one of `ForeignType`s), and, most\nimportantly, *offset*.","summary":"Holds the description of a struct field: its id (purely for convenience), type (one of ForeignType
s), and, most importantly, offset.
offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : ForeignValue","args_html":"(base : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":507,"url":null},"def":{"name":"fetch!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"type.unbox(Pointer(Void).new(base.address + offset))"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"offset:UInt64-instance-method","name":"offset","abstract":false,"def":{"name":"offset","return_type":"UInt64","visibility":"Public","body":"@offset"}},{"html_id":"put!(base:Pointer(Void),value:ForeignValue)-instance-method","name":"put!","doc":"Writes *value* at *base* plus this field's offset, assuming\n*base* points to the start of the struct this field is a\nmember of.\n\nThe latter is not enforced; therefore, this method is considered\n**unsafe**.","summary":"Writes value at base plus this field's offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(base : Pointer(Void), value : ForeignValue)","args_html":"(base : Pointer(Void), value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":517,"url":null},"def":{"name":"put!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"value.must_be_of(type)\nvalue.write_to!(Pointer(Void).new(base.address + offset))\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":522,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"(\") << type) << \" \") << id) << \")\""}},{"html_id":"type:ForeignType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"ForeignType","visibility":"Public","body":"@type"}}]},{"html_id":"novika/Novika/FFI/StructLayout","path":"Novika/FFI/StructLayout.html","kind":"class","full_name":"Novika::FFI::StructLayout","name":"StructLayout","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":551,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows to describe structs which can then be constructed,\nretrieved, read, and written to.\n\n```\npoint_s = StructLayout.new(\"Point\")\npoint_s.add(\"x\", F64)\npoint_s.add(\"y\", F64)\n\nrect_s = StructLayout.new(\"Rect\")\nrect_s.add(\"origin\", point_s.reference)\nrect_s.add(\"corner\", point_s.inline)\n\norigin = point_s.reference.make!\norigin[\"x\"] = F64.new(123)\norigin[\"y\"] = F64.new(456)\n\ncorner = point_s.inline.make!\ncorner[\"x\"] = F64.new(234)\ncorner[\"y\"] = F64.new(567)\n\nrect = rect_s.reference.make!\nrect[\"origin\"] = origin\nrect[\"corner\"] = corner\n```","summary":"Allows to describe structs which can then be constructed, retrieved, read, and written to.
","constructors":[{"html_id":"new-class-method","name":"new","doc":"Creates an empty struct layout.","summary":"Creates an empty struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":563,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif object_id == other.object_id\nelse\n return false\nend\ntrue\n"}},{"html_id":"add(id,type:ForeignType)-instance-method","name":"add","doc":"Appends a field called *id*, of the given *type*, to this\nstruct's list of fields.\n\nSimilar to struct ids, *id* is irrelevant to FFI and is simply\n*one of* the ways to access struct fields.","summary":"Appends a field called id, of the given type, to this struct's list of fields.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(id, type : ForeignType)","args_html":"(id, type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":605,"url":null},"def":{"name":"add","args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"visibility":"Public","body":"if type.is_a?(InlineStructType)\n offset = add(type.padded_size, type.alignment)\nelse\n offset = add(type.to_ffi_type)\nend\n@fields << (StructFieldDesc.new(id, type, offset))\n"}},{"html_id":"alignment:UInt64-instance-method","name":"alignment","doc":"Returns the alignment of this struct layout.","summary":"Returns the alignment of this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":557,"url":null},"def":{"name":"alignment","return_type":"UInt64","visibility":"Public","body":"@alignment"}},{"html_id":"desc(index:Int32)-instance-method","name":"desc","doc":"Retrieves field description given the field's *index*.","summary":"Retrieves field description given the field's index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/ffi.cr","line_number":642,"url":null},"def":{"name":"desc","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"@fields[index]"}},{"html_id":"desc(id:String)-instance-method","name":"desc","doc":"Retrieves field description given the field's *id*entifier.\nRaises if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":654,"url":null},"def":{"name":"desc","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(desc?(id)) || (raise(\"BUG: no such field: #{id}\"))"}},{"html_id":"desc?(id:String)-instance-method","name":"desc?","doc":"Retrieves field description given the field's *id*entifier.\nReturns nil if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":648,"url":null},"def":{"name":"desc?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)).try do |index|\n @fields.unsafe_fetch(index)\nend"}},{"html_id":"each_desc_with_index(&)-instance-method","name":"each_desc_with_index","doc":"Yields field descriptions and their indices to the block.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":659,"url":null},"def":{"name":"each_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.each_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"field_count-instance-method","name":"field_count","doc":"Returns the amount of fields in this struct layout.","summary":"Returns the amount of fields in this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":619,"url":null},"def":{"name":"field_count","visibility":"Public","body":"@fields.size"}},{"html_id":"has_field?(id:String)-instance-method","name":"has_field?","doc":"Returns whether this layout contains a field with the\ngiven *id*entifier.","summary":"Returns whether this layout contains a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":625,"url":null},"def":{"name":"has_field?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.any? do |__arg0|\n __arg0.id == id\nend"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = object_id.hash(hasher)\nhasher\n"}},{"html_id":"index(id:String)-instance-method","name":"index","doc":"Returns the index of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the index of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":637,"url":null},"def":{"name":"index","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)) || (raise(\"BUG: no such field in struct layout: #{id}\"))"}},{"html_id":"index?(id:String)-instance-method","name":"index?","doc":"Returns the index of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the index of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":631,"url":null},"def":{"name":"index?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.index() do |__arg1|\n __arg1.id == id\nend"}},{"html_id":"inline-instance-method","name":"inline","doc":"Returns an inline struct type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.inline`\ninstead of saving it in a variable and using that variable.","summary":"Returns an inline struct type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":683,"url":null},"def":{"name":"inline","visibility":"Public","body":"InlineStructType.new(self)"}},{"html_id":"map_desc_with_index(&)-instance-method","name":"map_desc_with_index","doc":"Yields field descriptions and their indices to the block.\nReturns an array of block results.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":665,"url":null},"def":{"name":"map_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.map_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"max_field_size:UInt64-instance-method","name":"max_field_size","doc":"Returns the maximum field size in this struct.","summary":"Returns the maximum field size in this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":560,"url":null},"def":{"name":"max_field_size","return_type":"UInt64","visibility":"Public","body":"@max_field_size"}},{"html_id":"padded_size:UInt64-instance-method","name":"padded_size","doc":"Returns the padded size of this struct. Simply put, this is how\nmuch bytes you'd need to allocate for this struct layout.","summary":"Returns the padded size of this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":554,"url":null},"def":{"name":"padded_size","return_type":"UInt64","visibility":"Public","body":"@padded_size"}},{"html_id":"reference-instance-method","name":"reference","doc":"Returns a struct reference type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.reference`\ninstead of saving it in a variable and using that variable.","summary":"Returns a struct reference type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":674,"url":null},"def":{"name":"reference","visibility":"Public","body":"StructReferenceType.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":696,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive(:to_s) do\n io << \"⟪\"\n @fields.join(io, \", \") do |field, io|\n ((io << field.id) << \"=\") << field.type\n end\n io << \"⟫\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"union-instance-method","name":"union","doc":"Returns a union type layed out according to this struct layout.\nYou can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.union`\ninstead of saving it in a variable and using that variable.","summary":"Returns a union type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":692,"url":null},"def":{"name":"union","visibility":"Public","body":"UnionType.new(self)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceType","path":"Novika/FFI/StructReferenceType.html","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":750,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct (like Crystal `class`).","summary":"Type-side representation of a struct reference, aka struct pointer, aka heap-allocated struct (like Crystal class
).
Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":751,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"matches?(pointer:UntypedPointer)-instance-method","name":"matches?","abstract":false,"args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"args_string":"(pointer : UntypedPointer)","args_html":"(pointer : UntypedPointer)","location":{"filename":"src/novika/ffi.cr","line_number":772,"url":null},"def":{"name":"matches?","args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"visibility":"Public","body":"pointer.none?"}},{"html_id":"matches?(view:StructReferenceView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"args_string":"(view : StructReferenceView) : Bool","args_html":"(view : StructReferenceView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":768,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":764,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":776,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"&\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":755,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"StructReferenceView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceView","path":"Novika/FFI/StructReferenceView.html","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":922,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct. Allows to read and write\nfields (see `StructView`). Similar to the `->` operator in C.","summary":"Value-side representation of a struct reference, aka struct pointer, aka heap-allocated struct.
","instance_methods":[{"html_id":"==(other:StructReferenceView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"args_string":"(other : StructReferenceView)","args_html":"(other : StructReferenceView)","location":{"filename":"src/novika/ffi.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"visibility":"Public","body":"if @handle == (other.@handle)\n return true\nend\nif size == other.size\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive_by_handle(:==) do\n result = super(other)\nend\nexecuted && result\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":923,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @handle.address)).as(::Pointer(Void))"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":958,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive_by_handle(:to_s) do\n io << \"&⟨\"\n super(io)\n io << \"⟩\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":927,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @handle.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/StructType","path":"Novika/FFI/StructType.html","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":714,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructType","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType"},{"html_id":"novika/Novika/FFI/StructReferenceType","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType"},{"html_id":"novika/Novika/FFI/UnionType","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *type* side of structs.","summary":"Base type of the type side of structs.
","constructors":[{"html_id":"new(layout:StructLayout)-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"args_string":"(layout : StructLayout)","args_html":"(layout : StructLayout)","location":{"filename":"src/novika/ffi.cr","line_number":717,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alignment(*args,**options)-instance-method","name":"alignment","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
Constructs a struct view for this struct type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":739,"url":null},"def":{"name":"make!","return_type":"StructView","visibility":"Public","body":"view_for(Pointer(Void).malloc(@layout.padded_size))"}},{"html_id":"padded_size(*args,**options)-instance-method","name":"padded_size","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See StructLayout
.
See StructLayout
.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":true,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":725,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/StructView","path":"Novika/FFI/StructView.html","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":853,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructView","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView"},{"html_id":"novika/Novika/FFI/StructReferenceView","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView"},{"html_id":"novika/Novika/FFI/UnionView","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *value* side of structs.\n\nImplements `Indexable` and `Indexable::Mutable` over the fields in\nthe struct, allowing you to iterate, read, and change them (with\nsome casting from and to `ForeignValue` though.)","summary":"Base type of the value side of structs.
","constructors":[{"html_id":"new(layout:Novika::FFI::StructLayout,handle:Pointer(Void))-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","args_html":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","location":{"filename":"src/novika/ffi.cr","line_number":861,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, handle)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:StructView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructView"}],"args_string":"(other : StructView)","args_html":"(other : StructView)","location":{"filename":"src/novika/ffi.cr","line_number":912,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructView"}],"visibility":"Public","body":"equals?(other) do |a, b|\n a == b\nend"}},{"html_id":"[](id:String)-instance-method","name":"[]","doc":"Returns the value of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the value of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":889,"url":null},"def":{"name":"[]","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"unsafe_fetch(@layout.index(id))"}},{"html_id":"[]=(id:String,value:ForeignValue)-instance-method","name":"[]=","doc":"Assigns *value* to a field with the given *id*entifier.","summary":"Assigns value to a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(id : String, value : ForeignValue)","args_html":"(id : String, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":883,"url":null},"def":{"name":"[]=","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"unsafe_put(@layout.index(id), value)"}},{"html_id":"[]?(id:String)-instance-method","name":"[]?","doc":"Returns the value of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the value of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":895,"url":null},"def":{"name":"[]?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"if index = @layout.index?(id)\n unsafe_fetch(index)\nend"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"has_field?(*args,**options)-instance-method","name":"has_field?","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See Object#hash(hasher)
Returns this view's struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":859,"url":null},"def":{"name":"layout","return_type":"StructLayout","visibility":"Public","body":"@layout"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":870,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":901,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"StructViewForm.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":905,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@layout.each_desc_with_index do |desc, index|\n ((io << desc.id) << \"=\") << (unsafe_fetch(index))\n if index == (@layout.field_count - 1)\n else\n io << \", \"\n end\nend"}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":878,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"(@layout.desc(index)).fetch!(@handle)"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":874,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"(@layout.desc(index)).put!(@handle, value)"}}]},{"html_id":"novika/Novika/FFI/TypeParser","path":"Novika/FFI/TypeParser.html","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":67,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/DefaultTypeParser","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser"},{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"An object used to translate `Word`s (representing a foreign type)\ninto actual `ForeignType`s.","summary":"An object used to translate Word
s (representing a foreign type) into actual ForeignType
s.
Initializes a parser object from this, a block that will be asked for word definitions in case they are needed, and typename, which is the word-to-be-parsed itself.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"args_string":"(this : Block, typename : Word)","args_html":"(this : Block, typename : Word)","location":{"filename":"src/novika/ffi.cr","line_number":78,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":92,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.inline"}},{"html_id":"on_primitive(type:ForeignType):ForeignType-instance-method","name":"on_primitive","doc":"Primitive *type* middleware.","summary":"Primitive type middleware.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(type : ForeignType) : ForeignType","args_html":"(type : ForeignType) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":82,"url":null},"def":{"name":"on_primitive","args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"return_type":"ForeignType","visibility":"Public","body":"type"}},{"html_id":"on_struct_reference(form:StructLayoutForm):ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":97,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.reference"}},{"html_id":"on_union(form:StructLayoutForm):ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":87,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.union"}},{"html_id":"parse:ForeignType-instance-method","name":"parse","doc":"Performs the parsing. Returns the resulting type.","summary":"Performs the parsing.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":102,"url":null},"def":{"name":"parse","return_type":"ForeignType","visibility":"Public","body":"case @typename.id\nwhen \"u8\"\n return on_primitive(U8)\nwhen \"u16\"\n return on_primitive(U16)\nwhen \"u32\"\n return on_primitive(U32)\nwhen \"u64\"\n return on_primitive(U64)\nwhen \"i8\"\n return on_primitive(I8)\nwhen \"i16\"\n return on_primitive(I16)\nwhen \"i32\"\n return on_primitive(I32)\nwhen \"i64\"\n return on_primitive(I64)\nwhen \"f32\"\n return on_primitive(F32)\nwhen \"f64\"\n return on_primitive(F64)\nwhen \"cstr\"\n return on_primitive(Cstr)\nwhen \"char\"\n return on_primitive(Cchar)\nwhen \"pointer\"\n return on_primitive(UntypedPointer)\nwhen \"nothing\"\n return on_primitive(Nothing)\nwhen .prefixed_by?('?')\n handler = ->on_union(StructLayoutForm)\nwhen .prefixed_by?('~')\n handler = ->on_inline_struct(StructLayoutForm)\nwhen .prefixed_by?('&')\n handler = ->on_struct_reference(StructLayoutForm)\nelse\n @typename.die(\"could not recognize foreign type. Did you mean ⸢~#{@typename}⸥ (inline struct), ⸢{@typename}⸥ (reference to struct), or ⸢?#{@typename}⸥ (union)?\")\nend\nraw = Word.new(@typename.id.lchop)\nform = @this.form_for(raw)\nif form.is_a?(StructLayoutForm)\nelse\n @typename.die(\"expected struct layout to be value form, not: #{form.class.typedesc}\")\nend\nhandler.call(form)\n"}}],"types":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","path":"Novika/FFI/TypeParser/ForbidsNothing.html","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"doc":"If included, the parser would die upon encountering `nothing`.","summary":"If included, the parser would die upon encountering nothing
.
Type-side and value-side representation of UInt16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U32","path":"Novika/FFI/U32.html","kind":"struct","full_name":"Novika::FFI::U32","name":"U32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":230,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt32`.","summary":"Type-side and value-side representation of UInt32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U64","path":"Novika/FFI/U64.html","kind":"struct","full_name":"Novika::FFI::U64","name":"U64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":231,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt64`.","summary":"Type-side and value-side representation of UInt64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U8","path":"Novika/FFI/U8.html","kind":"struct","full_name":"Novika::FFI::U8","name":"U8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":228,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt8`.","summary":"Type-side and value-side representation of UInt8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UnionType","path":"Novika/FFI/UnionType.html","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a union.","summary":"Type-side representation of a union.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":822,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:UnionView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"args_string":"(view : UnionView) : Bool","args_html":"(view : UnionView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":838,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":818,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"@layout.max_field_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":834,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":842,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"⋃\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":826,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"UnionView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/UnionView","path":"Novika/FFI/UnionView.html","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":992,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a union.","summary":"Value-side representation of a union.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1008,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":993,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":1018,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"(⋃ \") << @layout) << \")\""}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":1003,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"desc = @layout.desc(index)\ndesc.type.unbox(@handle)\n"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":997,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"desc = @layout.desc(index)\nvalue.must_be_of(desc.type)\nvalue.write_to!(@handle)\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":1012,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.max_field_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UntypedPointer","path":"Novika/FFI/UntypedPointer.html","kind":"struct","full_name":"Novika::FFI::UntypedPointer","name":"UntypedPointer","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":242,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of pointers.","summary":"Type-side and value-side representation of pointers.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":264,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Hole)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Hole"}],"args_string":"(form : Hole)","args_html":"(form : Hole)","location":{"filename":"src/novika/ffi.cr","line_number":268,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Hole"}],"visibility":"Public","body":"new(form.address)"}},{"html_id":"from?(form:StructViewForm)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"args_string":"(form : StructViewForm)","args_html":"(form : StructViewForm)","location":{"filename":"src/novika/ffi.cr","line_number":272,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"visibility":"Public","body":"if view = form.view.as?(StructReferenceView)\nelse\n raise(Error.new(\"cannot implicitly take pointer of struct view that is not a reference struct view\"))\nend\nnew(view.address)\n"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":282,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form)"}},{"html_id":"matches?(value:UntypedPointer):Bool-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"args_string":"(value : UntypedPointer) : Bool","args_html":"(value : UntypedPointer) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":317,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"none-class-method","name":"none","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":252,"url":null},"def":{"name":"none","visibility":"Public","body":"new(0)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":321,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":305,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"pointer\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":309,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"if box.null?\n raise(Error.new(\"attempt to unbox none (C nullptr)\"))\nend\nUntypedPointer.new((box.as(::Pointer(UInt64))).value)\n"}}],"constructors":[{"html_id":"new(decimal)-class-method","name":"new","abstract":false,"args":[{"name":"decimal","external_name":"decimal","restriction":""}],"args_string":"(decimal)","args_html":"(decimal)","location":{"filename":"src/novika/ffi.cr","line_number":248,"url":null},"def":{"name":"new","args":[{"name":"decimal","external_name":"decimal","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(decimal)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @address == (other.@address)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":286,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @address)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":260,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(@address)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":295,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if none?\n io << \"(none)\"\nelse\n io << \"(0x\"\n @address.to_s(io, base: 16)\n io << \")\"\nend"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":290,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/ValueTypeParser","path":"Novika/FFI/ValueTypeParser.html","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"},{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":159,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Same as `DefaultTypeParser`, but forbids nothing.\n\n```\n# this : Block\n\nparser = ValueTypeParser.new(this, Word.new(\"i32\"))\nparser.parse # => I32\n\n# ...\n\nparser = ValueTypeParser.new(this, Word.new(\"nothing\"))\nparser.parse # Dies: nothing is not a value type.\n```","summary":"Same as DefaultTypeParser
, but forbids nothing.
Calls a variadic C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),fixed_arg_types:Array(ForeignType),var_arg_allowed:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1071,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, fixed_arg_types, var_arg_allowed, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1080,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"var_args_block = block.drop.a(Block)\nnargs_total = @fixed_arg_types.size + var_args_block.count\nffi_args = Array(ForeignValue).new(nargs_total)\nffi_types = Array(Crystal::FFI::Type).new(nargs_total)\n@fixed_arg_types.reverse_each do |argtype|\n ffi_types.unshift(argtype.to_ffi_type)\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n ffi_args.unshift(arg)\nend\nvar_args_block.each do |form|\n candidates = @var_arg_allowed.map do |type|\n {type, type.from?(form)}\n end.select do |_, value|\n value\n end\n if candidates.size == 1\n else\n form.die(\"unable to convert to foreign value: too many or no type candidates for form. Make sure you've specified the corresponding foreign type in the variadic function's list of allowed types, and no conflicts between types exist (e.g. both i32 and i64; this is currently unsupported)\")\n end\n candidate = candidates[0]\n candidate_type, candidate_value = candidate\n candidate_value = candidate_value.not_nil!\n ffi_types << candidate_type.to_ffi_type\n ffi_args << candidate_value\nend\nffi_args.each do |arg|\n case arg\n when U8, U16, I8, I16\n block.die(\"bad argtype in variadic call: promote to i32 first: #{arg}\")\n when F32\n block.die(\"bad argtype in variadic call: promote to f64 first: #{arg}\")\n end\nend\ncif = Crystal::FFI::CallInterface.variadic(return_type: @return_type.to_ffi_type, arg_types: ffi_types, fixed_args: @fixed_arg_types.size)\ncargs = Pointer(::Pointer(Void)).malloc(ffi_args.size) do |index|\n ffi_args[index].box\nend\ncreturn = Pointer(Void).malloc(@return_type.sizeof)\ncif.call(@handle, cargs, creturn)\n(@return_type.unbox(creturn)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1069,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]}]},{"html_id":"novika/Novika/ForeignFunction","path":"Novika/ForeignFunction.html","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::Function`.","summary":"A thin wrapper around FFI::Function
.
Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":12,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"stack = engine.stack\nvalue = @function.call(stack)\nvalue.try(&.onto(stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":29,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign function: \") << @function.id) << \"]\""}}]},{"html_id":"novika/Novika/Form","path":"Novika/Form.html","kind":"module","full_name":"Novika::Form","name":"Form","abstract":false,"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":98,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Builtin","kind":"struct","full_name":"Novika::Builtin","name":"Builtin"},{"html_id":"novika/Novika/Byteslice","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice"},{"html_id":"novika/Novika/Color","kind":"struct","full_name":"Novika::Color","name":"Color"},{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"},{"html_id":"novika/Novika/Error","kind":"class","full_name":"Novika::Error","name":"Error"},{"html_id":"novika/Novika/ForeignFunction","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction"},{"html_id":"novika/Novika/Hole","kind":"struct","full_name":"Novika::Hole","name":"Hole"},{"html_id":"novika/Novika/Library","kind":"class","full_name":"Novika::Library","name":"Library"},{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/QuotedWord","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord"},{"html_id":"novika/Novika/StructLayoutForm","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"},{"html_id":"novika/Novika/Word","kind":"struct","full_name":"Novika::Word","name":"Word"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Form is an umbrella for words and blocks. Since some words\n(like numbers, quotes) are just too different from words as\nwe know them, they have their own types directly subordinate\nto Form.\n\nMake sure to override `self.typedesc` to avoid weird unrelated\nCrystal errors. Crystal breaks at class-level inheritance.","summary":"Form is an umbrella for words and blocks.
","instance_methods":[{"html_id":"a(type:T.class):TforallT-instance-method","name":"a","doc":"Asserts that this form is of the given *type*. Dies if\nit's not.","summary":"Asserts that this form is of the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : T forall T","args_html":"(type : T.class) : T forall T","location":{"filename":"src/novika/forms/form.cr","line_number":146,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"self.is_a?(T) ? self : afail(T)"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/form.cr","line_number":114,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"a form\""}},{"html_id":"desc:String-instance-method","name":"desc","doc":"Returns a string description of this form.","summary":"Returns a string description of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":119,"url":null},"def":{"name":"desc","return_type":"String","visibility":"Public","body":"String.build do |io|\n desc(io)\nend"}},{"html_id":"die(details:String)-instance-method","name":"die","doc":"Raises an `Error` providing *details*.","summary":"Raises an Error
providing details.
Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/form.cr","line_number":162,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"effect-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":167,"url":null},"def":{"name":"effect","visibility":"Public","body":"String.build do |io|\n effect(io)\nend"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":130,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"on_parent_open(engine)"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":135,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"onto(engine.stack)"}},{"html_id":"onto(block:Block):self-instance-method","name":"onto","doc":"Adds this form to *block*.","summary":"Adds this form to block.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : self","args_html":"(block : Block) : self","location":{"filename":"src/novika/forms/form.cr","line_number":140,"url":null},"def":{"name":"onto","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"tap do\n block.add(self)\nend"}},{"html_id":"sel(a,b)-instance-method","name":"sel","doc":"Selects either *a* or *b*. Novika defines `False` to be the\nonly form selecting *b*. All other forms select *a*.","summary":"Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/form.cr","line_number":125,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"a"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":151,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"Quote.new(to_s)"}}]},{"html_id":"novika/Novika/Frontend","path":"Novika/Frontend.html","kind":"module","full_name":"Novika::Frontend","name":"Frontend","abstract":false,"locations":[{"filename":"src/common.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"err(message,io=STDERR)-instance-method","name":"err","doc":"Appends a \"sorry\" *message* to *io*","summary":"Appends a "sorry" message to io
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"args_string":"(message, io = STDERR)","args_html":"(message, io = STDERR)","location":{"filename":"src/common.cr","line_number":10,"url":null},"def":{"name":"err","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Sorry\".colorize.red.bold) << \": \") << message"}},{"html_id":"errln(message,io=STDERR)-instance-method","name":"errln","doc":"Calls `err`, and appends a newline, both using\nwith *io*.","summary":"Calls #err
, and appends a newline, both using with io.
Appends a "note" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":20,"url":null},"def":{"name":"note","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Note\".colorize.blue.bold) << \": \") << message"}},{"html_id":"noteln(message,io=STDOUT)-instance-method","name":"noteln","doc":"Calls `note`, and appends a newline, both using\nwith *io*.","summary":"Calls #note
, and appends a newline, both using with io.
Appends an "ok" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":15,"url":null},"def":{"name":"ok","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Ok\".colorize.green.bold) << \": \") << message"}},{"html_id":"okln(message,io=STDOUT)-instance-method","name":"okln","doc":"Calls `ok`, and appends a newline, both using\nwith *io*.","summary":"Calls #ok
, and appends a newline, both using with io.
Appends a "wait" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":5,"url":null},"def":{"name":"wait","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Wait\".colorize.bold) << \": \") << message"}},{"html_id":"wait(msg,*,okokmsg,&)-instance-method","name":"wait","doc":"Issues a `wait` message *msg*, yields, then follows with\nan OK message *okmsg*.","summary":"Issues a #wait
message msg, yields, then follows with an OK message okmsg.
Calls #wait
, and appends a newline, both using with io.
Novika command-line frontend entry point.
","abstract":false,"args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"args_string":"(args = ARGV, cwd = Path[ENV[\"NOVIKA_CWD\"]? || Dir.current])","args_html":"(args = ARGV, cwd = Path[ENV["NOVIKA_CWD"]? || Dir.current])","location":{"filename":"src/cli.cr","line_number":408,"url":null},"def":{"name":"start","args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"visibility":"Public","body":"begin\n args = args.dup\n Colorize.enabled = Novika.colorful?\n if args.any?(/^\\-{1,2}:?(?:h(?:elp)?|\\?)$/)\n help(STDOUT)\n exit(0)\n end\n profiler = nil\n dry_list = false\n dry_list_sm = false\n dry_tree = false\n help_mode = false\n abort_on_permission_request = false\n args.reject! do |arg|\n case arg\n when /^\\-:profile(?::([1-9]\\d*))?$/\n profiler = Profiler.new($~[1]?.try(&.to_u64) || 16_u64)\n when /^\\-:dry-list$/\n dry_list = true\n when /^\\-:dry-tree$/\n dry_tree = true\n when /^\\+:dry-list-sm$/\n dry_list_sm = true\n when /^\\-:abort-on-permission-request$/\n abort_on_permission_request = true\n when /^help$/\n help_mode = true\n else\n next false\n end\n true\n end\n profiler.try do |prof|\n Engine.trackers << prof\n end\n resolver = RunnableResolver.new(cwd, args)\n resolver.on_permissions_gets do |string|\n if abort_on_permission_request\n abort\n end\n print(string, \" \")\n gets\n end\n resolver.on_permissions_print do |string|\n print(string)\n end\n resolver.after_container_rewritten do |container|\n if dry_tree\n else\n next\n end\n puts(container)\n end\n resolver.after_response do |hook|\n if dry_tree\n exit(0)\n end\n hook.response.each_ignored_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.note(\"this runnable is not allowed here, and will be ignored: #{runnable}\", io)\n end\n end\n if help_mode\n else\n next\n end\n first = true\n hook.each_queried_for_preamble_with_group do |preamble, group|\n if first\n first = false\n else\n print(\"\\n\\n\")\n end\n puts(preamble)\n end\n if first\n help(STDOUT)\n end\n exit(0)\n end\n resolver.after_program do |hook|\n if dry_list\n else\n next\n end\n if dry_list_sm\n else\n puts(\"--> Showing environment designations (which environment is going to run which file).\\n--> Order matters, and is exactly the execution order.\")\n puts\n end\n hook.each_designation do |designation|\n designation.to_s(STDOUT, sm: dry_list_sm)\n puts\n end\n exit(0)\n end\n resolver.after_permissions do |hook|\n begin\n hook.run\n ensure\n profiler.try do |prof|\n puts(prof.to_table)\n end\n end\n end\n if resolver.resolve?\n else\n help(STDOUT)\n exit(0)\n end\nrescue e : Resolver::RunnableError\n e.runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n exit(1)\nrescue e : Resolver::ResponseRejectedError\n e.response.each_rejected_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n end\n exit(1)\nrescue e : Resolver::MoreThanOneAppError\n e.apps.each do |app|\n app.backtrace(STDERR, indent: 2) do |io|\n Frontend.noteln(\"could not run this app because it's not the only one\", io)\n end\n end\n Frontend.errln(e.message)\n exit(1)\nrescue e : Resolver::ResolverError\n Frontend.errln(e.message)\nrescue e : Error\n e.report(STDERR)\n exit(1)\nend"}}],"types":[{"html_id":"novika/Novika/Frontend/CLI/Profiler","path":"Novika/Frontend/CLI/Profiler.html","kind":"class","full_name":"Novika::Frontend::CLI::Profiler","name":"Profiler","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cli.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"}],"namespace":{"html_id":"novika/Novika/Frontend/CLI","kind":"module","full_name":"Novika::Frontend::CLI","name":"CLI"},"doc":"A crude sample-based profiler which is triggered on every\nform the engine tries to execute.\n\nCounts the amount of times a form was attempted to be open\nby the engine.\n\nYou can use `to_table` to convert a snapshot of data to a\n`Tablo::Table` table.","summary":"A crude sample-based profiler which is triggered on every form the engine tries to execute.
","constructors":[{"html_id":"new(period:UInt64=32_u64)-class-method","name":"new","doc":"Initializes this profiler.\n\n*period* is the period between samples, in Engine loop\nticks. The less the value, the more samples are taken\nand the more precise the results are (but the program\nmay run slower).","summary":"Initializes this profiler.
","abstract":false,"args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"args_string":"(period : UInt64 = 32_u64)","args_html":"(period : UInt64 = 32_u64)","location":{"filename":"src/cli.cr","line_number":48,"url":null},"def":{"name":"new","args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(period)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_form_begin(engine:Engine,form:Form)-instance-method","name":"on_form_begin","doc":"Invoked before *engine* opens the given *form*.","summary":"Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/cli.cr","line_number":64,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if (@ticks - @start) >= @period\nelse\n @ticks = @ticks + 1\n return\nend\nengine.each_active_block do |block|\n profile = @profiles[repr = encode(block)]\n profile.sample\n @profiles[repr] = profile\nend\n@start = @ticks\n@ticks = @ticks + 1\n"}},{"html_id":"to_table(cutoff=0.01)-instance-method","name":"to_table","doc":"Assembles and returns the data from this profiler as\na `Tablo::Table`.\n\n*cutoff* specifies the ratio [0-1] below which profiles\nshould be rejected (i.e., too insignificant).","summary":"Assembles and returns the data from this profiler as a Tablo::Table
.
Represents a profile entry.
","constructors":[{"html_id":"new(str:String)-class-method","name":"new","abstract":false,"args":[{"name":"str","external_name":"str","restriction":"String"}],"args_string":"(str : String)","args_html":"(str : String)","location":{"filename":"src/cli.cr","line_number":21,"url":null},"def":{"name":"new","args":[{"name":"str","external_name":"str","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(str)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<=>(other:Profile)-instance-method","name":"<=>","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Profile"}],"args_string":"(other : Profile)","args_html":"(other : Profile)","location":{"filename":"src/cli.cr","line_number":25,"url":null},"def":{"name":"<=>","args":[{"name":"other","external_name":"other","restriction":"Profile"}],"visibility":"Public","body":"@samples <=> (other.@samples)"}},{"html_id":"ratio(whole:Float64)-instance-method","name":"ratio","abstract":false,"args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"args_string":"(whole : Float64)","args_html":"(whole : Float64)","location":{"filename":"src/cli.cr","line_number":33,"url":null},"def":{"name":"ratio","args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"visibility":"Public","body":"@samples / whole"}},{"html_id":"sample-instance-method","name":"sample","abstract":false,"location":{"filename":"src/cli.cr","line_number":29,"url":null},"def":{"name":"sample","visibility":"Public","body":"@samples = @samples + 1"}},{"html_id":"to_row?(nperiods)-instance-method","name":"to_row?","abstract":false,"args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"args_string":"(nperiods)","args_html":"(nperiods)","location":{"filename":"src/cli.cr","line_number":37,"url":null},"def":{"name":"to_row?","args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"visibility":"Public","body":"[@str, @samples]"}}]}]}]},{"html_id":"novika/Novika/Frontend/Nkas","path":"Novika/Frontend/Nkas.html","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas","abstract":false,"locations":[{"filename":"src/nkas.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend/Nkas","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas"}],"namespace":{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"},"instance_methods":[{"html_id":"help(io)-instance-method","name":"help","doc":"Appends information about the tool to *io*.","summary":"Appends information about the tool to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/nkas.cr","line_number":8,"url":null},"def":{"name":"help","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"nkas - Novika image assembler for Novika #{Novika::VERSION}\\n\\nSyntax:\\n\\n nkas [switches] [queries]Holds all information about a block.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock]","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 2, cls: Novika::FrozenBlock, onlyif: nil, verify: nil}, {type: \"basic\", name: id, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: \"group\", name: tape, cls: Tape, onlyif: -> do\n has_tape\nend, verify: nil, value: nil}, {type: \"group\", name: dict, cls: Dict, onlyif: -> do\n has_dict\nend, verify: nil, value: nil}, {type: \"group\", name: friends, cls: Friends, onlyif: -> do\n has_friends\nend, verify: nil, value: nil}, {type: \"basic\", name: parent, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n has_parent\nend, verify: nil, value: nil}, {type: \"basic\", name: prototype, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n is_instance\nend, verify: nil, value: nil}, {type: \"string\", name: comment, cls: String, onlyif: -> do\n has_comment\nend, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(id,tape,dict,friends,parent,prototype,comment)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"args_string":"(id, tape, dict, friends, parent, prototype, comment)","args_html":"(id, tape, dict, friends, parent, prototype, comment)","location":{"filename":"src/novika/image.cr","line_number":487,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"visibility":"Public","body":"frozen = new\nfrozen.id = id\nfrozen.has_tape = !(!tape)\nif tape\n frozen.tape.cursor = tape.cursor.to_u32\n frozen.tape.substrate = [] of TypedSnapshot\n tape.each do |form|\n if ts = TypedSnapshot.new(form)\n frozen.tape.substrate << ts\n end\n end\nend\nfrozen.has_dict = !(!dict)\nif dict\n frozen.dict.entries = [] of FrozenEntry\n dict.each do |key, entry|\n frozen.dict.entries << (FrozenEntry.new(key, entry))\n end\nend\nfrozen.has_friends = !(!friends)\nif friends\n frozen.friends.refs = [] of BlockRefSnapshot\n friends.each do |friend|\n friend = friend.as(Block)\n frozen.friends.refs << (BlockRefSnapshot.new(friend.object_id))\n end\nend\nfrozen.has_parent = !(!parent)\nif parent\n frozen.parent = BlockRefSnapshot.new(parent.object_id)\nend\nfrozen.is_instance = !(!prototype)\nif prototype\n frozen.prototype = BlockRefSnapshot.new(prototype.object_id)\nend\nfrozen.has_comment = !(!comment)\nif comment\n frozen.comment = comment\nend\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":422,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"comment:String-instance-method","name":"comment","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"def":{"name":"comment","return_type":"String","visibility":"Public","body":"@comment"}},{"html_id":"comment=(comment:String)-instance-method","name":"comment=","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"}],"args_string":"(comment : String)","args_html":"(comment : String)","def":{"name":"comment=","args":[{"name":"comment","external_name":"comment","restriction":"String"}],"visibility":"Public","body":"@comment = comment"}},{"html_id":"dict:Novika::FrozenBlock::Dict-instance-method","name":"dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"dict","visibility":"Public","body":"@dict"}},{"html_id":"dict=(dict:Novika::FrozenBlock::Dict)-instance-method","name":"dict=","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"args_string":"(dict : Novika::FrozenBlock::Dict)","args_html":"(dict : Novika::FrozenBlock::Dict)","def":{"name":"dict=","args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"visibility":"Public","body":"@dict = dict"}},{"html_id":"friends:Novika::FrozenBlock::Friends-instance-method","name":"friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"friends","visibility":"Public","body":"@friends"}},{"html_id":"friends=(friends:Novika::FrozenBlock::Friends)-instance-method","name":"friends=","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"args_string":"(friends : Novika::FrozenBlock::Friends)","args_html":"(friends : Novika::FrozenBlock::Friends)","def":{"name":"friends=","args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"visibility":"Public","body":"@friends = friends"}},{"html_id":"has_comment:Bool-instance-method","name":"has_comment","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment","return_type":"Bool","visibility":"Public","body":"@has_comment == 1"}},{"html_id":"has_comment=(has_comment:UInt8)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"args_string":"(has_comment : UInt8)","args_html":"(has_comment : UInt8)","def":{"name":"has_comment=","args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"visibility":"Public","body":"@has_comment = has_comment"}},{"html_id":"has_comment=(value:Bool)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_comment = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_dict:Bool-instance-method","name":"has_dict","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict","return_type":"Bool","visibility":"Public","body":"@has_dict == 1"}},{"html_id":"has_dict=(has_dict:UInt8)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"args_string":"(has_dict : UInt8)","args_html":"(has_dict : UInt8)","def":{"name":"has_dict=","args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"visibility":"Public","body":"@has_dict = has_dict"}},{"html_id":"has_dict=(value:Bool)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_dict = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_friends:Bool-instance-method","name":"has_friends","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends","return_type":"Bool","visibility":"Public","body":"@has_friends == 1"}},{"html_id":"has_friends=(has_friends:UInt8)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"args_string":"(has_friends : UInt8)","args_html":"(has_friends : UInt8)","def":{"name":"has_friends=","args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"visibility":"Public","body":"@has_friends = has_friends"}},{"html_id":"has_friends=(value:Bool)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_friends = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_parent:Bool-instance-method","name":"has_parent","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent","return_type":"Bool","visibility":"Public","body":"@has_parent == 1"}},{"html_id":"has_parent=(has_parent:UInt8)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"args_string":"(has_parent : UInt8)","args_html":"(has_parent : UInt8)","def":{"name":"has_parent=","args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"visibility":"Public","body":"@has_parent = has_parent"}},{"html_id":"has_parent=(value:Bool)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_parent = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_tape:Bool-instance-method","name":"has_tape","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape","return_type":"Bool","visibility":"Public","body":"@has_tape == 1"}},{"html_id":"has_tape=(has_tape:UInt8)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"args_string":"(has_tape : UInt8)","args_html":"(has_tape : UInt8)","def":{"name":"has_tape=","args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"visibility":"Public","body":"@has_tape = has_tape"}},{"html_id":"has_tape=(value:Bool)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_tape = UInt8.new(value ? 1 : 0)"}},{"html_id":"id:UInt64-instance-method","name":"id","doc":"Block identifier (`BlockRefSnapshot`s will refer to\nthis frozen block by this identifier).","summary":"Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Whether this block is an instance (its prototype is other than itself).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance","return_type":"Bool","visibility":"Public","body":"@is_instance == 1"}},{"html_id":"is_instance=(is_instance:UInt8)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"args_string":"(is_instance : UInt8)","args_html":"(is_instance : UInt8)","def":{"name":"is_instance=","args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"visibility":"Public","body":"@is_instance = is_instance"}},{"html_id":"is_instance=(value:Bool)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@is_instance = UInt8.new(value ? 1 : 0)"}},{"html_id":"parent:BlockRefSnapshot|Nil-instance-method","name":"parent","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"def":{"name":"parent","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"parent=(parent:BlockRefSnapshot|Nil)-instance-method","name":"parent=","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(parent : BlockRefSnapshot | Nil)","args_html":"(parent : BlockRefSnapshot | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"prototype:BlockRefSnapshot|Nil-instance-method","name":"prototype","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"def":{"name":"prototype","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"prototype=(prototype:BlockRefSnapshot|Nil)-instance-method","name":"prototype=","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(prototype : BlockRefSnapshot | Nil)","args_html":"(prototype : BlockRefSnapshot | Nil)","def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"tape:Novika::FrozenBlock::Tape-instance-method","name":"tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"tape","visibility":"Public","body":"@tape"}},{"html_id":"tape=(tape:Novika::FrozenBlock::Tape)-instance-method","name":"tape=","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"args_string":"(tape : Novika::FrozenBlock::Tape)","args_html":"(tape : Novika::FrozenBlock::Tape)","def":{"name":"tape=","args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"visibility":"Public","body":"@tape = tape"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}],"types":[{"html_id":"novika/Novika/FrozenBlock/Dict","path":"Novika/FrozenBlock/Dict.html","kind":"class","full_name":"Novika::FrozenBlock::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":459,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Dict]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n entries.size\nend}, {type: \"array\", name: entries, cls: FrozenEntry, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"entries:Array(FrozenEntry)-instance-method","name":"entries","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"def":{"name":"entries","return_type":"Array(FrozenEntry)","visibility":"Public","body":"@entries"}},{"html_id":"entries=(entries:Array(FrozenEntry))-instance-method","name":"entries=","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"args_string":"(entries : Array(FrozenEntry))","args_html":"(entries : Array(FrozenEntry))","def":{"name":"entries=","args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"visibility":"Public","body":"@entries = entries"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":459,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Friends","path":"Novika/FrozenBlock/Friends.html","kind":"class","full_name":"Novika::FrozenBlock::Friends","name":"Friends","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":469,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Friends]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n refs.size\nend}, {type: \"array\", name: refs, cls: BlockRefSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":469,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"refs:Array(BlockRefSnapshot)-instance-method","name":"refs","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"def":{"name":"refs","return_type":"Array(BlockRefSnapshot)","visibility":"Public","body":"@refs"}},{"html_id":"refs=(refs:Array(BlockRefSnapshot))-instance-method","name":"refs=","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"args_string":"(refs : Array(BlockRefSnapshot))","args_html":"(refs : Array(BlockRefSnapshot))","def":{"name":"refs=","args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"visibility":"Public","body":"@refs = refs"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Tape","path":"Novika/FrozenBlock/Tape.html","kind":"class","full_name":"Novika::FrozenBlock::Tape","name":"Tape","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":448,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Tape]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: cursor, cls: UInt32, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n substrate.size\nend}, {type: \"array\", name: substrate, cls: TypedSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"cursor:UInt32-instance-method","name":"cursor","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"def":{"name":"cursor","return_type":"UInt32","visibility":"Public","body":"@cursor"}},{"html_id":"cursor=(cursor:UInt32)-instance-method","name":"cursor=","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"args_string":"(cursor : UInt32)","args_html":"(cursor : UInt32)","def":{"name":"cursor=","args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"visibility":"Public","body":"@cursor = cursor"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":448,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"substrate:Array(TypedSnapshot)-instance-method","name":"substrate","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"def":{"name":"substrate","return_type":"Array(TypedSnapshot)","visibility":"Public","body":"@substrate"}},{"html_id":"substrate=(substrate:Array(TypedSnapshot))-instance-method","name":"substrate=","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"args_string":"(substrate : Array(TypedSnapshot))","args_html":"(substrate : Array(TypedSnapshot))","def":{"name":"substrate=","args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"visibility":"Public","body":"@substrate = substrate"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/FrozenEntry","path":"Novika/FrozenEntry.html","kind":"class","full_name":"Novika::FrozenEntry","name":"FrozenEntry","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":389,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenEntry]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 1, cls: Novika::FrozenEntry, onlyif: nil, verify: nil}, {type: \"basic\", name: key, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: value, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(key:Form,entry:Entry)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(key : Form, entry : Entry)","args_html":"(key : Form, entry : Entry)","location":{"filename":"src/novika/image.cr","line_number":411,"url":null},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"visibility":"Public","body":"frozen = new\nfrozen.key = TypedSnapshot.new(key)\nfrozen.value = TypedSnapshot.new(entry.form)\nfrozen.opens = entry.opener?\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":390,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"key:TypedSnapshot|Nil-instance-method","name":"key","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"def":{"name":"key","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@key"}},{"html_id":"key=(key:TypedSnapshot|Nil)-instance-method","name":"key=","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(key : TypedSnapshot | Nil)","args_html":"(key : TypedSnapshot | Nil)","def":{"name":"key=","args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@key = key"}},{"html_id":"melt(assembler,block)-instance-method","name":"melt","doc":"Defines the corresponding entry in *block*.","summary":"Defines the corresponding entry in block.
","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"args_string":"(assembler, block)","args_html":"(assembler, block)","location":{"filename":"src/novika/image.cr","line_number":405,"url":null},"def":{"name":"melt","args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"visibility":"Public","body":"k = key.not_nil!.to_form(assembler)\nv = value.not_nil!.to_form(assembler)\nblock.at(k, Entry.new(v, opens))\n"}},{"html_id":"opens:Bool-instance-method","name":"opens","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens","return_type":"Bool","visibility":"Public","body":"@opens == 1"}},{"html_id":"opens=(opens:UInt8)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"args_string":"(opens : UInt8)","args_html":"(opens : UInt8)","def":{"name":"opens=","args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"visibility":"Public","body":"@opens = opens"}},{"html_id":"opens=(value:Bool)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@opens = UInt8.new(value ? 1 : 0)"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"value:TypedSnapshot|Nil-instance-method","name":"value","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"def":{"name":"value","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@value"}},{"html_id":"value=(value:TypedSnapshot|Nil)-instance-method","name":"value=","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(value : TypedSnapshot | Nil)","args_html":"(value : TypedSnapshot | Nil)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Hole","path":"Novika/Hole.html","kind":"struct","full_name":"Novika::Hole","name":"Hole","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":39,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holes are similar to Crystal's `uninitialized` or `out`, in that\nthey allow you to allocate memory for a type, pass a pointer to\nthat memory to e.g. a C function, and let that C function write\ninto the memory. The written value can then be retrieved by\nopening the hole.","summary":"Holes are similar to Crystal's uninitialized
or out
, in that they allow you to allocate memory for a type, pass a pointer to that memory to e.g.
Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of this hole's content in memory.","summary":"Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":69,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"handle:Pointer(Void)-instance-method","name":"handle","doc":"Returns a pointer to this hole's content.","summary":"Returns a pointer to this hole's content.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":44,"url":null},"def":{"name":"handle","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":58,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"form = (@type.unbox(@handle)).to_form?\nform.try(&.onto(engine.stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":73,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << @type) << \" hole: 0x\"\naddress.to_s(io, base: 16)\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Hook","path":"Novika/Hook.html","kind":"module","full_name":"Novika::Hook","name":"Hook","abstract":false,"locations":[{"filename":"src/novika/hook.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Hook","kind":"module","full_name":"Novika::Hook","name":"Hook"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"as_boolean-instance-method","name":"as_boolean","doc":"Returns the block-to-boolean hook name.","summary":"Returns the block-to-boolean hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":70,"url":null},"def":{"name":"as_boolean","visibility":"Public","body":"Word.new(\"__boolean__\")"}},{"html_id":"as_byteslice-instance-method","name":"as_byteslice","doc":"Returns the block-to-byteslice hook name.","summary":"Returns the block-to-byteslice hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":80,"url":null},"def":{"name":"as_byteslice","visibility":"Public","body":"Word.new(\"__byteslice__\")"}},{"html_id":"as_color-instance-method","name":"as_color","doc":"Returns the block-to-color hook name.","summary":"Returns the block-to-color hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":55,"url":null},"def":{"name":"as_color","visibility":"Public","body":"Word.new(\"__color__\")"}},{"html_id":"as_decimal-instance-method","name":"as_decimal","doc":"Returns the block-to-decimal hook name.","summary":"Returns the block-to-decimal hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":65,"url":null},"def":{"name":"as_decimal","visibility":"Public","body":"Word.new(\"__decimal__\")"}},{"html_id":"as_quote-instance-method","name":"as_quote","doc":"Returns the block-to-quote hook name.","summary":"Returns the block-to-quote hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":60,"url":null},"def":{"name":"as_quote","visibility":"Public","body":"Word.new(\"__quote__\")"}},{"html_id":"as_quoted_word-instance-method","name":"as_quoted_word","doc":"Returns the block-to-quoted word hook name.","summary":"Returns the block-to-quoted word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":75,"url":null},"def":{"name":"as_quoted_word","visibility":"Public","body":"Word.new(\"__quotedWord__\")"}},{"html_id":"as_word-instance-method","name":"as_word","doc":"Returns the block-to-word hook name.","summary":"Returns the block-to-word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":50,"url":null},"def":{"name":"as_word","visibility":"Public","body":"Word.new(\"__word__\")"}},{"html_id":"died:Word-instance-method","name":"died","doc":"Returns the death hook name.\n\nDeath hooks are used to catch deaths (known as exceptions\nin other languages) in current block or in blocks below the\ncurrent block (nested blocks).\n\nBy defining a death hook, you are basically wrapping the\ncontents of your block in an uncontrained (catch-all)\n`try ... catch` or `begin ... rescue`.\n\n```novika\n[ getErrorDetails echo ] @: __died__\n\n1 0 / \"STDOUT: division by zero⏎\"\n```","summary":"Returns the death hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":19,"url":null},"def":{"name":"died","return_type":"Word","visibility":"Public","body":"Word.new(\"__died__\")"}},{"html_id":"on_cherry-instance-method","name":"on_cherry","doc":"Returns the on-cherry hook name.\n\nOn-cherry hooks trigger when the user tries to *cherry*\na form out of a block. This doesn't necessarily mean using\nthe word `cherry`, since e.g. the word `drop` and its\nimplicit counterpart *pop* is defined in terms of `cherry`.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and dropped/\npopped from, and how it behaves when it is `cherry`d.\n\nOn-shove hook is complemented by `on_shove` hook. See it\nto learn more.\n\nThe \"Hello, World\" of on-shove/on-cherry is defining a\n*controlled stack*.\n\n```novika\n[\n [ ] $: _controlledStack\n\n [ drop _controlledStack swap bi: ['Shove ' swap ~ echo] shove ] @: __shove__\n [ drop _controlledStack cherry dup 'Cherry ' swap ~ echo ] @: __cherry__\n\n [ _controlledStack echo ] @: print\n] obj $: master\n\nmaster [ 1 2 + ] there\nmaster.print\n\"STDOUT: Shove 1⏎\"\n\"STDOUT: Shove 2⏎\"\n\"STDOUT: Cherry 2⏎\"\n\"STDOUT: Cherry 1⏎\"\n\"STDOUT: Shove 3⏎\"\n\"STDOUT: [ 3 ]⏎\"\n```","summary":"Returns the on-cherry hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":142,"url":null},"def":{"name":"on_cherry","visibility":"Public","body":"Word.new(\"__cherry__\")"}},{"html_id":"on_shove-instance-method","name":"on_shove","doc":"Returns the on-shove hook name.\n\nOn-shove hooks trigger when the user tries to `shove` a\nform into the block the hook is attached to. Note that\nthis doesn't necessarily mean literally using `shove`.\n\nFor instance, simply typing `1 2 3` will shove 1, 2, 3\nconsequtively onto the stack. The latter is known as\n*pushing*, since *shoving* is defined for a block-and-a-\nform pair, while *pushing* is defined for a stack-and-a-\nform-pair, where the stack is implicit.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and pushed\nto, and how it behaves when it is shoved into.\n\nOn-shove hook is complemented by `on_cherry`. See it to\nlearn more.","summary":"Returns the on-shove hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":102,"url":null},"def":{"name":"on_shove","visibility":"Public","body":"Word.new(\"__shove__\")"}},{"html_id":"trap-instance-method","name":"trap","doc":"Returns the word trap hook name.\n\nWord traps catch undefined words. Note that during word\nresolution, word traps run *last*. That is, all parents\nand friends of the block you're trying to resolve a word\nin are searched, and only then traps are triggered in the\nappropriate order.\n\nTraps can be nested: if one trap fails to resolve a word,\nthen an outer trap is triggered.\n\nThe words *outer*, *inner*, *nested* etc. refer to the block\nparent hierarchy. Initially, this means the hierarchy is\nAST-like, but for reparented blocks (or blocks whose parent\nhierarchy is changed otherwise), different traps will be\ntriggered in case of an undefined word.\n\n```novika\n[ 'The following word is undefined: ' swap ~ echo ] @: __trap__\n\n1 2 + frobnicate \"STDOUT: The following word is undefined: frobnicate⏎\"\n```","summary":"Returns the word trap hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":45,"url":null},"def":{"name":"trap","visibility":"Public","body":"Word.new(\"__trap__\")"}}]},{"html_id":"novika/Novika/ICapability","path":"Novika/ICapability.html","kind":"module","full_name":"Novika::ICapability","name":"ICapability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Instance-side (`include`) interface to a Novika capability.\nAll capability instances must be compatible with this module.","summary":"Instance-side (include
) interface to a Novika capability.
Returns the collection this capability is a part of.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":19,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":true,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capability.cr","line_number":25,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ICapabilityClass","path":"Novika/ICapabilityClass.html","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Class-side (`extend`) interface to a Novika capability. All\ncapability classes must be compatible with this module.","summary":"Class-side (extend
) interface to a Novika capability.
Returns the frontend identifier of this capability class.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":6,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"on_by_default?:Bool-instance-method","name":"on_by_default?","doc":"Returns whether this capability class should be enabled automatically.","summary":"Returns whether this capability class should be enabled automatically.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":12,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"purpose:String-instance-method","name":"purpose","doc":"Returns a short description on what this capability class provides.","summary":"Returns a short description on what this capability class provides.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/IDict","path":"Novika/IDict.html","kind":"module","full_name":"Novika::IDict","name":"IDict","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Dict","kind":"class","full_name":"Novika::Dict","name":"Dict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Novika dictionary protocol. Objects or values that want\nto be Block dictionaries can implement this protocol to\nmake that possible.","summary":"Novika dictionary protocol.
","instance_methods":[{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":19,"url":null},"def":{"name":"clear","visibility":"Public","body":""}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":35,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":32,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":16,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"each(&:Form,Form->)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":38,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"block_arg":{"name":"","external_name":"","restriction":"(Form, Form ->)"},"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this dictionary currently stores no entries.","summary":"Returns whether this dictionary currently stores no entries.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":45,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"count.zero?"}},{"html_id":"get(name:Form,&:Form->Entry|Nil):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","args_html":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":12,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Form -> Entry | ::Nil)"},"return_type":"Entry | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":23,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":true,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":29,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":""}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":7,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":""}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":4,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"on_form_end(engine:Engine,form:Form)-instance-method","name":"on_form_end","doc":"Invoked after *engine* opened the given *form*.","summary":"Invoked after engine opened the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":8,"url":null},"def":{"name":"on_form_end","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Image","path":"Novika/Image.html","kind":"class","full_name":"Novika::Image","name":"Image","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":893,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
Returns the Image
formed with this block as the pivot block.
Holds compression method used to compress the payload.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression","return_type":"CompressionType","visibility":"Public","body":"CompressionType.new(@compression.to_i)"}},{"html_id":"compression=(compression:UInt8)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"args_string":"(compression : UInt8)","args_html":"(compression : UInt8)","def":{"name":"compression=","args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"visibility":"Public","body":"@compression = compression"}},{"html_id":"compression=(value:CompressionType)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"args_string":"(value : CompressionType)","args_html":"(value : CompressionType)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression=","args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"visibility":"Public","body":"@compression = (@compression.class.new(0)) | value.to_i"}},{"html_id":"payload:Bytes-instance-method","name":"payload","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"def":{"name":"payload","return_type":"Bytes","visibility":"Public","body":"@payload"}},{"html_id":"payload=(payload:Bytes)-instance-method","name":"payload=","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"args_string":"(payload : Bytes)","args_html":"(payload : Bytes)","def":{"name":"payload=","args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"visibility":"Public","body":"@payload = payload"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"signature:String-instance-method","name":"signature","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"def":{"name":"signature","return_type":"String","visibility":"Public","body":"@signature"}},{"html_id":"signature=(signature:String)-instance-method","name":"signature=","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"args":[{"name":"signature","external_name":"signature","restriction":"String"}],"args_string":"(signature : String)","args_html":"(signature : String)","def":{"name":"signature=","args":[{"name":"signature","external_name":"signature","restriction":"String"}],"visibility":"Public","body":"@signature = signature"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs the pivot block and its hierarchy from this\nimage. Returns the resulting block.\n\nCapability collection *caps* is required to make sure all\nrequired capabilities are enabled/available.","summary":"Reconstructs the pivot block and its hierarchy from this image.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":936,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"buffer = IO::Memory.new(payload)\nreader = case compression\nin .none?\n buffer\nin .gzip_fast?, .gzip_best?\n Compress::Gzip::Reader.new(buffer)\nin .brotli_fast?, .brotli_best?\n Compress::Brotli::Reader.new(buffer)\nend\npayload = reader.read_bytes(ImagePayload)\nreader.close\npayload.to_block(caps)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
No compression.
"},{"id":"GzipFast","name":"GzipFast","value":"1","doc":"Use(s) fast but not best Gzip compression.","summary":"Use(s) fast but not best Gzip compression.
"},{"id":"GzipBest","name":"GzipBest","value":"2","doc":"Use(s) best but not fast Gzip compression.","summary":"Use(s) best but not fast Gzip compression.
"},{"id":"BrotliFast","name":"BrotliFast","value":"3","doc":"Use(s) fast but not best Brotli compression.\nGenerally slower than `GzipFast`, but almost\ncertainly will yield better results.","summary":"Use(s) fast but not best Brotli compression.
"},{"id":"BrotliBest","name":"BrotliBest","value":"4","doc":"Use(s) best but not fast Brotli compression.\nGenerally slower than `GzipBest`, but almost\ncertainly will yield better results.","summary":"Use(s) best but not fast Brotli compression.
"}],"namespace":{"html_id":"novika/Novika/Image","kind":"class","full_name":"Novika::Image","name":"Image"},"doc":"Lists all available payload compression types.","summary":"Lists all available payload compression types.
","instance_methods":[{"html_id":"brotli_best?-instance-method","name":"brotli_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":915,"url":null},"def":{"name":"brotli_best?","visibility":"Public","body":"self == BrotliBest"}},{"html_id":"brotli_fast?-instance-method","name":"brotli_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":910,"url":null},"def":{"name":"brotli_fast?","visibility":"Public","body":"self == BrotliFast"}},{"html_id":"gzip_best?-instance-method","name":"gzip_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":905,"url":null},"def":{"name":"gzip_best?","visibility":"Public","body":"self == GzipBest"}},{"html_id":"gzip_fast?-instance-method","name":"gzip_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":902,"url":null},"def":{"name":"gzip_fast?","visibility":"Public","body":"self == GzipFast"}},{"html_id":"none?-instance-method","name":"none?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":899,"url":null},"def":{"name":"none?","visibility":"Public","body":"self == None"}}]}]},{"html_id":"novika/Novika/ImagePayload","path":"Novika/ImagePayload.html","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":800,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Monthly increment of the current Novika version.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"group\", name: ver, cls: Ver, onlyif: nil, verify: -> do\n (ver.rev == 10) && ({ver.subrev, ver.yearly, ver.monthly} == {SUBREV, YEARLY, MONTHLY})\nend, value: nil}, {type: \"group\", name: capabilities, cls: Capabilities, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: pool, cls: BlockPool | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Subrevision (release) of the current Novika version.
"},{"id":"VERSION_MATCH","name":"VERSION_MATCH","value":"((/(\\d+)\\.(\\d+)\\.(\\d+)/).match(Novika::VERSION)).not_nil!"},{"id":"YEARLY","name":"YEARLY","value":"VERSION_MATCH[2].to_u8","doc":"Yearly increment of the current Novika version.","summary":"Yearly increment of the current Novika version.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"capabilities","visibility":"Public","body":"@capabilities"}},{"html_id":"capabilities=(capabilities:Novika::ImagePayload::Capabilities)-instance-method","name":"capabilities=","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"args_string":"(capabilities : Novika::ImagePayload::Capabilities)","args_html":"(capabilities : Novika::ImagePayload::Capabilities)","def":{"name":"capabilities=","args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"visibility":"Public","body":"@capabilities = capabilities"}},{"html_id":"pool:BlockPool|Nil-instance-method","name":"pool","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"def":{"name":"pool","return_type":"BlockPool | ::Nil","visibility":"Public","body":"@pool"}},{"html_id":"pool=(pool:BlockPool|Nil)-instance-method","name":"pool=","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"args_string":"(pool : BlockPool | Nil)","args_html":"(pool : BlockPool | Nil)","def":{"name":"pool=","args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"visibility":"Public","body":"@pool = pool"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Converts this image payload to a block, aided by *caps*.\n\nSee `Image#to_block`.","summary":"Converts this image payload to a block, aided by caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":865,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"capabilities.required.each do |fid|\n if caps.has_capability?(fid.id)\n else\n raise(Novika::Error.new(\"image requires capability '#{fid.id}', but it isn't available\"))\n end\n caps.enable(fid.id)\nend\npool.not_nil!.to_block(caps)\n"}},{"html_id":"ver:Novika::ImagePayload::Ver-instance-method","name":"ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"ver","visibility":"Public","body":"@ver"}},{"html_id":"ver=(ver:Novika::ImagePayload::Ver)-instance-method","name":"ver=","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"args_string":"(ver : Novika::ImagePayload::Ver)","args_html":"(ver : Novika::ImagePayload::Ver)","def":{"name":"ver=","args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"visibility":"Public","body":"@ver = ver"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Capabilities]","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n required.size\nend}, {type: \"array\", name: required, cls: CapabilityId, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":852,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"required:Array(CapabilityId)-instance-method","name":"required","doc":"Holds IDs of required capabilities (namely `ICapabilityClass.id`).","summary":"Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capabilities(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capabilities","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capabilities","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Capabilities = Novika::ImagePayload::Capabilities.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ImagePayload/Ver","path":"Novika/ImagePayload/Ver.html","kind":"class","full_name":"Novika::ImagePayload::Ver","name":"Ver","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Ver]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: rev, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: subrev, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n SUBREV\nend}, {type: \"basic\", name: yearly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n YEARLY\nend}, {type: \"basic\", name: monthly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n MONTHLY\nend}] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"monthly:UInt8-instance-method","name":"monthly","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"def":{"name":"monthly","return_type":"UInt8","visibility":"Public","body":"@monthly"}},{"html_id":"monthly=(monthly:UInt8)-instance-method","name":"monthly=","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"args_string":"(monthly : UInt8)","args_html":"(monthly : UInt8)","def":{"name":"monthly=","args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"visibility":"Public","body":"@monthly = monthly"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":827,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"rev:UInt8-instance-method","name":"rev","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"def":{"name":"rev","return_type":"UInt8","visibility":"Public","body":"@rev"}},{"html_id":"rev=(rev:UInt8)-instance-method","name":"rev=","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"args_string":"(rev : UInt8)","args_html":"(rev : UInt8)","def":{"name":"rev=","args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"visibility":"Public","body":"@rev = rev"}},{"html_id":"subrev:UInt8-instance-method","name":"subrev","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"def":{"name":"subrev","return_type":"UInt8","visibility":"Public","body":"@subrev"}},{"html_id":"subrev=(subrev:UInt8)-instance-method","name":"subrev=","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"args_string":"(subrev : UInt8)","args_html":"(subrev : UInt8)","def":{"name":"subrev=","args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"visibility":"Public","body":"@subrev = subrev"}},{"html_id":"yearly:UInt8-instance-method","name":"yearly","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"def":{"name":"yearly","return_type":"UInt8","visibility":"Public","body":"@yearly"}},{"html_id":"yearly=(yearly:UInt8)-instance-method","name":"yearly=","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"args_string":"(yearly : UInt8)","args_html":"(yearly : UInt8)","def":{"name":"yearly=","args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"visibility":"Public","body":"@yearly = yearly"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/IReadableStore","path":"Novika/IReadableStore.html","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":208,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors act like a form-to-form mapping where entry\nkind (opens/pushes) is ignored (basically, a read-only,\nrestricted subset of block methods for dictionary access).\n\nImplementors can be targets of `entry:fetch`, `entry:fetch?`,\n`entry:exists?`, `entry:opener?`.","summary":"Implementors act like a form-to-form mapping where entry kind (opens/pushes) is ignored (basically, a read-only, restricted subset of block methods for dictionary access).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":209,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"readable store\""}}],"instance_methods":[{"html_id":"form_for(name:Form):Form-instance-method","name":"form_for","doc":"Returns the value form for an entry with the given *name*, or\ndies if no such entry exists.","summary":"Returns the value form for an entry with the given name, or dies if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form","args_html":"(name : Form) : Form","location":{"filename":"src/novika/dict.cr","line_number":230,"url":null},"def":{"name":"form_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form","visibility":"Public","body":"(form_for?(name)) || (name.die(\"no value form for '#{name}'\"))"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/dict.cr","line_number":218,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":214,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":222,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":226,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ISubmittableStore","path":"Novika/ISubmittableStore.html","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors can be targets of `entry:submit`.","summary":"Implementors can be targets of entry:submit
.
Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":247,"url":null},"def":{"name":"submit","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(submit?(name, form)) || (name.die(\"no entry to submit to\"))"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":243,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/LargeDecimalSnapshot","path":"Novika/LargeDecimalSnapshot.html","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":151,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::LargeDecimalSnapshot]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: repr, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":161,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.repr = form.to_s\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":152,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"repr:String-instance-method","name":"repr","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"def":{"name":"repr","return_type":"String","visibility":"Public","body":"@repr"}},{"html_id":"repr=(repr:String)-instance-method","name":"repr=","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"args":[{"name":"repr","external_name":"repr","restriction":"String"}],"args_string":"(repr : String)","args_html":"(repr : String)","def":{"name":"repr=","args":[{"name":"repr","external_name":"repr","restriction":"String"}],"visibility":"Public","body":"@repr = repr"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":157,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(repr)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Library","path":"Novika/Library.html","kind":"class","full_name":"Novika::Library","name":"Library","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":310,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A library is a collection of foreign functions.\n\nA library form can be opened with a block of *function declarations*\nto be exposed. Each function declaration consists of the function's\nname and type signature. Exposed functions are then defined in the\nopener block.\n\nFor more details, see Novika's `ffi:getLibrary`.\n\nInternally, library objects are created by the frontend and fed\nto the capability collection `caps`. When needed, they are\nretrieved from this capability collection.","summary":"A library is a collection of foreign functions.
","class_methods":[{"html_id":"new?(id:String,cwd:Path,env:Resolver::RunnableEnvironment):Library|Nil-class-method","name":"new?","doc":"Tries to find the library with the given *id* in the system-\nspecific library directories, current working directory *cwd*,\nand in the runnable environment *env*.\n\nReturns nil if the library could not be found or loaded.","summary":"Tries to find the library with the given id in the system- specific library directories, current working directory cwd, and in the runnable environment env.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"args_string":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","args_html":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":329,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"return_type":"Library | ::Nil","visibility":"Public","body":"candidates = [] of String\n{% if flag?(:windows) %}\n candidates << \"#{id}.dll\"\n candidates << \"lib#{id}.dll\"\n {% else %}{% if flag?(:darwin) %}\n candidates << \"#{id}.dylib\"\n candidates << \"lib#{id}.dylib\"\n {% else %}{% if flag?(:unix) %}\n candidates << \"#{id}.so\"\n candidates << \"lib#{id}.so\"\n {% else %}\n return\n {% end %}{% end %}{% end %}\nCrystal::Loader.default_search_paths.each do |search_path|\n candidates.each do |candidate|\n if library = Library.new?(id, Path[search_path] / candidate)\n else\n next\n end\n return library\n end\nend\ncandidates.each do |candidate|\n if path = (env.expand?(Path[candidate])) || (cwd.expand(Path[candidate]))\n else\n next\n end\n if library = Library.new?(id, path)\n else\n next\n end\n return library\nend\n"}},{"html_id":"new?(id:String,path:Path):Library|Nil-class-method","name":"new?","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (it may be chosen arbitrarily).\n\nReturns nil if the library could not be loaded.","summary":"Initializes a library for the dynamic library at path, with the given identifier (it may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library | Nil","args_html":"(id : String, path : Path) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":369,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library | ::Nil","visibility":"Public","body":"if handle = LibDl.dlopen(path.to_s, LibDl::RTLD_NOW)\nelse\n return\nend\nnew(id, path, handle)\n"}},{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":532,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"foreign library\""}}],"constructors":[{"html_id":"new(id:String,path:Path):Library-class-method","name":"new","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (may be chosen arbitrarily).\n\nMay die if LibDL fails to load the library.","summary":"Initializes a library for the dynamic library at path, with the given identifier (may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library","args_html":"(id : String, path : Path) : Library","location":{"filename":"src/novika/forms/foreign.cr","line_number":379,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library","visibility":"Public","body":"(new?(id, path)) || (raise(Error.new(String.new(LibDl.dlerror))))"}}],"instance_methods":[{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":536,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"finalize-instance-method","name":"finalize","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":320,"url":null},"def":{"name":"finalize","visibility":"Public","body":"LibDl.dlclose(@handle)"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this library.","summary":"Returns the identifier of this library.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":315,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":521,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"this = engine.block\nfdecls = engine.stack.drop.a(Block)\nfdecls.each do |fdecl|\n parse_fdecl(this, fdecl.a(Block))\nend\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":540,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign library: \") << id) << \"]\""}}]},{"html_id":"novika/Novika/ObjectPool","path":"Novika/ObjectPool.html","kind":"struct","full_name":"Novika::ObjectPool(T)","name":"ObjectPool","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/object_pool.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A naïve object pool, inspired by:\n\nhttps://gist.github.com/floere/3121579","summary":"A naïve object pool, inspired by:
","constructors":[{"html_id":"new(create:->T,clear:T->T)-class-method","name":"new","abstract":false,"args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"args_string":"(create : -> T, clear : T -> T)","args_html":"(create : -> T, clear : T -> T)","location":{"filename":"src/novika/object_pool.cr","line_number":8,"url":null},"def":{"name":"new","args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"visibility":"Public","body":"_ = ObjectPool(T).allocate\n_.initialize(create, clear)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"acquire:T-instance-method","name":"acquire","doc":"Returns a free/new instance of the object.","summary":"Returns a free/new instance of the object.
","abstract":false,"location":{"filename":"src/novika/object_pool.cr","line_number":18,"url":null},"def":{"name":"acquire","return_type":"T","visibility":"Public","body":"if kv = @free.shift?\nelse\n obj = @create.call\n kv = {id(obj), obj}\nend\n@used[] = *kv\n"}},{"html_id":"release(obj:T)-instance-method","name":"release","doc":"Clears the given *instance* of the object, and releases\nit so that it can be acquired by someone else.","summary":"Clears the given instance of the object, and releases it so that it can be acquired by someone else.
","abstract":false,"args":[{"name":"obj","external_name":"obj","restriction":"T"}],"args_string":"(obj : T)","args_html":"(obj : T)","location":{"filename":"src/novika/object_pool.cr","line_number":28,"url":null},"def":{"name":"release","args":[{"name":"obj","external_name":"obj","restriction":"T"}],"visibility":"Public","body":"@clear.call(obj)\nid = id(obj)\n@free[id] = obj\n@used.delete(id)\n"}}]},{"html_id":"novika/Novika/Quote","path":"Novika/Quote.html","kind":"module","full_name":"Novika::Quote","name":"Quote","abstract":false,"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":18,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EFFECT_BOUND_TAKE","name":"EFFECT_BOUND_TAKE","value":"12","doc":"Specifies how many characters to take from the left and right\nboundaries of the quote for a shorter representation in `effect`.","summary":"Specifies how many characters to take from the left and right boundaries of the quote for a shorter representation in #effect
.
Specifies the maximum amount of characters to display before the quote gets cut off in #effect
(see Form#effect
).
The empty quote.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"including_types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote"},{"html_id":"novika/Novika/Quote/StringQuote","kind":"struct","full_name":"Novika::Quote::StringQuote","name":"StringQuote"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are Novika quotes, which are known as strings\nin most other programming languages.\n\nQuotes are optimized for the ASCII-only case. Also, they\ntreat single `String::Grapheme`s separately from strings\nof those, and cache grapheme counts here and there.\n\nThe slowest operations on quotes are `slice_at` and `at`\nover *non- ASCII* quotes. Both are currently O(N) in terms\nof iterations only; they do a lot of other work besides\niteration as well.\n\nWhen you are slow, being even slower doesn't matter that much\nanymore. This is the case with Novika.\n\nAnd yes, quotes do rely on the experimental grapheme API.","summary":"Includers are Novika quotes, which are known as strings in most other programming languages.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":50,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,count=string.grapheme_size,ascii=string.ascii_only?)-class-method","name":"new","doc":"Creates a quote from *string*.\n\n*count* can be provided if the amount of graphemes in\n*string* is known.","summary":"Creates a quote from string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"args_string":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","args_html":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":28,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"visibility":"Public","body":"if count == 1\n string.each_grapheme do |it|\n return GraphemeQuote.new(it)\n end\nend\nStringQuote.new(string, count, ascii)\n"}},{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","doc":"Creates a quote from *grapheme*.","summary":"Creates a quote from grapheme.
","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":37,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"GraphemeQuote.new(grapheme)"}},{"html_id":"new(char:Char)-class-method","name":"new","doc":"Creates a quote from *char*.","summary":"Creates a quote from char.
","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","args_html":"(char : Char)","location":{"filename":"src/novika/forms/quote.cr","line_number":42,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"Char"}],"visibility":"Public","body":"new(String::Grapheme.new(char))"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":69,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":true,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":65,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"at(index:Int32):GraphemeQuote-instance-method","name":"at","doc":"Returns the grapheme at *index* as `Quote`, or dies.","summary":"Returns the grapheme at index as Quote
, or dies.
Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":76,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":72,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/quote.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quote '\") << string) << \"'\""}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* in this quote.","summary":"Yields occurrences of the given pattern in this quote.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":177,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":188,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"nchars = count\nif nchars <= EFFECT_MAX_CHARS\n return super(io)\nend\nl = at(0, EFFECT_BOUND_TAKE)\nr = at((nchars - EFFECT_BOUND_TAKE) - 1, nchars - 1)\nio << \"'\"\nl.string.dump_unquoted(io)\nio << \"…\"\nr.string.dump_unquoted(io)\nio << \"'\"\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":79,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"first_byte?:UInt8|Nil-instance-method","name":"first_byte?","doc":"Returns the first byte (or nil) in this quote.","summary":"Returns the first byte (or nil) in this quote.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":112,"url":null},"def":{"name":"first_byte?","return_type":"UInt8 | ::Nil","visibility":"Public","body":"string.byte_at?(0)"}},{"html_id":"fit(total:Int,ellipsis:_):Quote-instance-method","name":"fit","doc":"Ensures this quote is of *total* characters or less. In case of\noverflow, truncates with *ellipsis*. If even *ellipsis* cannot\nfit, truncates ellipsis so that it is of *total* characters.\nReturns the resulting quote.","summary":"Ensures this quote is of total characters or less.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"args_string":"(total : Int, ellipsis : _) : Quote","args_html":"(total : Int, ellipsis : _) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":94,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"ord?:Int32|Nil-instance-method","name":"ord?","doc":"Returns the Unicode codepoint for the first character in\nthis quote, or nil if this quote is empty.","summary":"Returns the Unicode codepoint for the first character in this quote, or nil if this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":118,"url":null},"def":{"name":"ord?","return_type":"Int32 | ::Nil","visibility":"Public","body":"if empty?\nelse\n string[0].ord\nend"}},{"html_id":"pad(total:Int,padder:_,side:PadSide):Quote-instance-method","name":"pad","doc":"Pads this quote with *padder* until it becomes *total* perceived\ncharacters long. The side where the padding should apply is specified\nby *side*. Returns the resulting quote.","summary":"Pads this quote with padder until it becomes total perceived characters long.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : _, side : PadSide) : Quote","args_html":"(total : Int, padder : _, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":88,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":true,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":83,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"slice_at(slicept:Int32):Tuple(Quote,Quote)-instance-method","name":"slice_at","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Dies if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote)","args_html":"(slicept : Int32) : Tuple(Quote, Quote)","location":{"filename":"src/novika/forms/quote.cr","line_number":145,"url":null},"def":{"name":"slice_at","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote)","visibility":"Public","body":"(slice_at?(slicept)) || (die(\"slicepoint is out of bounds: #{slicept}\"))"}},{"html_id":"slice_at?(slicept:Int32):Tuple(Quote,Quote)|Nil-instance-method","name":"slice_at?","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Returns nil if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","args_html":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","location":{"filename":"src/novika/forms/quote.cr","line_number":152,"url":null},"def":{"name":"slice_at?","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote) | ::Nil","visibility":"Public","body":"size = count\nif size.zero?\n return\nend\nif slicept.in?(0..size)\nelse\n return\nend\nif slicept.zero?\n {EMPTY, self}\nelse\n if slicept == size\n {self, EMPTY}\n else\n slice_at!(slicept, size)\n end\nend\n"}},{"html_id":"stitch(other:Quote):Quote-instance-method","name":"stitch","doc":"Stitches (concatenates) this and *other* quote variants,\nand returns the resulting quote.","summary":"Stitches (concatenates) this and other quote variants, and returns the resulting quote.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Quote","args_html":"(other : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":124,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if empty?\n return other\nend\nif other.empty?\n return self\nend\na = cached_count?\nb = other.cached_count?\nif a && b\n StringQuote.new(string + other.string, count: a + b)\nelse\n StringQuote.new(res = string + other.string, count: res.grapheme_size)\nend\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Returns an immutable Byteslice
representation of this quote.
Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":172,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"self"}}],"types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","path":"Novika/Quote/GraphemeQuote.html","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":496,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Quote type for a single grapheme (perceived character).","summary":"Quote type for a single grapheme (perceived character).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":505,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":502,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"_ = allocate\n_.initialize(grapheme)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":552,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(GraphemeQuote) && (other.grapheme == grapheme)"}},{"html_id":"as_byte?-instance-method","name":"as_byte?","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":509,"url":null},"def":{"name":"as_byte?","visibility":"Public","body":"if char = (grapheme.@cluster).as?(Char)\nelse\n return\nend\nif char.ascii?\nelse\n return\nend\nchar.ord\n"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":527,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b == e ? self : EMPTY"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":541,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"1"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.\n\nGrapheme quotes always return 1.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":534,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"1"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":606,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"if grapheme == pattern.grapheme\n yield 0\nend"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":612,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.\n\nGrapheme quotes always return false.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":548,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":600,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nself\n"}},{"html_id":"grapheme:String::Grapheme-instance-method","name":"grapheme","doc":"Returns the grapheme.","summary":"Returns the grapheme.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":500,"url":null},"def":{"name":"grapheme","return_type":"String::Grapheme","visibility":"Public","body":"@grapheme"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":556,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total <= 1\n return self\nend\nif total == 2\n padding = padder\nelse\n string = String.build do |io|\n last = padder.grapheme\n (total - 1).times do\n io << last\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":575,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total <= 1\n return self\nend\nif total == 2\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - 1\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":624,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"self == pattern ? repl : self"}},{"html_id":"stitch(other:StringQuote):Quote-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote) : Quote","args_html":"(other : StringQuote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":519,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"return_type":"Quote","visibility":"Public","body":"other.empty? ? self : super(other)"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Apply padding to the left of the quote.
"},{"id":"Right","name":"Right","value":"1","doc":"Apply padding to the right of the quote.","summary":"Apply padding to the right of the quote.
"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Represents the side where padding should apply.\n\nSee `Quote#pad`.","summary":"Represents the side where padding should apply.
","instance_methods":[{"html_id":"apply(quote:Quote,padding:Quote)-instance-method","name":"apply","doc":"Applies padding to the side specified by `self`.","summary":"Applies padding to the side specified by self
.
Quote type for multiple (two or more), or no graphemes.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":241,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,countcached_count:Int32|Nil=nil,ascii_only:Bool=string.ascii_only?)-class-method","name":"new","doc":"Creates a string quote from the given *string*.","summary":"Creates a string quote from the given string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"args_string":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","args_html":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":237,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string, cached_count, ascii_only)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":350,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(StringQuote) && (string == other.string)"}},{"html_id":"ascii_only?:Bool-instance-method","name":"ascii_only?","doc":"Returns whether this string quote consists of ASCII\ncharacters only.","summary":"Returns whether this string quote consists of ASCII characters only.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":234,"url":null},"def":{"name":"ascii_only?","return_type":"Bool","visibility":"Public","body":"@ascii_only"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":298,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nif (b == 0) && (e == (count - 1))\n return self\nend\nif b == e\n return (at?(b)).not_nil!\nend\nif ascii_only?\n StringQuote.new((b..e).join do |index|\n byte = (string.byte_at?(index)).not_nil!\n byte < 128 ? byte.unsafe_chr : Char::REPLACEMENT\n end, count: e - b, ascii_only: true)\nelse\n StringQuote.new(String.build do |io|\n index = 0\n string.each_grapheme do |grapheme|\n if index < b\n index = index + 1\n next\n end\n if index > e\n break\n end\n io << grapheme\n index = index + 1\n end\n end, count: e - b, ascii_only: false)\nend\n"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached perceived character count in this string quote, or nil.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":230,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"@cached_count"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":342,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"cached_count? || string.grapheme_size"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":431,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"kmp(string, pattern.string, ascii: ascii_only? && pattern.ascii_only?) do |index|\n yield index\nend"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":409,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\nif ascii_only? && (pattern_byte = pattern.as_byte?)\n string.each_byte do |byte|\n if byte == pattern_byte\n yield index\n end\n index = index + 1\n end\nelse\n string.each_grapheme do |grapheme|\n if grapheme == pattern.grapheme\n yield index\n end\n index = index + 1\n end\nend\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":346,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"string.empty?"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":397,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nif count <= total\n return self\nend\nnvisible = total - ellipsis.count\nif nvisible <= 0\n return ellipsis.at(0, total - 1)\nend\n(at(0, nvisible - 1)).stitch(ellipsis)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":372,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - count\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":354,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder\nelse\n string = String.build(total) do |io|\n (total - count).times do\n io << padder.grapheme\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":486,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(string.gsub(pattern.string, repl.string))"}},{"html_id":"stitch(other:StringQuote)-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote)","args_html":"(other : StringQuote)","location":{"filename":"src/novika/forms/quote.cr","line_number":333,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"visibility":"Public","body":"if ascii_only? && other.ascii_only?\nelse\n return super(other)\nend\nStringQuote.new(res = string + other.string, count: res.bytesize, ascii_only: true)\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Returns the underlying string.","summary":"Returns the underlying string.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":226,"url":null},"def":{"name":"string","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":490,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"'\"\nstring.dump_unquoted(io)\nio << \"'\"\n"}}]}]},{"html_id":"novika/Novika/QuotedWord","path":"Novika/QuotedWord.html","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":79,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Quoted words are words prefixed by '#': e.g., `#foo`. It\nlets you 'coat' a word: `#foo open` is the same as `foo`,\n`##foo open` is the same as `#foo`, etc. Levels of coating\nare peeled off like in an onion.","summary":"Quoted words are words prefixed by '#': e.g., #foo
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":89,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quoted word '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":84,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine):self-instance-method","name":"on_parent_open","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : self","args_html":"(engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":118,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"self","visibility":"Public","body":"tap do\n peel.onto(engine.stack)\nend"}},{"html_id":"peel-instance-method","name":"peel","doc":"\"Peels\" off a layer of quoting.\n\n```\nQuotedWord.new(\"#foo\").peel # Word.new(\"foo\")\nQuotedWord.new(\"##foo\").peel # QuotedWord.new(\"#foo\")\nQuotedWord.new(\"###foo\").peel # QuotedWord.new(\"##foo\")\n```","summary":""Peels" off a layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":109,"url":null},"def":{"name":"peel","visibility":"Public","body":"id.prefixed_by?('#') ? QuotedWord.new(id.lchop) : Word.new(id)"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds another layer of quoting. Opposite of `peel`.","summary":"Adds another layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":98,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(\"##{@id}\")"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":122,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << '#') << id"}},{"html_id":"to_word:Word-instance-method","name":"to_word","doc":"Converts this quoted word to `Word`.","summary":"Converts this quoted word to Word
.
Snapshot of a quoted word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuotedWordSnapshot]","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:QuotedWord)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"args_string":"(form : QuotedWord)","args_html":"(form : QuotedWord)","location":{"filename":"src/novika/image.cr","line_number":226,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"visibility":"Public","body":"qword = new\nqword.id = form.id\nqword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":217,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":222,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"QuotedWord.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/QuoteSnapshot","path":"Novika/QuoteSnapshot.html","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":173,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuoteSnapshot]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: bytesize, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.bytesize\nend}, {type: \"string\", name: content, cls: String, onlyif: nil, verify: nil, length: -> do\n bytesize\nend, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Quote)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/image.cr","line_number":186,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"quote = new\nquote.content = form.string\nquote\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":174,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"bytesize:UInt64-instance-method","name":"bytesize","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"def":{"name":"bytesize","return_type":"UInt64","visibility":"Public","body":"@bytesize"}},{"html_id":"bytesize=(bytesize:UInt64)-instance-method","name":"bytesize=","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"args_string":"(bytesize : UInt64)","args_html":"(bytesize : UInt64)","def":{"name":"bytesize=","args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"visibility":"Public","body":"@bytesize = bytesize"}},{"html_id":"content:String-instance-method","name":"content","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"def":{"name":"content","return_type":"String","visibility":"Public","body":"@content"}},{"html_id":"content=(content:String)-instance-method","name":"content=","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String)","args_html":"(content : String)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"String"}],"visibility":"Public","body":"@content = content"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":182,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Quote.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Resolver","path":"Novika/Resolver.html","kind":"module","full_name":"Novika::Resolver","name":"Resolver","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENV_GLOBAL_DIRNAME","name":"ENV_GLOBAL_DIRNAME","value":"\".novika\"","doc":"Specifies the name of the global environment directory.","summary":"Specifies the name of the global environment directory.
"},{"id":"ENV_LOCAL_DIRNAME","name":"ENV_LOCAL_DIRNAME","value":"\"env\"","doc":"Specifies the name of the local environment directory.","summary":"Specifies the name of the local environment directory.
"},{"id":"ENV_LOCAL_PROOF_FILENAME","name":"ENV_LOCAL_PROOF_FILENAME","value":"\".nk.env\"","doc":"Specifies the name of the file that is going to be used as the\nproof that the directory at hand is not simply called 'env',\nbut is actually intended as a Novika environment directory.","summary":"Specifies the name of the file that is going to be used as the proof that the directory at hand is not simply called 'env', but is actually intended as a Novika environment directory.
"},{"id":"PERMISSIONS_FILENAME","name":"PERMISSIONS_FILENAME","value":"\"permissions\"","doc":"Specifies the name of the file that will contain saved permissions.","summary":"Specifies the name of the file that will contain saved permissions.
"},{"id":"PREAMBLES_ENTRY_NAME","name":"PREAMBLES_ENTRY_NAME","value":"Word.new(\"__preambles__\")","doc":"Specifies the name of the entry that holds the preambles.","summary":"Specifies the name of the entry that holds the preambles.
"},{"id":"RESOLVER_RECURSION_LIMIT","name":"RESOLVER_RECURSION_LIMIT","value":"64","doc":"Recursion limit for the resolver. Doesn't have to be big, it's\nbasically file system depth which isn't too big most of the time.","summary":"Recursion limit for the resolver.
"}],"including_types":[{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Resolver/ChildSlot","path":"Novika/Resolver/ChildSlot.html","kind":"class","full_name":"Novika::Resolver::ChildSlot","name":"ChildSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1423,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"runnables of whomever\ninherits me\".","summary":"Slot (placeholder) that stands for "runnables of whomever inherits me".
","instance_methods":[{"html_id":"replace(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present,population:RunnableContainer,container:RunnableContainer):RunnableContainer-instance-method","name":"replace","doc":"Replaces any occurences of this slot in *container* with a\ncontainer holding the runnables this slot stands for.\n\n*manifest* is the manifest that contains this slot.\n\n*group* is the `RunnableGroup` of the manifest that contains\nthis slot.\n\nReturns the next population container.","summary":"Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1424,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"content = population.child(transparent: false, ancestor: self)\ncontainer.replace(self, content)\ncontent\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1442,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[<>]\""}}]},{"html_id":"novika/Novika/Resolver/Designation","path":"Novika/Resolver/Designation.html","kind":"struct","full_name":"Novika::Resolver::Designation","name":"Designation","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":768,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Designation objects encapsulate a runnable environment and a set\nof resolutions that should be run within that environment.\n\nThe preferred way to create designations is via `RunnableEnvironment#designate`.\n\nAfter obtaining a designation, you can `run` it as many times as\nyou want.","summary":"Designation objects encapsulate a runnable environment and a set of resolutions that should be run within that environment.
","constructors":[{"html_id":"new(root:RunnableRoot,env:RunnableEnvironment,set:ResolutionSet,caps:CapabilityCollection)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","args_html":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":772,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, env, set, caps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"caps:Novika::CapabilityCollection-instance-method","name":"caps","doc":"Returns this designation's own capability collection.","summary":"Returns this designation's own capability collection.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":770,"url":null},"def":{"name":"caps","visibility":"Public","body":"@caps"}},{"html_id":"label:String-instance-method","name":"label","doc":"Returns the label of this designation. It is formed from the\nbasename of this designation's runnable environment.","summary":"Returns the label of this designation.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":837,"url":null},"def":{"name":"label","return_type":"String","visibility":"Public","body":"if envpath = @env.abspath?\nelse\n return \"unknown\"\nend\nenvpath.basename\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the designated resolutions under a new common toplevel block.","summary":"Runs the designated resolutions under a new common toplevel block.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":861,"url":null},"def":{"name":"run","visibility":"Public","body":"preambles = Block.new\nfill_preambles_block(preambles)\ntoplevel = Block.new(@caps.block)\ntoplevel.at(Word.new(\"__runtime__\"), Quote.new(\"novika\"))\ntoplevel.at(PREAMBLES_ENTRY_NAME, preambles)\nengine = Engine.push(@caps)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(toplevel)).slurp(source)\n instance = resolution.run(engine, script_block: script)\n toplevel.import!(from: instance)\nend\nEngine.pop(engine)\n"}},{"html_id":"slurp(target:Block)-instance-method","name":"slurp","doc":"Parses the designated resolutions and appends the parsed forms to\n*target*. Their order is kept, and matches that of the designated\nresolutions.","summary":"Parses the designated resolutions and appends the parsed forms to target.
","abstract":false,"args":[{"name":"target","external_name":"target","restriction":"Block"}],"args_string":"(target : Block)","args_html":"(target : Block)","location":{"filename":"src/novika/resolver.cr","line_number":846,"url":null},"def":{"name":"slurp","args":[{"name":"target","external_name":"target","restriction":"Block"}],"visibility":"Public","body":"preambles = (target.form_for?(PREAMBLES_ENTRY_NAME)).as?(Block)\npreambles || (preambles = Block.new)\nfill_preambles_block(preambles)\ntarget.at(PREAMBLES_ENTRY_NAME, preambles)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(target)).slurp(source)\n target.paste(script)\nend\n"}},{"html_id":"to_s(io,sm=false)-instance-method","name":"to_s","doc":"Appends the string representation of this designation to *io*.\n\n*sm*, if set to true, enables SMall output mode. In this mode,\nonly relative paths of the designated resolutions are appended\nto *io*, separated by newlines.","summary":"Appends the string representation of this designation to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"args_string":"(io, sm = false)","args_html":"(io, sm = false)","location":{"filename":"src/novika/resolver.cr","line_number":889,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"visibility":"Public","body":"envpath = @env.abspath?\nif sm && envpath\n @set.each do |resolution|\n io.puts((resolution.abspath.relative_to?(envpath)) || resolution.abspath)\n end\n return\nend\nenvpath || (envpath = \"unknown\")\n(io << envpath) << \": [\\n\"\n@set.each do |resolution|\n ((io << \" \") << resolution.abspath) << \",\\n\"\nend\nio << \"]\\n\"\n"}}]},{"html_id":"novika/Novika/Resolver/Disk","path":"Novika/Resolver/Disk.html","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":131,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"InfoAbsent","name":"InfoAbsent","value":"InfoAbsence.new","doc":"Singleton instance of `InfoAbsence`.","summary":"Singleton instance of InfoAbsence
.
A caching, resolver-specific file system access abstraction on top of Crystal's Dir
and File
.
If path (symlink or not) points to a directory, returns the real path to that directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":224,"url":null},"def":{"name":"dir?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.directory?\nelse\n return\nend\npresence.path\n"}},{"html_id":"env?(origin:Path):Path|Nil-instance-method","name":"env?","doc":"Determines and returns the path to the environment directory,\nif any. Otherwise, returns nil.\n\nClimbs up from *origin* until encountering:\n\n- A file named '.nk.env'\n- A directory named 'env' containing a file named '.nk.env'\n- A directory named '.novika'\n\nThe result is cached, recursively, so you can call this method\nas many times as you'd like; your disk won't explode.","summary":"Determines and returns the path to the environment directory, if any.
","abstract":false,"args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"args_string":"(origin : Path) : Path | Nil","args_html":"(origin : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":327,"url":null},"def":{"name":"env?","args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"env : Path | ::Nil\nif env = @envs[origin]?\n return env\nend\nif file?(origin / ENV_LOCAL_PROOF_FILENAME)\n return @envs[origin] = origin\nend\nif env = dir?(origin / ENV_GLOBAL_DIRNAME)\n return @envs[origin] = env\nend\nif (env = dir?(origin / ENV_LOCAL_DIRNAME)) && (file?(env / ENV_LOCAL_PROOF_FILENAME))\n return @envs[origin] = env\nend\nif (origin == origin.root) && (env = dir?(Path.home / ENV_GLOBAL_DIRNAME))\n return @envs[origin] = env\nend\nif origin == origin.anchor\n return\nend\nif env = env?(origin.parent)\nelse\n return\nend\n@envs[origin] = env\n"}},{"html_id":"file?(path:Path):Path|Nil-instance-method","name":"file?","doc":"If *path* (symlink or not) points to a file, returns the real\npath to that file. Otherwise, returns nil.","summary":"If path (symlink or not) points to a file, returns the real path to that file.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":215,"url":null},"def":{"name":"file?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.file?\nelse\n return\nend\npresence.path\n"}},{"html_id":"glob(origin:Path,selector:GlobSelector,&fn:Path->)-instance-method","name":"glob","doc":"A simpler, Novika- and `Disk`-specific globbing mechanism.\n\nCalls *fn* with paths in *origin* directory that match the\ngiven *selector*.","summary":"A simpler, Novika- and Disk
-specific globbing mechanism.
Reads, caches, and returns the InfoPresence
object for the given path.
Returns the content of the file that path points to.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : String | Nil","args_html":"(path : Path) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":234,"url":null},"def":{"name":"read","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"String | ::Nil","visibility":"Public","body":"@content.put_if_absent(path) do\n File.read(path)\nend"}},{"html_id":"write(path:Path,&:IO->)-instance-method","name":"write","doc":"Yields writable `IO` for the file that *path* points to. The\nfile is created if it does not exist; its content is cleared\nif it does.","summary":"Yields writable IO
for the file that path points to.
Represents the absence of the requested file system entry.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/Disk/InfoPresence","path":"Novika/Resolver/Disk/InfoPresence.html","kind":"struct","full_name":"Novika::Resolver::Disk::InfoPresence","name":"InfoPresence","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":137,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Disk","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk"},"doc":"Represents the presence of the requested file system entry\n(directory, file, or symlink) at `path`. Also holds its\n`File::Info` object, `info`.\n\nSee `info?`.","summary":"Represents the presence of the requested file system entry (directory, file, or symlink) at #path
.
Asks signal receivers to load whatever data they can (and should) from disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/DoDiskSave","path":"Novika/Resolver/DoDiskSave.html","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Asks signal receivers to save whatever data they can\n(and should) to disk.","summary":"Asks signal receivers to save whatever data they can (and should) to disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/GlobSelector","path":"Novika/Resolver/GlobSelector.html","kind":"enum","full_name":"Novika::Resolver::GlobSelector","name":"GlobSelector","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Scripts","name":"Scripts","value":"0","doc":"Match all Novika scripts (glob '*.nk')","summary":"Match all Novika scripts (glob '*.nk')
"},{"id":"Directories","name":"Directories","value":"1","doc":"Match all subdirectories (glob '*/')","summary":"Match all subdirectories (glob '*/')
"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selector for `Disk#glob`.","summary":"Selector for Disk#glob
.
Includers are manifests in RunnableGroup
s.
Creates and returns a manifest object if path contains a manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil) : Manifest","args_html":"(disk : Disk, path : Path, ancestor = nil) : Manifest","location":{"filename":"src/novika/resolver.cr","line_number":1560,"url":null},"def":{"name":"find","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"return_type":"Manifest","visibility":"Public","body":"((Lib.find?(disk, path, ancestor)) || (App.find?(disk, path, ancestor))) || Absent.new"}}],"instance_methods":[{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1570,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\n"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","doc":"Populates *container* with runnables from *origin* according\nto the content of the manifest.\n\n* If there is no explicit `*` or `**`, `**` is automatically\n inserted at the very beginning of the manifest regardless\n of whether it is an application manifest or a library manifest.\n\n* A directory with no manifest is laid out directly using `layout`,\n since there is no \"manifest content\" to speak of.","summary":"Populates container with runnables from origin according to the content of the manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1587,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: true, ancestor: origin)\npopulation.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.append(population)\nroot.assign(origin, container: population)\nlayout(population, origin)\n"}}],"types":[{"html_id":"novika/Novika/Resolver/Manifest/Absent","path":"Novika/Resolver/Manifest/Absent.html","kind":"struct","full_name":"Novika::Resolver::Manifest::Absent","name":"Absent","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the absence of a manifest.","summary":"Represents the absence of a manifest.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Manifest/App","path":"Novika/Resolver/Manifest/App.html","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1760,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.app\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents an application manifest.","summary":"Represents an application manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an application manifest object if\n*path* contains an application manifest. Otherwise,\nreturns nil.","summary":"Creates and returns an application manifest object if path contains an application manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1777,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new application manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new application manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1771,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1766,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1783,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","path":"Novika/Resolver/Manifest/CommentPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1520,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off comments from manifest content.","summary":"Strips off comments from manifest content.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1525,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"FlagPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1521,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/^\\s*#[^\\n]*/m, \"\")"}}]},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","path":"Novika/Resolver/Manifest/FlagPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1532,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Expands expressions such as `[windows, ... => dll, so]`, if found\nin manifest content: substitutes each with the appropriate value.","summary":"Expands expressions such as `[windows, ...
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1554,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":""}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1533,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/\\[([^\\]]+)\\]/) do |exp|\n case $~[1]\n when /^\\s*((?:\\w|\\.\\.\\.)+(?:\\s*,\\s*(?:\\w|\\.\\.\\.)+)*)\\s*\\|\\s*(\\w+(?:\\s*,\\s*\\w+)*)$/\n flags = $~[1].split(/\\s*,\\s*/, remove_empty: true)\n blocks = $~[2].split(/\\s*,\\s*/, remove_empty: true)\n if flags.size == blocks.size\n else\n next exp\n end\n branches = Hash.zip(flags, blocks)\n branch = branches[\"...\"]?\n @root.each_set_flag do |flag|\n if block = branches[flag]?\n else\n next\n end\n break branch = block\n end\n branch || \"\"\n end\nend"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Lib","path":"Novika/Resolver/Manifest/Lib.html","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1793,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.lib\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents a library manifest.","summary":"Represents a library manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an library manifest object if *path*\ncontains a library manifest, returns nil.","summary":"Creates and returns an library manifest object if path contains a library manifest, returns nil.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1809,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new library manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new library manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1804,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1799,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}}]},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","path":"Novika/Resolver/Manifest/PreamblePreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1491,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off manifest preamble and makes the manifest acknowledge it.","summary":"Strips off manifest preamble and makes the manifest acknowledge it.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1514,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"CommentPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1492,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"open = content.match(/^\\s*---\\s*$/m)\nif open\nelse\n return content\nend\nclose = content.match(/^\\s*---\\s*$/m, pos: open.end)\nrange_outer = open.begin...(close ? close.end : content.size)\nrange_inner = open.end...(close ? close.begin : content.size)\npreamble = content[range_inner].strip\n@manifest.on_preamble(@root, @group, preamble)\ncontent.sub(range_outer, \"\")\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","path":"Novika/Resolver/Manifest/Preprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1468,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Base class for several *subtractive preprocessors* for\nmanifest content.\n\nThey are *subtractive* because they *discard* stuff, at\nleast from the original content's point of view.\n\nAlso, one might say *subtractive preprocessors* match \"edges\"\nrather than by \"structure\". If done repeatedly and so to speak\nrecursively, one might finally arrive at \"grains\" coarse enough\nfor \"real\" content analysis. In this sense subtractive\npreprocessors are \"noise-friendly\" -- and that's just what we\nwant. Moreover, they may consider each other \"noise\", too.\n\nPreprocessors can be chained, and can programmaticaly select\nthe next preprocessor (or become the terminal one) in `next?`.","summary":"Base class for several subtractive preprocessors for manifest content.
","constructors":[{"html_id":"new(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","location":{"filename":"src/novika/resolver.cr","line_number":1469,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, group, manifest)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1485,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"PreamblePreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1479,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Present","path":"Novika/Resolver/Manifest/Present.html","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present","abstract":false,"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1599,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DIRECTIVES","name":"DIRECTIVES","value":"Set {\"noinherit\", \"nolayout\"}","doc":"A set of allowed manifest directives.","summary":"A set of allowed manifest directives.
"}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/App","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App"},{"html_id":"novika/Novika/Resolver/Manifest/Lib","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the presence of a manifest.","summary":"Represents the presence of a manifest.
","instance_methods":[{"html_id":"directory-instance-method","name":"directory","doc":"Returns a path that points to the directory where this\nmanifest is located.","summary":"Returns a path that points to the directory where this manifest is located.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1607,"url":null},"def":{"name":"directory","visibility":"Public","body":"@path.parent"}},{"html_id":"on_preamble(root:RunnableRoot,group:RunnableGroup,preamble:String)-instance-method","name":"on_preamble","doc":"Invoked when a preamble is found in this manifest. *preamble*\nis the inner content of the preamble (i.e. without `---`s).","summary":"Invoked when a preamble is found in this manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","args_html":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":1613,"url":null},"def":{"name":"on_preamble","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"visibility":"Public","body":"root.assign(group, preamble: preamble)"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1726,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: false, ancestor: self)\ncontainer.append(population)\nroot.assign(origin, container: population)\nmanifests = [] of ::Tuple(Manifest::Present, RunnableGroup, Array(String), Array(String), Bool)\nclimb(root, origin) do |manifest, group, isself|\n directives, fragments = ((manifest.preprocessed_content(root, group)).split(/\\s+/, remove_empty: true)).partition(&.in?(DIRECTIVES))\n manifests << {manifest, group, directives, fragments, !isself}\n if directives.includes?(\"noinherit\")\n break\n end\nend\nmanifests.reverse_each do |manifest, group, directives, fragments, inherited|\n population = manifest.process(root, group, population, directives, fragments, inherited)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1754,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Manifest[\") << @path) << \"]\""}}]}]},{"html_id":"novika/Novika/Resolver/MoreThanOneAppError","path":"Novika/Resolver/MoreThanOneAppError.html","kind":"class","full_name":"Novika::Resolver::MoreThanOneAppError","name":"MoreThanOneAppError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":119,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when the user tries to run more than one app.","summary":"Raised when the user tries to run more than one app.
","constructors":[{"html_id":"new(apps:Array(RunnableGroup))-class-method","name":"new","abstract":false,"args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"args_string":"(apps : Array(RunnableGroup))","args_html":"(apps : Array(RunnableGroup))","location":{"filename":"src/novika/resolver.cr","line_number":124,"url":null},"def":{"name":"new","args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(apps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"apps:Array(Novika::Resolver::RunnableGroup)-instance-method","name":"apps","doc":"Returns the array of apps in the response; more than of\nthem there.","summary":"Returns the array of apps in the response; more than of them there.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":122,"url":null},"def":{"name":"apps","visibility":"Public","body":"@apps"}}]},{"html_id":"novika/Novika/Resolver/Permission","path":"Novika/Resolver/Permission.html","kind":"enum","full_name":"Novika::Resolver::Permission","name":"Permission","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":50,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Undecided","name":"Undecided","value":"0"},{"id":"Allowed","name":"Allowed","value":"1"},{"id":"Denied","name":"Denied","value":"2"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents the permission state of a dependency.","summary":"Represents the permission state of a dependency.
","instance_methods":[{"html_id":"allowed?-instance-method","name":"allowed?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":52,"url":null},"def":{"name":"allowed?","visibility":"Public","body":"self == Allowed"}},{"html_id":"denied?-instance-method","name":"denied?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":53,"url":null},"def":{"name":"denied?","visibility":"Public","body":"self == Denied"}},{"html_id":"undecided?-instance-method","name":"undecided?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":51,"url":null},"def":{"name":"undecided?","visibility":"Public","body":"self == Undecided"}}]},{"html_id":"novika/Novika/Resolver/PermissionServer","path":"Novika/Resolver/PermissionServer.html","kind":"class","full_name":"Novika::Resolver::PermissionServer","name":"PermissionServer","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2715,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Permission server allows to prompt the user for permissions, and\nsave the user's choices in the *permissions file*.","summary":"Permission server allows to prompt the user for permissions, and save the user's choices in the permissions file.
","constructors":[{"html_id":"new(env:RunnableEnvironment,explicit:Array(RunnableQuery))-class-method","name":"new","doc":"Creates a new permission server.\n\n*resolver* is the resolver with which this server will talk about\nresolver-related things.\n\n*explicit* is a list of explicit runnable queries. An explicit\nquery is that query which was specified manually, e.g. via the\narguments. In other words, the user had to *type it* here and\nnow rather than \"acquire\" it from somewhere unknowingly. This\nlist is mainly used to be less annoying when it comes to asking\nfor permissions.","summary":"Creates a new permission server.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"args_string":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","args_html":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","location":{"filename":"src/novika/resolver.cr","line_number":2729,"url":null},"def":{"name":"new","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(env, explicit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"answer(answer:String)-instance-method","name":"answer","doc":"Prints *answer* so that it can be seen by the user.","summary":"Prints answer so that it can be seen by the user.
","abstract":false,"args":[{"name":"answer","external_name":"answer","restriction":"String"}],"args_string":"(answer : String)","args_html":"(answer : String)","location":{"filename":"src/novika/resolver.cr","line_number":2797,"url":null},"def":{"name":"answer","args":[{"name":"answer","external_name":"answer","restriction":"String"}],"visibility":"Public","body":"@answer.call(answer)"}},{"html_id":"ask?(question:String):String|Nil-instance-method","name":"ask?","doc":"Asks user a *question*, and returns the answer or an empty\nstring in case EOF was received.","summary":"Asks user a question, and returns the answer or an empty string in case EOF was received.
","abstract":false,"args":[{"name":"question","external_name":"question","restriction":"String"}],"args_string":"(question : String) : String | Nil","args_html":"(question : String) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2792,"url":null},"def":{"name":"ask?","args":[{"name":"question","external_name":"question","restriction":"String"}],"return_type":"String | ::Nil","visibility":"Public","body":"@ask.call(question)"}},{"html_id":"brief(dependency:RunnableCapability):String-instance-method","name":"brief","doc":"Returns a brief description of *dependency*.","summary":"Returns a brief description of dependency.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"args_string":"(dependency : RunnableCapability) : String","args_html":"(dependency : RunnableCapability) : String","location":{"filename":"src/novika/resolver.cr","line_number":2786,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"return_type":"String","visibility":"Public","body":"@env.brief(dependency)"}},{"html_id":"explicit?(dependency:Resolution::Dependency):Bool-instance-method","name":"explicit?","doc":"Returns whether *dependency* is explicit.\n\nThis is done by checking whether the *first* `RunnableQuery`\nancestor of *dependency* is in the explicit list. See `new`\nto learn what \"explicitness\" means.","summary":"Returns whether dependency is explicit.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency) : Bool","args_html":"(dependency : Resolution::Dependency) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":2806,"url":null},"def":{"name":"explicit?","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"return_type":"Bool","visibility":"Public","body":"dependency.each_ancestor do |ancestor|\n if ancestor.is_a?(RunnableQuery)\n else\n next\n end\n return @explicit.any?(&.same?(ancestor))\nend\nfalse\n"}},{"html_id":"load-instance-method","name":"load","doc":"Fills the permissions hash with saved permissions.","summary":"Fills the permissions hash with saved permissions.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2746,"url":null},"def":{"name":"load","visibility":"Public","body":"if permissions = @env.permissions?\nelse\n return\nend\ncontent, path = permissions\nbegin\n CSV.each_row(content.strip) do |__temp_70|\n dependent, dependency, state = __temp_70\n if id = state.to_i?\n else\n next\n end\n if permission = Permission.from_value?(id)\n else\n next\n end\n @permissions[{dependent, dependency}] = permission\n end\nrescue IndexError\n raise(ResolverError.new(\"malformed 'permissions' file: #{path}\"))\nend\n"}},{"html_id":"query_permission?(container:RunnableContainer,dependency:Resolution::Dependency)-instance-method","name":"query_permission?","doc":"Queries (possibly prompts) and returns the permission state of\n*dependency* for the given *container*.","summary":"Queries (possibly prompts) and returns the permission state of dependency for the given container.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(container : RunnableContainer, dependency : Resolution::Dependency)","args_html":"(container : RunnableContainer, dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":2817,"url":null},"def":{"name":"query_permission?","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"@permissions.put_if_absent(dependency.signature(container)) do\n dependency.prompt?(self, for: container)\nend"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Flushes the internal permissions store to disk.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2768,"url":null},"def":{"name":"save","visibility":"Public","body":"if @permissions.values.any?(&.allowed?)\nelse\n return\nend\n@env.permissions do |io|\n CSV.build(io) do |builder|\n @permissions.each do |__temp_71, permission|\n dependent, dependency = __temp_71\n if permission.undecided? || permission.denied?\n next\n end\n builder.row(dependent, dependency, permission.to_i)\n end\n end\nend\n"}}]},{"html_id":"novika/Novika/Resolver/Query","path":"Novika/Resolver/Query.html","kind":"alias","full_name":"Novika::Resolver::Query","name":"Query","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":1047,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"(Path | String)","aliased_html":"Path | String","const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}},{"html_id":"novika/Novika/Resolver/Resolution","path":"Novika/Resolver/Resolution.html","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":356,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Obtaining a set of resolution objects from an initial list of\nqueries is the central goal of the resolver.\n\nA resolution object points to a script and lists its dependencies.\nFurthermore, a resolution object also stores its so-called\nrunnable *sources*, which are `RunnableScript` objects that it\nwas derived from.","summary":"Obtaining a set of resolution objects from an initial list of queries is the central goal of the resolver.
","constructors":[{"html_id":"new(script:RunnableScript,deps:Set(Dependency))-class-method","name":"new","doc":"Initializes a runnable resolution for the given runnable *script* and a\nset of resolution dependency objects *deps*.","summary":"Initializes a runnable resolution for the given runnable script and a set of resolution dependency objects deps.
","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"args_string":"(script : RunnableScript, deps : Set(Dependency))","args_html":"(script : RunnableScript, deps : Set(Dependency))","location":{"filename":"src/novika/resolver.cr","line_number":362,"url":null},"def":{"name":"new","args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(script, deps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two resolutions are considered equal when they point to the\nsame script on the disk.","summary":"Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath:Path-instance-method","name":"abspath","doc":"Returns the absolute path to this resolution.","summary":"Returns the absolute path to this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":358,"url":null},"def":{"name":"abspath","return_type":"Path","visibility":"Public","body":"@abspath"}},{"html_id":"dump!(deps:Set(Dependency)|Nil=nil,sources:Array(RunnableScript)|Nil=nil)-instance-method","name":"dump!","doc":"Appends the dependencies of this resolution to *deps*, source scripts\nof this resolution to *sources*.","summary":"Appends the dependencies of this resolution to deps, source scripts of this resolution to sources.
","abstract":false,"args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"args_string":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","args_html":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":369,"url":null},"def":{"name":"dump!","args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"visibility":"Public","body":"deps.try(&.concat(@deps))\nsources.try(&.concat(@sources))\n"}},{"html_id":"each_dependency(&:Dependency->)-instance-method","name":"each_dependency","doc":"Yields dependencies of this resolution.","summary":"Yields dependencies of this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":382,"url":null},"def":{"name":"each_dependency","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Dependency ->)"},"visibility":"Public","body":"@deps.each do |dep|\n yield dep\nend"}},{"html_id":"each_source_group(&:RunnableGroup->)-instance-method","name":"each_source_group","doc":"Yields all `RunnableGroup`s from the ancestry of source scripts of\nthis resolution. Does not yield the same group twice (sameness is\ndetermined with `==`/hash).","summary":"Yields all RunnableGroup
s from the ancestry of source scripts of this resolution.
Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"merge!(other:Resolution):self-instance-method","name":"merge!","doc":"Mutably merges this and *other* resolutions.","summary":"Mutably merges this and other resolutions.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"args_string":"(other : Resolution) : self","args_html":"(other : Resolution) : self","location":{"filename":"src/novika/resolver.cr","line_number":375,"url":null},"def":{"name":"merge!","args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"return_type":"self","visibility":"Public","body":"other.dump!(@deps, @sources)\nself\n"}},{"html_id":"run(engine:Engine,script_block:Block):Block-instance-method","name":"run","doc":"Opens an instance of *script block* (aka *file block*) with *engine*.\n\nExtends *script block* itself with `__path__`, `__file__`; therefore,\nmutates *script block*.\n\nReturns the script block instance after evaluation.","summary":"Opens an instance of script block (aka file block) with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"args_string":"(engine : Engine, script_block : Block) : Block","args_html":"(engine : Engine, script_block : Block) : Block","location":{"filename":"src/novika/resolver.cr","line_number":408,"url":null},"def":{"name":"run","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"return_type":"Block","visibility":"Public","body":"script_block.at(Word.new(\"__path__\"), Quote.new(@abspath.parent.to_s))\nscript_block.at(Word.new(\"__file__\"), Quote.new(@abspath.to_s))\ninstance = script_block.instance\ninstance.schedule!(engine, stack: Block.new)\nengine.exhaust\ninstance\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":420,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(((((io << @abspath) << \" (\") << (@deps.join(\", \"))) << \") ← [\") << (@sources.join(\" | \"))) << \"]\""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","path":"Novika/Resolver/Resolution/Dependency.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":430,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution"},"doc":"Includers can be listed as dependencies in a `Resolution`.","summary":"Includers can be listed as dependencies in a Resolution
.
Sets the permission state of this dependency to "allowed".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":459,"url":null},"def":{"name":"allow","visibility":"Public","body":"@permission = Permission::Allowed"}},{"html_id":"allowed?:Bool-instance-method","name":"allowed?","doc":"Returns whether this dependency is allowed. Depends on the permission\nstate of this dependency, which is normally set by `PermissionServer`.","summary":"Returns whether this dependency is allowed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":454,"url":null},"def":{"name":"allowed?","return_type":"Bool","visibility":"Public","body":"@permission.allowed?"}},{"html_id":"deny-instance-method","name":"deny","doc":"Sets the permission state of this dependency to \"denied\".","summary":"Sets the permission state of this dependency to "denied".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":464,"url":null},"def":{"name":"deny","visibility":"Public","body":"@permission = Permission::Denied"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is #allowed?
, enables it in the given capability collection caps.
Promps the user for whether the use of this dependency should be allowed in container's RunnableEnvironment
.
Communicates with the given permission server in order to determine whether the use of this dependency should be allowed or denied to container.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer)","args_html":"(server : PermissionServer, *, for container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":471,"url":null},"def":{"name":"request","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"visibility":"Public","body":"if @permission.undecided?\nelse\n return\nend\nif server.explicit?(self)\n @permission = Permission::Allowed\n return\nend\n@permission = server.query_permission?(container, self)\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":439,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","path":"Novika/Resolver/Resolution/Dependency/DefaultPrompt.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":488,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},"doc":"Provides the includer with an implementation of `Dependency#prompt?`\nin turn requiring it to simply specify a `label`.","summary":"Provides the includer with an implementation of Dependency#prompt?
in turn requiring it to simply specify a #label
.
Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":513,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":""}},{"html_id":"envelope(container:RunnableContainer)-instance-method","name":"envelope","doc":"Returns the string representation of this dependency's envelope\n(its container so to speak). The runtime (not specialize-time!)\n*container* is provided as a fallback option (albeit a *very bad one*).","summary":"Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":501,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":true,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":496,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":""}},{"html_id":"prompt?(server:PermissionServer,*,forcontainer:RunnableContainer):Permission-instance-method","name":"prompt?","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","args_html":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","location":{"filename":"src/novika/resolver.cr","line_number":516,"url":null},"def":{"name":"prompt?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"return_type":"Permission","visibility":"Public","body":"label = label(server)\nprompt = String.build do |io|\n (((io << \"Allow \") << (envelope(container))) << \" to load \") << label\n if description = description?(server)\n (io << \", which \") << description\n end\n ((((io << \"? [\") << \"y\".colorize.underline) << \" yes | \") << \"?\".colorize.underline) << \" help |Represents the signature of a dependency.
"}]}]},{"html_id":"novika/Novika/Resolver/ResolutionSet","path":"Novika/Resolver/ResolutionSet.html","kind":"struct","full_name":"Novika::Resolver::ResolutionSet","name":"ResolutionSet","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":553,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents an ordered set of `Resolution` objects.","summary":"Represents an ordered set of Resolution
objects.
Returns whether all resolutions from this set come from the same RunnableGroup
.
Returns whether all resolutions in this set come from the same application RunnableGroup
.
Appends a resolution to this set.
","abstract":false,"args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"args_string":"(resolution : Resolution)","args_html":"(resolution : Resolution)","location":{"filename":"src/novika/resolver.cr","line_number":571,"url":null},"def":{"name":"append","args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"visibility":"Public","body":"if index = @resolutions.index(resolution)\n @resolutions[index] = @resolutions[index].merge!(resolution)\n return\nend\n@resolutions << resolution\n"}},{"html_id":"append(set:ResolutionSet)-instance-method","name":"append","doc":"Appends an entire resolution *set* at once. Essentially the same\nas appending each `Resolution` from *set*.","summary":"Appends an entire resolution set at once.
","abstract":false,"args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"args_string":"(set : ResolutionSet)","args_html":"(set : ResolutionSet)","location":{"filename":"src/novika/resolver.cr","line_number":582,"url":null},"def":{"name":"append","args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"visibility":"Public","body":"set.each do |resolution|\n append(resolution)\nend"}},{"html_id":"each(&:Resolution->)-instance-method","name":"each","doc":"Yields resolutions in this resolution set.","summary":"Yields resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":587,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Resolution ->)"},"visibility":"Public","body":"@resolutions.each do |resolution|\n yield resolution\nend"}},{"html_id":"each_designation(root:RunnableRoot,&:Designation->)-instance-method","name":"each_designation","doc":"Yields environment designations for the given runnable *root*.\n\n*Environment designations* are resolution sets coupled to an\nenvironment. That is, an environment designation is a \"token\"\nstating *this* environment should handle resolutions out of\n*that* resolution set.","summary":"Yields environment designations for the given runnable root.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"args_string":"(root : RunnableRoot, & : Designation -> )","args_html":"(root : RunnableRoot, & : Designation -> )","location":{"filename":"src/novika/resolver.cr","line_number":713,"url":null},"def":{"name":"each_designation","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"visited = Set(Resolution).new\ndesignations = {} of RunnableEnvironment => ResolutionSet\neach_group do |group, resolution|\n if resolution.in?(visited)\n next\n end\n if container = root.containerof?(group)\n else\n return\n end\n set = designations.put_if_absent(container.env) do\n ResolutionSet.new\n end\n set.append(resolution)\n visited << resolution\nend\ndefault = designations.put_if_absent(root.default_env) do\n ResolutionSet.new\nend\neach do |resolution|\n if resolution.in?(visited)\n next\n end\n default.append(resolution)\nend\ndesignations.each do |env, set|\n yield env.designate(set)\nend\n"}},{"html_id":"each_group(&:RunnableGroup,Resolution->)-instance-method","name":"each_group","doc":"Yields all `RunnableGroup` objects that have contributed to this\nresolution set. The yielded groups can repeat.","summary":"Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields preambles of unique application and library RunnableGroup
s that have contributed to this resolution set, as well as the groups themselves.
Yields unique application RunnableGroup
s that have contributed to this resolution set.
Yields all unique Resolution::Dependency
objects in this resolution set.
Yields each unique Resolution::Dependency
object followed by a ResolutionSet
of its dependents.
Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields unique library RunnableGroup
s that have contributed to this resolution set.
Returns whether there are no resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":564,"url":null},"def":{"name":"empty?","visibility":"Public","body":"size.zero?"}},{"html_id":"groups:Array(RunnableGroup)-instance-method","name":"groups","doc":"Returns an array of `RunnableGroup` objects that have contributed\nto this resolution set. Objects in the array can repeat.","summary":"Returns an array of RunnableGroup
objects that have contributed to this resolution set.
Returns whether all resolutions in this set come from the same library RunnableGroup
.
Returns the amount of resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":559,"url":null},"def":{"name":"size","visibility":"Public","body":"@resolutions.size"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":751,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(\"ResolutionSet\")\neach do |resolution|\n (io << \" | \") << resolution\n io.puts\nend\n"}},{"html_id":"unique_apps:Array(RunnableGroup)-instance-method","name":"unique_apps","doc":"Returns an array of unique application `RunnableGroup`s that have\ncontributed to this resolution set.","summary":"Returns an array of unique application RunnableGroup
s that have contributed to this resolution set.
Base class for resolver and resolver-related exceptions.
"},{"html_id":"novika/Novika/Resolver/Response","path":"Novika/Resolver/Response.html","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A mutable response object which is tightly coupled to `Session`,\ndesigned for reuse throughout multiple (rounds of) queries to\nthe latter.","summary":"A mutable response object which is tightly coupled to Session
, designed for reuse throughout multiple (rounds of) queries to the latter.
Joins all accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2874,"url":null},"def":{"name":"accepted_set","return_type":"ResolutionSet","visibility":"Public","body":"accepted_set = ResolutionSet.new\n@accepted.each do |__temp_72|\n _, set = __temp_72\n accepted_set.append(set)\nend\naccepted_set\n"}},{"html_id":"drop_wish(&:RunnableQuery->)-instance-method","name":"drop_wish","doc":"Yields wishes from this response's wishlist, then clears\nthe wishlist (so that this response can perhaps be reused).","summary":"Yields wishes from this response's wishlist, then clears the wishlist (so that this response can perhaps be reused).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2908,"url":null},"def":{"name":"drop_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishlist.each do |wish|\n yield wish\nend\n@wishlist.clear\n"}},{"html_id":"each_ignored_runnable(&:Runnable->)-instance-method","name":"each_ignored_runnable","doc":"Yields runnables that were ignored.","summary":"Yields runnables that were ignored.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2902,"url":null},"def":{"name":"each_ignored_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@ignored.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_rejected_runnable(&:Runnable->)-instance-method","name":"each_rejected_runnable","doc":"Yields runnables that were rejected.","summary":"Yields runnables that were rejected.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2897,"url":null},"def":{"name":"each_rejected_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@rejected.each do |runnable|\n yield runnable\nend"}},{"html_id":"queried_for_set:ResolutionSet-instance-method","name":"queried_for_set","doc":"Joins all *queried-for* accepted resolution sets of this response\ninto one large resolution set, and returns it.\n\nSee `AcceptionRoute` to learn about the difference between\n*queried-for* and *wished* routes of set acception.","summary":"Joins all queried-for accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2887,"url":null},"def":{"name":"queried_for_set","return_type":"ResolutionSet","visibility":"Public","body":"queried_for_set = ResolutionSet.new\n@accepted.each do |__temp_73|\n route, set = __temp_73\n if route.query?\n else\n next\n end\n queried_for_set.append(set)\nend\nqueried_for_set\n"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Returns whether this response is successful, in that it has no rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2864,"url":null},"def":{"name":"successful?","return_type":"Bool","visibility":"Public","body":"@rejected.empty?"}},{"html_id":"wishless?:Bool-instance-method","name":"wishless?","doc":"Returns `true` if this response does not \"wish\" to make any more\nqueries before its accepted sets can be inspected.","summary":"Returns true
if this response does not "wish" to make any more queries before its accepted sets can be inspected.
The resolution set was accepted due to a wish: some runnable out there "wished" that runnables from the set were there, and here they are.
"},{"id":"Query","name":"Query","value":"1","doc":"The resolution set was explicitly mentioned by the user\nsomewhere (queried for).","summary":"The resolution set was explicitly mentioned by the user somewhere (queried for).
"}],"namespace":{"html_id":"novika/Novika/Resolver/Response","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response"},"doc":"Represents the way a resolution set was accepted.","summary":"Represents the way a resolution set was accepted.
","instance_methods":[{"html_id":"query?-instance-method","name":"query?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2839,"url":null},"def":{"name":"query?","visibility":"Public","body":"self == Query"}},{"html_id":"wish?-instance-method","name":"wish?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2835,"url":null},"def":{"name":"wish?","visibility":"Public","body":"self == Wish"}}]}]},{"html_id":"novika/Novika/Resolver/ResponseRejectedError","path":"Novika/Resolver/ResponseRejectedError.html","kind":"class","full_name":"Novika::Resolver::ResponseRejectedError","name":"ResponseRejectedError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":109,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when there are rejected runnables in a response.","summary":"Raised when there are rejected runnables in a response.
","constructors":[{"html_id":"new(response:Response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Response"}],"args_string":"(response : Response)","args_html":"(response : Response)","location":{"filename":"src/novika/resolver.cr","line_number":113,"url":null},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Response"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"response:Novika::Resolver::Response-instance-method","name":"response","doc":"Returns the response which contains some rejected runnables.","summary":"Returns the response which contains some rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":111,"url":null},"def":{"name":"response","visibility":"Public","body":"@response"}}]},{"html_id":"novika/Novika/Resolver/Runnable","path":"Novika/Resolver/Runnable.html","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":919,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"subclasses":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableContainer","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of all runnables.\n\nThe main basic property of all runnables is that they can be\n*rewritten* into other runnables, oftentimes of a more specific\nkind. Additionally, runnable objects are the head of their history\nlinked list, allowing clients to observe how the runnable of\ninterest came to be.","summary":"Base class of all runnables.
","constructors":[{"html_id":"new(ancestor:Ancestor|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"args_string":"(ancestor : Ancestor | Nil = nil)","args_html":"(ancestor : Ancestor | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":959,"url":null},"def":{"name":"new","args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this runnable, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this runnable, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":957,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"ancestors:Array(Ancestor)-instance-method","name":"ancestors","doc":"Returns an array of ancestors of this runnable, starting from\nthe most recent ancestor and ending with the oldest one.","summary":"Returns an array of ancestors of this runnable, starting from the most recent ancestor and ending with the oldest one.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":976,"url":null},"def":{"name":"ancestors","return_type":"Array(Ancestor)","visibility":"Public","body":"ancestors = [] of Ancestor\neach_ancestor do |ancestor|\n ancestors << ancestor\nend\nancestors\n"}},{"html_id":"backtrace(io:IO,indent:Int32=0,annex:String|Nil=nil)-instance-method","name":"backtrace","doc":"Appends ancestors of this runnable (its \"history\") to *io*.\n\n*indent* can be used to specify the amount of whitespace\npreceding each line.\n\n*annex* is the additional bit of text displayed below the\nbacktrace. For instance, in case of an error, it can contain\nthe error message.","summary":"Appends ancestors of this runnable (its "history") to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"args_string":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","args_html":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":992,"url":null},"def":{"name":"backtrace","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"visibility":"Public","body":"backtrace = ancestors.reverse\nbacktrace << self\nio << \" ┬\\n\"\nws = \" \" * indent\nbacktrace.each do |runnable|\n (io << ws) << \"╿ in \"\n if runnable.is_a?(RunnableContainer)\n content = String.build do |inner|\n runnable.to_s(inner, lead: 0, indent: indent + 2)\n end\n skip = true\n content.each_line(chomp: true) do |line|\n if skip\n io.puts(line)\n skip = false\n next\n end\n ((io << \" │\") << line) << '\\n'\n end\n else\n (io << runnable) << '\\n'\n end\nend\nif annex\nelse\n return\nend\n((io << \" │\\n ╰┴─ \") << annex) << '\\n'\n"}},{"html_id":"backtrace(*args,**kwargs,&:IO->)-instance-method","name":"backtrace","doc":"Yields an `IO` where you can write the *annex*, otherwise the\nsame as `backtrace`.","summary":"Yields an IO
where you can write the annex, otherwise the same as #backtrace
.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1033,"url":null},"def":{"name":"constituents","return_type":"Array(Runnable)","visibility":"Public","body":"[self] of Runnable"}},{"html_id":"each_ancestor(&:Ancestor->)-instance-method","name":"each_ancestor","doc":"Yields ancestors of this runnable.\n\nBy tracing the ancestry of `self`, you are effectively exploring\nhow it came to be.","summary":"Yields ancestors of this runnable.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":966,"url":null},"def":{"name":"each_ancestor","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Ancestor ->)"},"visibility":"Public","body":"runnable = @ancestor\nwhile runnable\n yield runnable\n runnable = runnable.ancestor?\nend\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1044,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","path":"Novika/Resolver/Runnable/Ancestor.html","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":921,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a `Runnable` ancestor.","summary":"Represents a Runnable
ancestor.
Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":true,"location":{"filename":"src/novika/resolver.cr","line_number":924,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","path":"Novika/Resolver/Runnable/HasDatum.html","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum(T)","name":"HasDatum","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":944,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a runnable with datum of type *T*. This module assigns\nno intrinsic meaning to the word \"datum\" or to its value; includers\nare free to choose that, as well as the type *T*.\n\nThe only real consequence of including this module is that equality\nand hash methods will be defined. These methods will delegate\ncomparison/hashing to the datum(s) at hand.","summary":"Represents a runnable with datum of type T.
","instance_methods":[{"html_id":"==(other:T)-instance-method","name":"==","doc":"Returns whether the datum of this runnable is equal to *other*.","summary":"Returns whether the datum of this runnable is equal to other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"T"}],"args_string":"(other : T)","args_html":"(other : T)","location":{"filename":"src/novika/resolver.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"T"}],"visibility":"Public","body":"@datum == other"}},{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @datum == (other.@datum)\nelse\n return false\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @datum.hash(hasher)\nhasher\n"}}]},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","path":"Novika/Resolver/Runnable/Terminal.html","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":931,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a terminal (as in *terminate*) runnable, that is,\na runnable that cannot be rewritten any further.","summary":"Represents a terminal (as in terminate) runnable, that is, a runnable that cannot be rewritten any further.
","instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":932,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.append(self)"}}]}]},{"html_id":"novika/Novika/Resolver/RunnableCapability","path":"Novika/Resolver/RunnableCapability.html","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1116,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Capabilities represent the requirements of a Novika script, library,\nor application, regarding language features that are needed in order\nfor that script, library, or application to properly work.","summary":"Capabilities represent the requirements of a Novika script, library, or application, regarding language features that are needed in order for that script, library, or application to properly work.
","constructors":[{"html_id":"new(datum:String,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : String, ancestor = nil)","args_html":"(datum : String, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1122,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"description?(server:PermissionServer):String|Nil-instance-method","name":"description?","doc":"Returns a user-friendly description of this dependency, or nil\nif none can be given. The returned description should be suitable\nfor displaying to the user in a prompt, and should read well after\n\"which\", as in \"which [exposes this and that]\", \"which [allows\nthis and that]\", etc., where words in brackets are those of\nthe description.\n\n*server* is the server that will then use the description in\none way or another, in case it is present. You may also choose\nto derive the description with *server*'s help.","summary":"Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1144,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":"server.brief(self)"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1126,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1140,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"capability #{@datum.colorize.bold}\""}},{"html_id":"purpose(*,incaps:CapabilityCollection)-instance-method","name":"purpose","doc":"Returns the purpose of this capability in the given capability\ncollection *caps*.","summary":"Returns the purpose of this capability in the given capability collection caps.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"args_string":"(*, in caps : CapabilityCollection)","args_html":"(*, in caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":1150,"url":null},"def":{"name":"purpose","args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"splat_index":0,"visibility":"Public","body":"if cls = caps.get_capability_class?(@datum)\nelse\n raise(\"BUG: capability runnable for which there is no capability class\")\nend\ncls.purpose\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1132,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted capability\")\nend\n{envelope.abspath.to_s, @datum}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1165,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1171,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Capability[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableContainer","path":"Novika/Resolver/RunnableContainer.html","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2017,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable container is an *ordered*, arbitrarily *filtered*\ncollection of runnables - and a runnable itself. It holds and\nadvances (through rewriting) a *generation* of runnables.","summary":"A runnable container is an ordered, arbitrarily filtered collection of runnables - and a runnable itself.
","constructors":[{"html_id":"new(root:RunnableRoot,dir:Path,env:RunnableEnvironment,parent:RunnableContainer|Nil=nil,transparent:Bool=false,ancestor=nil)-class-method","name":"new","doc":"Initializes a new runnable container for the given *dir*ectory.\n\n*parent* is the parent runnable container. You don't normally need\nto specify it. Prefer to call `child` on the parent instead.\n\n*transparent* specifies whether the container is transparent,\nsee `transparent?`.","summary":"Initializes a new runnable container for the given directory.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","args_html":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":2049,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, dir, env, parent, transparent, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path of the directory of this container.","summary":"Returns the absolute path of the directory of this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2165,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @dir.absolute?\nelse\n raise(\"BUG: container dir path is not an absolute path\")\nend\n@dir\n"}},{"html_id":"allow?(warn=false,&filter:Runnable->Bool)-instance-method","name":"allow?","doc":"Introduces a *filter* for the constituent runnables of this\ncontainer. *filter* should decide whether to accept (true)\nor reject (false) a runnable.\n\n*warn* specifies whether the `RunnableIgnored` signal should be\nsent if *filter* rejects a runnable.","summary":"Introduces a filter for the constituent runnables of this container.
","abstract":false,"args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"args_string":"(warn = false, &filter : Runnable -> Bool)","args_html":"(warn = false, &filter : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2150,"url":null},"def":{"name":"allow?","args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"yields":1,"block_arity":1,"block_arg":{"name":"filter","external_name":"filter","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"push_filter(Filter.new(filter, warn))"}},{"html_id":"append(runnable:Runnable)-instance-method","name":"append","doc":"Inserts *runnable* after all other runnables in this container.","summary":"Inserts runnable after all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2108,"url":null},"def":{"name":"append","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables << runnable"}},{"html_id":"append(runnables:Array(Runnable))-instance-method","name":"append","doc":"Inserts the entire array of *runnables* after all other runnables\nin this container.","summary":"Inserts the entire array of runnables after all other runnables in this container.
","abstract":false,"args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"args_string":"(runnables : Array(Runnable))","args_html":"(runnables : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2114,"url":null},"def":{"name":"append","args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"visibility":"Public","body":"@runnables.concat(runnables)"}},{"html_id":"can_contain?(runnable:Runnable)-instance-method","name":"can_contain?","doc":"Returns whether this container's filters allow it to contain\nthe given *runnable*.","summary":"Returns whether this container's filters allow it to contain the given runnable.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2156,"url":null},"def":{"name":"can_contain?","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"each_filter do |filter|\n if filter.call(runnable)\n else\n return false\n end\nend\ntrue\n"}},{"html_id":"child(dir=@dir,ancestor=self,*,transparent:Bool)-instance-method","name":"child","doc":"Builds and returns a child of this container.\n\nOptionally, the *dir*ectory of the child can be provided.\nOtherwise, the directory of this container will be used.\n\nAdditionally, you can specify whether the child should be\n*transparent* (see `transparent?`).","summary":"Builds and returns a child of this container.
","abstract":false,"args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"args_string":"(dir = @dir, ancestor = self, *, transparent : Bool)","args_html":"(dir = @dir, ancestor = self, *, transparent : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2379,"url":null},"def":{"name":"child","args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"splat_index":2,"visibility":"Public","body":"RunnableContainer.new(@root, dir, env: @root.defenv(@root.disk.env?(dir)), parent: self, ancestor: ancestor, transparent: transparent)"}},{"html_id":"classify?(datum:Path,ancestor:Ancestor|Nil):Runnable|Nil-instance-method","name":"classify?","doc":"Creates a `RunnableDir`, `RunnableScript`, or `RunnableSharedObject`\ndepending on what *datum* points to and on its extension.\n\n*ancestor* is set as the ancestor of the created runnable.\n\nReturns nil if *datum* does not exist, or if there is no\nappropriate classification.","summary":"Creates a RunnableDir
, RunnableScript
, or RunnableSharedObject
depending on what datum points to and on its extension.
If datum is a capability, creates and returns an appropriate RunnableCapability
object.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2103,"url":null},"def":{"name":"constituents","visibility":"Public","body":"transparent? ? @runnables : super()"}},{"html_id":"each(&:Runnable->)-instance-method","name":"each","doc":"Yields constituent runnables.","summary":"Yields constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2135,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@runnables.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_path(fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"args_string":"(fn : Path -> )","args_html":"(fn : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2238,"url":null},"def":{"name":"each_path","args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"visibility":"Public","body":"@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n fn.call(runnable.abspath)\n runnable.each_path(fn)\n else\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableGroup)\n fn.call(runnable.abspath)\n end\n end\nend"}},{"html_id":"each_path(&fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2250,"url":null},"def":{"name":"each_path","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Path ->)"},"visibility":"Public","body":"each_path(fn)"}},{"html_id":"each_sorted_path(selector:GlobSelector,&:Path->)-instance-method","name":"each_sorted_path","doc":"Yields all paths matching *selector* in lexicographic order.\nThe paths are initially taken from the directory of this\ncontainer. See `Disk#glob` for details.","summary":"Yields all paths matching selector in lexicographic order.
","abstract":false,"args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"args_string":"(selector : GlobSelector, & : Path -> )","args_html":"(selector : GlobSelector, & : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2265,"url":null},"def":{"name":"each_sorted_path","args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Path ->)"},"visibility":"Public","body":"paths = [] of Path\n@root.disk.glob(@dir, selector) do |path|\n paths << path\nend\npaths.unstable_sort! do |a, b|\n a.to_s.compare(b.to_s, case_insensitive: true)\nend\npaths.each do |path|\n yield path\nend\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this container is empty, i.e., holds\nhas no constituent runnables.","summary":"Returns whether this container is empty, i.e., holds has no constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2125,"url":null},"def":{"name":"empty?","visibility":"Public","body":"@runnables.empty?"}},{"html_id":"env:Novika::Resolver::RunnableEnvironment-instance-method","name":"env","doc":"Returns the `RunnableEnvironment` assigned to this container.","summary":"Returns the RunnableEnvironment
assigned to this container.
Recursively replaces each runnable in this container with its #constituents
.
Returns whether env is this container's environment.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"args_string":"(env : RunnableEnvironment)","args_html":"(env : RunnableEnvironment)","location":{"filename":"src/novika/resolver.cr","line_number":2172,"url":null},"def":{"name":"from?","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"visibility":"Public","body":"@env == env"}},{"html_id":"includes?(other)-instance-method","name":"includes?","doc":"Returns whether this container includes the given *runnable*.","summary":"Returns whether this container includes the given runnable.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/resolver.cr","line_number":2130,"url":null},"def":{"name":"includes?","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"@runnables.includes?(other)"}},{"html_id":"paths-instance-method","name":"paths","doc":"Returns a set of *all* paths (file, directory, etc. paths) in\nthis container, including those in nested containers.","summary":"Returns a set of all paths (file, directory, etc.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2256,"url":null},"def":{"name":"paths","visibility":"Public","body":"paths = Set(Path).new\neach_path do |path|\n paths << path\nend\npaths\n"}},{"html_id":"prepend(runnable:Runnable)-instance-method","name":"prepend","doc":"Inserts *runnable* before all other runnables in this container.","summary":"Inserts runnable before all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2119,"url":null},"def":{"name":"prepend","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables.unshift(runnable)"}},{"html_id":"recursive_nonterminal_each(fn:Runnable,RunnableContainer->)-instance-method","name":"recursive_nonterminal_each","doc":"Calls *fn* with each nonterminal and the container it's from,\nrecurses into nested `RunnableContainer`s.","summary":"Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"args_string":"(fn : Runnable -> Bool)","args_html":"(fn : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2307,"url":null},"def":{"name":"recursive_select!","args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"visibility":"Public","body":"@runnables.select! do |runnable|\n fn.call(runnable)\nend\n@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n else\n next\n end\n runnable.recursive_select!(fn)\nend\n"}},{"html_id":"recursive_select!(&fn:Runnable->Bool)-instance-method","name":"recursive_select!","doc":"Accepts only those runnable in this container and in all nested\ncontainers for which *fn* returns true.\n\nRunnables for which *fn* returned false are mutably deleted.","summary":"Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2316,"url":null},"def":{"name":"recursive_select!","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"recursive_select!(fn)"}},{"html_id":"replace(pattern:Runnable,replacement:Runnable)-instance-method","name":"replace","doc":"Replaces *pattern* runnable with the *replacement* runnable\nin this container only (i.e., does not recurse).","summary":"Replaces pattern runnable with the replacement runnable in this container only (i.e., does not recurse).
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"args_string":"(pattern : Runnable, replacement : Runnable)","args_html":"(pattern : Runnable, replacement : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2281,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"visibility":"Public","body":"if can_contain?(replacement)\nelse\n return\nend\n@runnables.map! do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"replace(pattern:Runnable,replacement:Array(Runnable))-instance-method","name":"replace","doc":"Replaces *pattern* runnable with multiple *replacement* runnables\nin this container only (i.e. does not recurse). Their order will\nbe the same as that in *replacement*.\n\nRunnables from *replacement* that this container cannot contain\nare left out.","summary":"Replaces pattern runnable with multiple replacement runnables in this container only (i.e.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"args_string":"(pattern : Runnable, replacement : Array(Runnable))","args_html":"(pattern : Runnable, replacement : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2295,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"visibility":"Public","body":"replacement = replacement.select do |runnable|\n can_contain?(runnable)\nend\n@runnables = @runnables.flat_map do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"request(dependency:Resolution::Dependency)-instance-method","name":"request","doc":"Communicates with this container's environment permission\nserver in order to determine whether the use *dependency*\nshould be allowed to `self`.","summary":"Communicates with this container's environment permission server in order to determine whether the use dependency should be allowed to self
.
Rewrites this container until there is no point in doing so.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2430,"url":null},"def":{"name":"rewrite","visibility":"Public","body":"begin\n @root.down(caller: (@ancestor.as?(Runnable)) || self)\n loop do\n previous = @runnables\n @runnables = [] of Runnable\n previous.each(&.specialize(@root, container: self))\n apply_filters!\n if previous == @runnables\n break\n end\n end\nensure\n @root.up\nend"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":2478,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if empty?\n return\nend\nrewrite\ncontainer.append(self)\n"}},{"html_id":"thorough_rewrite-instance-method","name":"thorough_rewrite","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2454,"url":null},"def":{"name":"thorough_rewrite","visibility":"Public","body":"@dir_rewrite = true\nrewrite\n@dir_rewrite = false\nif abspath = @env.abspath?\nelse\n return\nend\nrecursive_nonterminal_map! do |nonterminal, container|\n if container.from?(@env)\n else\n next nonterminal\n end\n child = container.child(abspath, transparent: true)\n child.append(nonterminal)\n child.rewrite\n child\nend\nrewrite\n"}},{"html_id":"to_resolution_set(*,deps=Set(Resolution::Dependency).new,set=ResolutionSet.new)-instance-method","name":"to_resolution_set","doc":"Builds and returns a `ResolutionSet` with resolutions from\nthis container and all nested containers.\n\nYou must call this after `flatten!`. Otherwise, the resulting\n`ResolutionSet` will be underpopulated with dependencies due\nto transparent containers standing in the way.\n\n*deps* is a set of dependencies that *all* resolutions in the\nresulting set should have, regardless of nesting. *Beware that\nit is mutated.*","summary":"Builds and returns a ResolutionSet
with resolutions from this container and all nested containers.
Returns whether this container is transparent.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2037,"url":null},"def":{"name":"transparent?","return_type":"Bool","visibility":"Public","body":"@transparent"}}]},{"html_id":"novika/Novika/Resolver/RunnableDir","path":"Novika/Resolver/RunnableDir.html","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1279,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a directory in the file system. At this point it is still\nunknown whether the directory is a Novika library, application, or\nsimply that - a directory.\n\nRunnable directories get rewritten to `RunnableGroup`s, which are\naware of the presence or absence of manifest(s); and therefore,\nit is `RunnableGroup`s that know whether they are an app, lib,\nor simply a directory.","summary":"Represents a directory in the file system.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1282,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1286,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"group = RunnableGroup.allocate\nmanifest = Manifest.find(root.disk, @datum, ancestor: group)\ngroup.initialize(@datum, manifest, ancestor: @ancestor)\ncontainer.append(group)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1293,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Dir[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableEnvironment","path":"Novika/Resolver/RunnableEnvironment.html","kind":"class","full_name":"Novika::Resolver::RunnableEnvironment","name":"RunnableEnvironment","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1903,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika environment.","summary":"Represents a Novika environment.
","constructors":[{"html_id":"new(root:RunnableRoot,abspath:Path|Nil)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"args_string":"(root : RunnableRoot, abspath : Path | Nil)","args_html":"(root : RunnableRoot, abspath : Path | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1919,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, abspath)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(path:Path)-instance-method","name":"==","doc":"Returns whether *path* points to this environment's directory.","summary":"Returns whether path points to this environment's directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path)","args_html":"(path : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2006,"url":null},"def":{"name":"==","args":[{"name":"path","external_name":"path","restriction":"Path"}],"visibility":"Public","body":"@abspath == path"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if (value = @abspath).nil?\n ::raise(NilAssertionError.new(\"Novika::Resolver::RunnableEnvironment#abspath cannot be nil\"))\nelse\n value\nend"}},{"html_id":"abspath?:Path?-instance-method","name":"abspath?","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath?","visibility":"Public","body":"@abspath"}},{"html_id":"brief(dependency:Resolution::Dependency)-instance-method","name":"brief","doc":"Returns a brief description of *dependency* as per this environment.","summary":"Returns a brief description of dependency as per this environment.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency)","args_html":"(dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":1988,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"dependency.purpose(in: capabilities)"}},{"html_id":"capability?(datum:String):Bool-instance-method","name":"capability?","doc":"Returns whether *datum* is a capability in this environment's\ncapability collection.","summary":"Returns whether datum is a capability in this environment's capability collection.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"String"}],"args_string":"(datum : String) : Bool","args_html":"(datum : String) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1950,"url":null},"def":{"name":"capability?","args":[{"name":"datum","external_name":"datum","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"capabilities.has_capability?(datum)"}},{"html_id":"designate(set:ResolutionSet):Designation-instance-method","name":"designate","doc":"Creates and returns a `Designation` for this environment to\nhandle the given resolution *set*.","summary":"Creates and returns a Designation
for this environment to handle the given resolution set.
Expands datum in this environment's directory.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"args_string":"(datum : Path) : Path | Nil","args_html":"(datum : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1941,"url":null},"def":{"name":"expand?","args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif info = @root.disk.info?(abspath.expand(datum))\nelse\n return\nend\ninfo.path\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"includes?(path:Path):Bool-instance-method","name":"includes?","doc":"Returns whether *path* is part of this environment's subtree,\ni.e. is this environment directory's direct or indirect child.","summary":"Returns whether path is part of this environment's subtree, i.e.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Bool","args_html":"(path : Path) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1994,"url":null},"def":{"name":"includes?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Bool","visibility":"Public","body":"if abspath = @abspath\nelse\n return false\nend\nif abspath == path\n return true\nend\npath.each_parent do |parent|\n if parent == abspath\n return true\n end\nend\nfalse\n"}},{"html_id":"permissions(&:IO->)-instance-method","name":"permissions","doc":"Yields writable `IO` for the content of this environment's\npermissions file. Creates the latter if necessary. Previous\ncontent of the permissions file is cleared.","summary":"Yields writable IO
for the content of this environment's permissions file.
Returns the content of the permissions file of this environment followed by the file's path; or nil if the permissions file does not exist.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1963,"url":null},"def":{"name":"permissions?","return_type":"::Tuple(String, Path) | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif path = @root.disk.file?(abspath / PERMISSIONS_FILENAME)\nelse\n return\nend\n{@root.disk.read(path), path}\n"}},{"html_id":"request(dependency:Resolution::Dependency,forcontainer:RunnableContainer)-instance-method","name":"request","doc":"Emits a dependency request (see `Resolution::Dependency#request`)\nto the permission server of this environment.","summary":"Emits a dependency request (see Resolution::Dependency#request
) to the permission server of this environment.
Raised when there is an error during runnable resolution.
","constructors":[{"html_id":"new(message,runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(message, runnable : Runnable)","args_html":"(message, runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":104,"url":null},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message, runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"runnable:Novika::Resolver::Runnable-instance-method","name":"runnable","doc":"Returns the runnable which is assumed to be the source of\nthis error.","summary":"Returns the runnable which is assumed to be the source of this error.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":102,"url":null},"def":{"name":"runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableGroup","path":"Novika/Resolver/RunnableGroup.html","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1835,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable group is a directory with or without a manifest: that is,\na directory with awareness of whether it is an application, library,\nor simply that - a directory.\n\nRunnable groups, through manifests, are directories with a specific\nrunnable *layout*.\n\nRunnable groups are rewritten to properly ordered (laid out)\n`RunnableContainer`s.\n\nNow to the important bit: since there is never a guaranteed\nlink between a runnable group and the container it was/will\nbe rewritten to, you should manually register it with\n`RunnableRoot#assign` if you ever want the container to *run*.","summary":"A runnable group is a directory with or without a manifest: that is, a directory with awareness of whether it is an application, library, or simply that - a directory.
","constructors":[{"html_id":"new(datum:Path,manifest:Manifest,ancestor=nil)-class-method","name":"new","doc":"Creates a new runnable group.\n\n*manifest* is the manifest of this group. Manifests control\nthe order of runnables in this group.\n\n*datum* is a *normalized* path to the group (a directory).","summary":"Creates a new runnable group.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, manifest : Manifest, ancestor = nil)","args_html":"(datum : Path, manifest : Manifest, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1844,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, manifest, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns an absolute path to this group.","summary":"Returns an absolute path to this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1874,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: group datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"app?:Bool-instance-method","name":"app?","doc":"Returns whether this group represents an app (is laid out\naccording to a '.nk.app' manifest).","summary":"Returns whether this group represents an app (is laid out according to a '.nk.app' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1850,"url":null},"def":{"name":"app?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::App)"}},{"html_id":"entry_name:String-instance-method","name":"entry_name","doc":"Constructs and returns entry filename for this group.\n\nFor instance, if this group's directory is '/path/to/foo', then\nits entry filename will be 'foo.nk'.","summary":"Constructs and returns entry filename for this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1869,"url":null},"def":{"name":"entry_name","return_type":"String","visibility":"Public","body":"\"#{name}.nk\""}},{"html_id":"lib?:Bool-instance-method","name":"lib?","doc":"Returns whether this group represents a lib (is laid out\naccording to a '.nk.lib' manifest).","summary":"Returns whether this group represents a lib (is laid out according to a '.nk.lib' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1856,"url":null},"def":{"name":"lib?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::Lib)"}},{"html_id":"name:String-instance-method","name":"name","doc":"Returns the name of this group.","summary":"Returns the name of this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1861,"url":null},"def":{"name":"name","return_type":"String","visibility":"Public","body":"@datum.stem"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1880,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"child = container.child(@datum, transparent: true, ancestor: self)\ncontainer.append(child)\n@manifest.populate(root, child, origin: self)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1890,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"case\nwhen app?\n io << \"App\"\nwhen lib?\n io << \"Lib\"\nelse\n io << \"Group\"\nend\n((io << \"[\") << @datum) << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableIgnored","path":"Novika/Resolver/RunnableIgnored.html","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Lets signal receivers acknowledge that a runnable was ignored.","summary":"Lets signal receivers acknowledge that a runnable was ignored.
","constructors":[{"html_id":"new(runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"new","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@runnable.clone)"}},{"html_id":"copy_with(runnable_runnable=@runnable)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"args_string":"(runnable _runnable = @runnable)","args_html":"(runnable _runnable = @runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"copy_with","args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"visibility":"Public","body":"self.class.new(_runnable)"}},{"html_id":"runnable:Runnable-instance-method","name":"runnable","abstract":false,"def":{"name":"runnable","return_type":"Runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableQuery","path":"Novika/Resolver/RunnableQuery.html","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1051,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable queries are one of the most generic kinds of runnables.\nThey specialize themselves through `RunnableContainer#classify?`.","summary":"Runnable queries are one of the most generic kinds of runnables.
","constructors":[{"html_id":"new(datum:Path|String,ancestor=nil,else:Runnable|Nil=self)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"args_string":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","args_html":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","location":{"filename":"src/novika/resolver.cr","line_number":1054,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor, else)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1058,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if runnable = container.classify?(@datum, ancestor: self)\n container.append(runnable)\n return\nend\nif alt = @else\nelse\n return\nend\ncontainer.append(alt)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1069,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Query[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableRoot","path":"Novika/Resolver/RunnableRoot.html","kind":"class","full_name":"Novika::Resolver::RunnableRoot","name":"RunnableRoot","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2516,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable root is available to all containers, and therefore allows\nany runnable to escape deep nesting if need be.\n\nRunnable root stores a pointer to the `Disk` object, used throughout\nthe resolver to cache file system requests (the resolver is quite\nample in making them). It also stores the set of flags, which help\nmaking OS-specific decisions using flag conditions in manifests.\n\nAdditionally, runnable root allows runnables to `wish` queries\nto be resolved later, as requirements, and to talk to each other\nvia `Signal`s and the `SignalReceiver` interface (see `send`).\n\nThere's a lot more, but that's the gist.","summary":"Runnable root is available to all containers, and therefore allows any runnable to escape deep nesting if need be.
","constructors":[{"html_id":"new(disk:Disk,cwd:Path)-class-method","name":"new","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"args_string":"(disk : Disk, cwd : Path)","args_html":"(disk : Disk, cwd : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2525,"url":null},"def":{"name":"new","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"visibility":"Public","body":"_ = allocate\n_.initialize(disk, cwd)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"assign(group:RunnableGroup,*,container:RunnableContainer,overwrite=true):RunnableContainer-instance-method","name":"assign","doc":"Assigns *container* to the given *group*.\n\nThis is the only way someone from the outside can (reliably)\nget the container of a group.\n\n*overwrite* specifies whether the existing container for *group*\nshould be overwritten with *container*.\n\nReturns the container that was assigned to *group*.","summary":"Assigns container to the given group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"args_string":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","args_html":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2606,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"splat_index":1,"return_type":"RunnableContainer","visibility":"Public","body":"if overwrite\n @containers[group] = container\nelse\n @containers.put_if_absent(group, container)\nend"}},{"html_id":"assign(group:RunnableGroup,*,preamble:String)-instance-method","name":"assign","doc":"Assigns *preamble* to the given runnable *group*.","summary":"Assigns preamble to the given runnable group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(group : RunnableGroup, *, preamble : String)","args_html":"(group : RunnableGroup, *, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":2615,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"@preambles[group] = preamble"}},{"html_id":"containerof(group:RunnableGroup):RunnableContainer-instance-method","name":"containerof","doc":"Returns the container assigned to *group*.\n\nRaises if *group* is neither an application nor a library.","summary":"Returns the container assigned to group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer","args_html":"(group : RunnableGroup) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2622,"url":null},"def":{"name":"containerof","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer","visibility":"Public","body":"(containerof?(group)) || (raise(\"BUG: container was not assigned to #{group}\"))"}},{"html_id":"containerof?(group:RunnableGroup):RunnableContainer|Nil-instance-method","name":"containerof?","doc":"Returns the container of an application or library *group*, or\nnil if *group* is neither an application nor a library.","summary":"Returns the container of an application or library group, or nil if group is neither an application nor a library.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer | Nil","args_html":"(group : RunnableGroup) : RunnableContainer | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2628,"url":null},"def":{"name":"containerof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer | ::Nil","visibility":"Public","body":"@containers[group]?"}},{"html_id":"cwd:Path-instance-method","name":"cwd","doc":"Returns the user's current working directory. It is also\nsometimes referred to as the \"primary origin\", \"origin\" as\nin \"primary origin (source) of files\".","summary":"Returns the user's current working directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2523,"url":null},"def":{"name":"cwd","visibility":"Public","body":"@cwd"}},{"html_id":"default_env:RunnableEnvironment-instance-method","name":"default_env","doc":"Returns the default runnable environment.\n\nCurrently, current working directory environment is used as the\ndefault runnable environment.\n\nNote that if the current working directory does not have an\nenvironment, a \"virtual\", pathless environment is returned\n(see `defenv`).","summary":"Returns the default runnable environment.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2590,"url":null},"def":{"name":"default_env","return_type":"RunnableEnvironment","visibility":"Public","body":"@envs[nil]"}},{"html_id":"defenv(path:Path|Nil)-instance-method","name":"defenv","doc":"Returns the `RunnableEnvironment` for *path*, creating one if\nit does not exist.\n\nNote that *path* can be nil, which means the created/returned\nenvironment will be so to speak \"virtual\". The only difference\nbeing the \"virtual\" environment's response to disk-related\nquestions. Namely it'll answer does-not-exist (or something\nlike that) to any disk-related question.\n\nNote also, that only one pathless environment can ever created;\nas a consequence, all runnable containers that have no environments\nwill share one pathless runnable environment.","summary":"Returns the RunnableEnvironment
for path, creating one if it does not exist.
Marks query as explicit ("hand-written") within this runnable root.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2558,"url":null},"def":{"name":"defexplicit","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@explicit)\n return\nend\n@explicit << query\n"}},{"html_id":"disk:Novika::Resolver::Disk-instance-method","name":"disk","doc":"Returns the disk used by this runnable root.","summary":"Returns the disk used by this runnable root.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2518,"url":null},"def":{"name":"disk","visibility":"Public","body":"@disk"}},{"html_id":"each_set_flag(&:String->)-instance-method","name":"each_set_flag","doc":"Yields all set (true) flags.","summary":"Yields all set (true) flags.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2708,"url":null},"def":{"name":"each_set_flag","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(String ->)"},"visibility":"Public","body":"@flags.each do |flag|\n yield flag\nend"}},{"html_id":"each_wish(&:RunnableQuery->)-instance-method","name":"each_wish","doc":"Yields queries from this runnable root's wishlist of queries.\n\nSee `wish`.","summary":"Yields queries from this runnable root's wishlist of queries.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2550,"url":null},"def":{"name":"each_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishes.each do |wish|\n yield wish\nend"}},{"html_id":"new_primary_container:RunnableContainer-instance-method","name":"new_primary_container","doc":"Creates and returns a new primary `RunnableContainer`.","summary":"Creates and returns a new primary RunnableContainer
.
Returns the preamble of group, or nil if it has none.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : String | Nil","args_html":"(group : RunnableGroup) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2633,"url":null},"def":{"name":"preambleof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"String | ::Nil","visibility":"Public","body":"@preambles[group]?"}},{"html_id":"send(signal:Signal)-instance-method","name":"send","doc":"Sends *signal* to all `SignalReceiver`s subscribed to this\nrunnable root.","summary":"Sends signal to all SignalReceiver
s subscribed to this runnable root.
Creates and returns a permission server in the given runnable environment env and capability collection caps.
","abstract":false,"args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"args_string":"(to env : RunnableEnvironment) : PermissionServer","args_html":"(to env : RunnableEnvironment) : PermissionServer","location":{"filename":"src/novika/resolver.cr","line_number":2662,"url":null},"def":{"name":"serve_permissions","args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"return_type":"PermissionServer","visibility":"Public","body":"(PermissionServer.new(env, @explicit)).tap do |server|\n subscribe(server)\nend"}},{"html_id":"set_flag(name:String,state:Bool)-instance-method","name":"set_flag","doc":"Assigns *state* to a boolean flag with the given *name*.\n\nNote that by design, an unset flag is a false flag, and\nvice versa: if *state* is false, the flag is either not\ncreated, or removed.\n\n```\nroot.set_flag(\"happy\", true)\nroot.set_flag(\"sad\", false)\n```","summary":"Assigns state to a boolean flag with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"args_string":"(name : String, state : Bool)","args_html":"(name : String, state : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2694,"url":null},"def":{"name":"set_flag","args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"visibility":"Public","body":"if state\n @flags << name\n return\nend\nif name.in?(@flags)\n @flags.delete(name)\nend\n"}},{"html_id":"subscribe(receiver:SignalReceiver)-instance-method","name":"subscribe","doc":"Subscribes *receiver* to this runnable root.","summary":"Subscribes receiver to this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2640,"url":null},"def":{"name":"subscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers << receiver"}},{"html_id":"unsubscribe(receiver:SignalReceiver)-instance-method","name":"unsubscribe","doc":"Unsubscribes *receiver* from this runnable root.","summary":"Unsubscribes receiver from this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2645,"url":null},"def":{"name":"unsubscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers.delete(receiver)"}},{"html_id":"wish(query:RunnableQuery)-instance-method","name":"wish","doc":"Appends *query* to the wishlist of this runnable root (the\nwishlist is like \"outbound queries\" or \"preload requests\").\n\nWishes are picked up from the wishlist by outer infrastructure\nand loaded distinctly. The only guarantee is that they will\nindeed be *pre*loaded relative to the query that made the wish,\nmeaning loaded some time before it.\n\nDoes nothing if *query* is already in the wishlist.","summary":"Appends query to the wishlist of this runnable root (the wishlist is like "outbound queries" or "preload requests").
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2541,"url":null},"def":{"name":"wish","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@wishes)\n return\nend\n@wishes << query\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableScript","path":"Novika/Resolver/RunnableScript.html","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".nk\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika script, specifically a '.nk' file.","summary":"Represents a Novika script, specifically a '.nk' file.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1251,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path to this script.","summary":"Returns the absolute path to this script.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1256,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: script datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1262,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << \"Script[\") << @datum\neach_ancestor do |ancestor|\n (io << \" ← \") << ancestor\nend\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableSelector","path":"Novika/Resolver/RunnableSelector.html","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1076,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selectors match, and are rewritten to, file system entries in the\ndirectory of the container that is doing the rewriting.","summary":"Selectors match, and are rewritten to, file system entries in the directory of the container that is doing the rewriting.
","constructors":[{"html_id":"new(datum:Novika::Resolver::GlobSelector,reject:Set(String)=Set(String).new,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","args_html":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1079,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, reject, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1083,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.each_sorted_path(@datum) do |path|\n basename = path.basename\n if basename.in?(@reject)\n next\n end\n if basename.starts_with?('_')\n next\n end\n case @datum\n in .scripts?\n if path.extension == RunnableScript::EXTENSION\n else\n next\n end\n runnable = RunnableScript.new(path, ancestor: self)\n in .directories?\n runnable = RunnableDir.new(path, ancestor: self)\n if basename == \"core\"\n container.prepend(runnable)\n next\n end\n end\n container.append(runnable)\nend"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1108,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"Forall[\") << @datum) << \" ∉ {\") << (@reject.join(','))) << \"}]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","path":"Novika/Resolver/RunnableSharedObject.html","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1178,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".so\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable representation of a shared object. Shared objects are\naccessed via FFI Novika-side.","summary":"Runnable representation of a shared object.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1194,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1208,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"id-instance-method","name":"id","doc":"Returns the id of this shared object.\n\nThe id is made by taking the stem of the path to the object and\nstripping it of the lib prefix, if it has one. For example, given\n`/lib/libmath.so` or `/lib/math.so`, the id would be `math` in\nboth cases.","summary":"Returns the id of this shared object.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1204,"url":null},"def":{"name":"id","visibility":"Public","body":"@datum.stem.lchop(\"lib\")"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1222,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"shared object #{@datum.colorize.bold}\""}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1214,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted shared object\")\nend\n{envelope.abspath.to_s, @datum.to_s}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1233,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"SharedObject[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/ScriptsSlot","path":"Novika/Resolver/ScriptsSlot.html","kind":"class","full_name":"Novika::Resolver::ScriptsSlot","name":"ScriptsSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1336,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts\" in the container's directory, represented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts" in the container's directory, represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1337,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\nroot.disk.glob(manifest.directory, GlobSelector::Scripts) do |datum|\n if datum.in?(mentioned)\n next\n end\n content.append(RunnableScript.new(datum, ancestor: self))\nend\ncontainer.replace(self, content)\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1361,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[*]\""}}]},{"html_id":"novika/Novika/Resolver/Session","path":"Novika/Resolver/Session.html","kind":"class","full_name":"Novika::Resolver::Session","name":"Session","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A resolver session interacts with a `RunnableRoot` in a way that\nallows you to *query*. Querying is done by `push`ing some queries,\nand then `pop`ping them \"into\" a `Response` object which you should\ncreate beforehand, and which you own.\n\n```\nsession = Resolver::Session.new(root)\nsession.push(\"foo\")\nsession.push(\"bar\")\nsession.push(\"baz\")\n\nresponse1 = Resolver::Response.new\nsession.pop(response1)\n\n# Re-use the same session. Queries were popped, so the session\n# is clean.\nsession.push(\"xyzzy\")\nsession.push(\"byzzy\")\n\nresponse2 = Resolver::Response.new\nsession.pop(response2)\n\n# Run the accepted stuff from the responses...\nresponse1.accepted_set.each_designation(root, &.run)\nresponse2.accepted_set.each_designation(root, &.run)\n```","summary":"A resolver session interacts with a RunnableRoot
in a way that allows you to query.
Yields only those queries from the query list that were marked as explicit.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2999,"url":null},"def":{"name":"each_explicit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@explicit.each do |query|\n yield query\nend"}},{"html_id":"each_query(&:RunnableQuery->)-instance-method","name":"each_query","doc":"Yields all queries from the query list.","summary":"Yields all queries from the query list.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3006,"url":null},"def":{"name":"each_query","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@queries.each do |query|\n yield query\nend"}},{"html_id":"on_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2981,"url":null},"def":{"name":"on_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"on_container_rewritten(callback)"}},{"html_id":"on_container_rewritten(callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"args_string":"(callback : RunnableContainer -> )","args_html":"(callback : RunnableContainer -> )","location":{"filename":"src/novika/resolver.cr","line_number":2986,"url":null},"def":{"name":"on_container_rewritten","args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"visibility":"Public","body":"@on_container_rewritten << callback"}},{"html_id":"pop(response:Response):ResolutionSet-instance-method","name":"pop","doc":"Resolves the list of queries that were `push`ed, returns the single\nresolution set comprised of resolutions for those queries that\nwere accepted by the resolver.\n\nAlso fills *response*, see `Response` for what you can get out of it.","summary":"Resolves the list of queries that were #push
ed, returns the single resolution set comprised of resolutions for those queries that were accepted by the resolver.
Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : RunnableQuery, explicit = false)","args_html":"(query : RunnableQuery, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3013,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries << query\nif explicit\n @explicit << query\nend\n"}},{"html_id":"push(query:Query,explicit=false)-instance-method","name":"push","doc":"Appends *query* to the list of queries to be resolved during\nthis session; allows to mark it as *explicit* (\"hand-written\")\nif necessary.","summary":"Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : Query, explicit = false)","args_html":"(query : Query, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3019,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(RunnableQuery.new(query), explicit)"}},{"html_id":"push(queries:Array(RunnableQuery),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(RunnableQuery), explicit = false)","args_html":"(queries : Array(RunnableQuery), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3026,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries.concat(queries)\nif explicit\n @explicit.concat(queries)\nend\n"}},{"html_id":"push(queries:Array(Query)|Array(String)|Array(Path),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","args_html":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3032,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(queries.map do |query|\n RunnableQuery.new(query)\nend, explicit)"}}]},{"html_id":"novika/Novika/Resolver/Signal","path":"Novika/Resolver/Signal.html","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":57,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/DoDiskLoad","kind":"struct","full_name":"Novika::Resolver::DoDiskLoad","name":"DoDiskLoad"},{"html_id":"novika/Novika/Resolver/DoDiskSave","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave"},{"html_id":"novika/Novika/Resolver/RunnableIgnored","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored"},{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"},{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of signals received by `SignalReceiver`s","summary":"Base class of signals received by SignalReceiver
s
SignalReceiver
s can receive signals sent by the RunnableRoot
.
Receives and reacts to a signal sent by RunnableRoot
.
Base class of ScriptsSlot
(known to the user as *
), SubtreeSlot
(known to the user as **
), and ChildSlot
(<>
).
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1325,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/SubtreeSlot","path":"Novika/Resolver/SubtreeSlot.html","kind":"class","full_name":"Novika::Resolver::SubtreeSlot","name":"SubtreeSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1370,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts and directories in the subtree (recursively),\nexcept for Novika application and library directories\",\nrepresented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts and directories in the subtree (recursively), except for Novika application and library directories", represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1371,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\ncontent.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.replace(self, content)\nmanifest.layout(content, group)\ncontent.rewrite\ncontent.recursive_select! do |runnable|\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableContainer)\n else\n next false\n end\n !(runnable.abspath.in?(mentioned))\nend\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1416,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[**]\""}}]},{"html_id":"novika/Novika/Resolver/ToAnswerDo","path":"Novika/Resolver/ToAnswerDo.html","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":80,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to answer a question, gives them\na Proc which will allow them to do that.","summary":"If signal receivers want to answer a question, gives them a Proc which will allow them to do that.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAnswerDo/Fn","path":"Novika/Resolver/ToAnswerDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAnswerDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":81,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, Nil)","aliased_html":"String -> Nil","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"}}]},{"html_id":"novika/Novika/Resolver/ToAskDo","path":"Novika/Resolver/ToAskDo.html","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":74,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to ask a question, gives them\na Proc which will do that and return a string answer, or\nnil if the user discarded the question.","summary":"If signal receivers want to ask a question, gives them a Proc which will do that and return a string answer, or nil if the user discarded the question.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAskDo/Fn","path":"Novika/Resolver/ToAskDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAskDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":75,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, (String | Nil))","aliased_html":"String -> String?","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}}]}]},{"html_id":"novika/Novika/RunnableResolver","path":"Novika/RunnableResolver.html","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3095,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A very high-level interface to the Novika resolver. Designed as one-\nshot, meaning you shouldn't reuse the same object twice or call\n`resolve?` twice. In this regard, as a protection, calling `resolve?`\ntwice will raise.\n\nSee `Session` and `Response` if you want a lower-level interface.\n\n```\nresolver = Novika::RunnableResolver.new(cwd: Path[Dir.current], args: [\"repl\"])\n\n# Define 'gets' and 'print' to ask for permissions.\n\nresolver.on_permissions_gets do |string|\n print string\n gets\nend\n\nresolver.on_permissions_print do |string|\n print string\nend\n\n# Run \"repl\" and everything it requested.\n\nresolver.after_permissions(&.run)\nresolver.resolve?\n```","summary":"A very high-level interface to the Novika resolver.
","constructors":[{"html_id":"new(cwd:Path,args:Array(Query))-class-method","name":"new","doc":"Creates a new resolver for the given current working directory\n*cwd* and query arguments *args*.\n\nSee `RunnableResolver`.","summary":"Creates a new resolver for the given current working directory cwd and query arguments args.
","abstract":false,"args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"args_string":"(cwd : Path, args : Array(Query))","args_html":"(cwd : Path, args : Array(Query))","location":{"filename":"src/novika/resolver.cr","line_number":3166,"url":null},"def":{"name":"new","args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(cwd, args)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"after_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"after_container_rewritten","doc":"Called when some container under this resolver was thoroughly rewritten.\n\nYou'll have to do additional checks to figure out where the\ncontainer came from. This is mainly an inspection method.","summary":"Called when some container under this resolver was thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3210,"url":null},"def":{"name":"after_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"@session.on_container_rewritten(callback)"}},{"html_id":"after_permissions(&callback:PermissionsHook->)-instance-method","name":"after_permissions","doc":"Registers *callback* to run after a valid Novika program is formed,\nand permissions are given.","summary":"Registers callback to run after a valid Novika program is formed, and permissions are given.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3245,"url":null},"def":{"name":"after_permissions","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(PermissionsHook ->)"},"visibility":"Public","body":"@after_permissions << callback"}},{"html_id":"after_program(&callback:ProgramHook->)-instance-method","name":"after_program","doc":"Registers *callback* to run after a valid Novika program is formed.\nSee `ProgramHook` to learn what is considered a Novika program.","summary":"Registers callback to run after a valid Novika program is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3231,"url":null},"def":{"name":"after_program","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ProgramHook ->)"},"visibility":"Public","body":"@after_program << callback"}},{"html_id":"after_response(&callback:ResponseHook->)-instance-method","name":"after_response","doc":"Registers *callback* to run after a valid response is formed.","summary":"Registers callback to run after a valid response is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3217,"url":null},"def":{"name":"after_response","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ResponseHook ->)"},"visibility":"Public","body":"@after_response << callback"}},{"html_id":"argument?(query:RunnableQuery)-instance-method","name":"argument?","doc":"Returns whether *query* was passed as an argument to this resolver.","summary":"Returns whether query was passed as an argument to this resolver.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":3193,"url":null},"def":{"name":"argument?","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"@args.any?(&.same?(query))"}},{"html_id":"on_permissions_gets(&on_permissions_gets:String->String|Nil)-instance-method","name":"on_permissions_gets","doc":"Registers a handler for permissions `gets`. Overrides the previous\nhandler, if any.","summary":"Registers a handler for permissions gets
.
Registers a handler for permissions print
.
Performs resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3296,"url":null},"def":{"name":"resolve?","return_type":"Bool","visibility":"Public","body":"if @resolved\n raise(\"BUG: attempt to RunnableResolver#resolve? twice\")\nend\nif @args.empty?\n manifest = Manifest.find(@root.disk, @cwd)\n if resolve_cwd?(manifest)\n else\n return false\n end\nelse\n sched?(@args, explicit: true)\nend\nif @response.successful?\nelse\n raise(ResponseRejectedError.new(@response))\nend\non_response(@response)\nprogram = @response.accepted_set\napps = program.unique_apps\nif apps.size > 1\n raise(MoreThanOneAppError.new(apps))\nend\non_program(program)\n@root.send(DoDiskLoad.new)\n@root.send(ToAskDo.new(@on_permissions_gets))\n@root.send(ToAnswerDo.new(@on_permissions_print))\nprogram.each_unique_dependency_with_dependents do |dependency, dependents|\n skiplist = Set(Resolution).new\n visited = Set(RunnableGroup).new\n dependents.each_group do |group, resolution|\n if group.app? || group.lib?\n else\n next\n end\n if group.in?(visited)\n skiplist << resolution\n next\n end\n container = @root.containerof(group)\n container.request(dependency)\n visited << group\n skiplist << resolution\n end\n dependents.each do |resolution|\n if resolution.in?(skiplist)\n next\n end\n resolution.each_dependency(&.allow)\n end\nend\n@root.send(DoDiskSave.new)\non_permissions(program)\n@resolved = true\ntrue\n"}}],"types":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","path":"Novika/RunnableResolver/PermissionsHook.html","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook","abstract":false,"superclass":{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},"ancestors":[{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"Same as `ProgramHook` but also allows you to run the program.","summary":"Same as ProgramHook
but also allows you to run the program.
Returns the list of designations in the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3145,"url":null},"def":{"name":"designations","return_type":"Array(Designation)","visibility":"Public","body":"designations = [] of Designation\n@program.each_designation(@root) do |designation|\n designations << designation\nend\ndesignations\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the program.","summary":"Runs the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3154,"url":null},"def":{"name":"run","visibility":"Public","body":"@program.each_designation(@root, &.run)"}}]},{"html_id":"novika/Novika/RunnableResolver/ProgramHook","path":"Novika/RunnableResolver/ProgramHook.html","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3127,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook"}],"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"An object that helps you do high-level things with a `ResolutionSet`\nfor the entire *program*.\n\nA Novika program is basically a collection of properly arranged\nNovika scripts. This is represented by a single `ResolutionSet`,\nwhich is an ordered set. It being a set means that you cannot\nexecute a single script twice in one session of the resolver,\nthat is, globally.","summary":"An object that helps you do high-level things with a ResolutionSet
for the entire program.
Makes and yields designations for the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3137,"url":null},"def":{"name":"each_designation","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"@program.each_designation(@root) do |designation|\n yield designation\nend"}},{"html_id":"program:Novika::Resolver::ResolutionSet-instance-method","name":"program","doc":"Returns the program `ResolutionSet`.","summary":"Returns the program ResolutionSet
.
An object that helps you do high-level things with a Response
.
Yields preambles of apps and libs that were queried for in arguments to RunnableResolver#new
specifically, followed by their corresponding runnable groups.
Returns the Response
object.
Marks this object as schedulable in Engine
.
Safe #schedule
.
Unsafe #schedule
.
The includer should be a Form
.
Scissors deal with cutting a source string into fragments, known as unclassified forms.
","class_methods":[{"html_id":"cut(source:String,&:Int32,Int32,Int32|Nil->)-class-method","name":"cut","doc":"Cuts *source* into a series of *unclassified forms*; yields\nstart byte index and byte length of each to the block.","summary":"Cuts source into a series of unclassified forms; yields start byte index and byte length of each to the block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String, & : Int32, Int32, Int32 | Nil -> )","args_html":"(source : String, & : Int32, Int32, Int32 | Nil -> )","location":{"filename":"src/novika/scissors.cr","line_number":215,"url":null},"def":{"name":"cut","args":[{"name":"source","external_name":"source","restriction":"String"}],"yields":3,"block_arity":3,"block_arg":{"name":"","external_name":"","restriction":"(Int32, Int32, Int32 | ::Nil ->)"},"visibility":"Public","body":"slicer = new(source)\nslicer.each do |start, count, dot|\n yield start, count, dot\nend\n"}}],"constructors":[{"html_id":"new(source:String)-class-method","name":"new","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String)","args_html":"(source : String)","location":{"filename":"src/novika/scissors.cr","line_number":14,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"each(&)-instance-method","name":"each","doc":"Cuts the source string into a series of *unclassified forms*;\nyields start byte index, byte length, and first dot `'.'` byte\nindex of each to the block.\n\nDot byte index is yielded to save an O(N) search, which would\nbe otherwise required since '.' is handled specially by several\nforms in Novika.","summary":"Cuts the source string into a series of unclassified forms; yields start byte index, byte length, and first dot '.'
byte index of each to the block.
Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::SmallDecimalSnapshot]","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: value, cls: Int64, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":140,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.value = form.to_i64\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":131,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":136,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(value)"}},{"html_id":"value:Int64-instance-method","name":"value","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"def":{"name":"value","return_type":"Int64","visibility":"Public","body":"@value"}},{"html_id":"value=(value:Int64)-instance-method","name":"value=","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Int64"}],"args_string":"(value : Int64)","args_html":"(value : Int64)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"Int64"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Snapshot","path":"Novika/Snapshot.html","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot","abstract":true,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":38,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"system\"]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::Snapshot]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"PARTS","name":"PARTS","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"}],"subclasses":[{"html_id":"novika/Novika/BlockRefSnapshot","kind":"class","full_name":"Novika::BlockRefSnapshot","name":"BlockRefSnapshot"},{"html_id":"novika/Novika/BooleanSnapshot","kind":"class","full_name":"Novika::BooleanSnapshot","name":"BooleanSnapshot"},{"html_id":"novika/Novika/BuiltinSnapshot","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot"},{"html_id":"novika/Novika/BytesliceSnapshot","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot"},{"html_id":"novika/Novika/ColorSnapshot","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot"},{"html_id":"novika/Novika/LargeDecimalSnapshot","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot"},{"html_id":"novika/Novika/QuotedWordSnapshot","kind":"class","full_name":"Novika::QuotedWordSnapshot","name":"QuotedWordSnapshot"},{"html_id":"novika/Novika/QuoteSnapshot","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot"},{"html_id":"novika/Novika/SmallDecimalSnapshot","kind":"class","full_name":"Novika::SmallDecimalSnapshot","name":"SmallDecimalSnapshot"},{"html_id":"novika/Novika/WordSnapshot","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"to_form(assembler:BlockAssembler)-instance-method","name":"to_form","doc":"Converts this snapshot to the corresponding form.","summary":"Converts this snapshot to the corresponding form.
","abstract":true,"args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"args_string":"(assembler : BlockAssembler)","args_html":"(assembler : BlockAssembler)","location":{"filename":"src/novika/image.cr","line_number":40,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"visibility":"Public","body":""}}],"macros":[{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/SnapshotType","path":"Novika/SnapshotType.html","kind":"enum","full_name":"Novika::SnapshotType","name":"SnapshotType","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Word","name":"Word","value":"0_u8"},{"id":"BlockRef","name":"BlockRef","value":"1_u8"},{"id":"SmallDecimal","name":"SmallDecimal","value":"2_u8"},{"id":"LargeDecimal","name":"LargeDecimal","value":"3_u8"},{"id":"Quote","name":"Quote","value":"4_u8"},{"id":"QuotedWord","name":"QuotedWord","value":"5_u8"},{"id":"Boolean","name":"Boolean","value":"6_u8"},{"id":"Color","name":"Color","value":"7_u8"},{"id":"Builtin","name":"Builtin","value":"8_u8"},{"id":"Byteslice","name":"Byteslice","value":"9_u8"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds the type of a snapshot.\n\nMembers are sorted by their frequency in code (eyeballed),\nnot to say that it matters.","summary":"Holds the type of a snapshot.
","instance_methods":[{"html_id":"block_ref?-instance-method","name":"block_ref?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":13,"url":null},"def":{"name":"block_ref?","visibility":"Public","body":"self == BlockRef"}},{"html_id":"boolean?-instance-method","name":"boolean?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":18,"url":null},"def":{"name":"boolean?","visibility":"Public","body":"self == Boolean"}},{"html_id":"builtin?-instance-method","name":"builtin?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":20,"url":null},"def":{"name":"builtin?","visibility":"Public","body":"self == Builtin"}},{"html_id":"byteslice?-instance-method","name":"byteslice?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":21,"url":null},"def":{"name":"byteslice?","visibility":"Public","body":"self == Byteslice"}},{"html_id":"color?-instance-method","name":"color?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":19,"url":null},"def":{"name":"color?","visibility":"Public","body":"self == Color"}},{"html_id":"large_decimal?-instance-method","name":"large_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":15,"url":null},"def":{"name":"large_decimal?","visibility":"Public","body":"self == LargeDecimal"}},{"html_id":"quote?-instance-method","name":"quote?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":16,"url":null},"def":{"name":"quote?","visibility":"Public","body":"self == Quote"}},{"html_id":"quoted_word?-instance-method","name":"quoted_word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":17,"url":null},"def":{"name":"quoted_word?","visibility":"Public","body":"self == QuotedWord"}},{"html_id":"small_decimal?-instance-method","name":"small_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":14,"url":null},"def":{"name":"small_decimal?","visibility":"Public","body":"self == SmallDecimal"}},{"html_id":"word?-instance-method","name":"word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":12,"url":null},"def":{"name":"word?","visibility":"Public","body":"self == Word"}}]},{"html_id":"novika/Novika/StructLayoutForm","path":"Novika/StructLayoutForm.html","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin form wrapper around `FFI::StructLayout`. Lazily parses\na struct layout definition and keeps the corresponding\n`FFI::StructLayout` in sync.","summary":"A thin form wrapper around FFI::StructLayout
.
Initializes a struct layout form.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","args_html":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":250,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, names, types, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(layout:Novika::FFI::StructLayout,comment:Nil|String)-class-method","name":"new","doc":"Initializes a struct layout form from the given *layout*.\nThe layout must contain at least one field.","summary":"Initializes a struct layout form from the given layout.
","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","args_html":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":295,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if layout == other.layout\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":287,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@comment ? io << @comment : to_s(io)"}},{"html_id":"layout(outerset=nil)-instance-method","name":"layout","doc":"Returns the underlying layout.","summary":"Returns the underlying layout.
","abstract":false,"args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"args_string":"(outerset = nil)","args_html":"(outerset = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":268,"url":null},"def":{"name":"layout","args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"visibility":"Public","body":"if @layout.field_count > 0 || outerset.try(&.includes?(object_id))\n return @layout\nend\nif this = @this\nelse\n return @layout\nend\nif names = @names\nelse\n return @layout\nend\nif types = @types\nelse\n return @layout\nend\nnames.zip(types) do |name, typename|\n parser = StructLayoutParser.new(this, typename, name, self, outerset)\n @layout.add(name.id, parser.parse)\nend\n@layout\n"}},{"html_id":"object_id(*args,**options)-instance-method","name":"object_id","doc":"Since `StructLayoutForm` is a struct, it doesn't have its own\nobject id, and instead borrows it from the names array, which\nis assumed to be created personally for this struct layout form.","summary":"Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Parses types in struct layouts.
","constructors":[{"html_id":"new(this,typename,field:Word,current:StructLayoutForm,outerset:Set(UInt64)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"args_string":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","args_html":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":171,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename, field, current, outerset)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":219,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).inline\n"}},{"html_id":"on_struct_reference(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":225,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"add_to_outerset\n(form.layout(@outerset)).reference\n"}},{"html_id":"on_union(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":213,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).union\n"}}]},{"html_id":"novika/Novika/StructViewForm","path":"Novika/StructViewForm.html","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":85,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::StructView` and its descendants.\n\nThis form is a readable and submittable store, which means you\ncan read (e.g. `entry:fetch`) and submit (e.g. `entry:submit`)\nto exsisting entries.","summary":"A thin wrapper around FFI::StructView
and its descendants.
Returns whether this and other struct views are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":162,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @view == (other.@view)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"view.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"view.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":151,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":108,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"if name.is_a?(Word)\n @view[name.id]?.try(&.to_form?)\nend"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":104,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Word) ? @view.has_field?(name.id) : false"}},{"html_id":"inline?-instance-method","name":"inline?","doc":"Returns whether this view is an inline struct view.","summary":"Returns whether this view is an inline struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":138,"url":null},"def":{"name":"inline?","visibility":"Public","body":"view.is_a?(FFI::InlineStructView)"}},{"html_id":"layout:StructLayoutForm-instance-method","name":"layout","doc":"Returns the struct layout of the underlying struct view.","summary":"Returns the struct layout of the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":100,"url":null},"def":{"name":"layout","return_type":"StructLayoutForm","visibility":"Public","body":"StructLayoutForm.new(view.layout, comment: nil)"}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":120,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\nfalse\n"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":126,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\ntrue\n"}},{"html_id":"reference?-instance-method","name":"reference?","doc":"Returns whether this view is a struct reference view.","summary":"Returns whether this view is a struct reference view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":133,"url":null},"def":{"name":"reference?","visibility":"Public","body":"view.is_a?(FFI::StructReferenceView)"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/foreign.cr","line_number":112,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if name.is_a?(Word)\nelse\n return\nend\n(@view.layout.desc?(name.id)).try do |desc|\n @view[name.id] = desc.type.from(form)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":155,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << @view"}},{"html_id":"union?-instance-method","name":"union?","doc":"Returns whether this view is a union view.","summary":"Returns whether this view is a union view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":143,"url":null},"def":{"name":"union?","visibility":"Public","body":"view.is_a?(FFI::UnionView)"}},{"html_id":"view:FFI::StructView-instance-method","name":"view","doc":"Returns the underlying struct view.","summary":"Returns the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":91,"url":null},"def":{"name":"view","return_type":"FFI::StructView","visibility":"Public","body":"@view"}}]},{"html_id":"novika/Novika/Substrate","path":"Novika/Substrate.html","kind":"module","full_name":"Novika::Substrate(T)","name":"Substrate","abstract":false,"locations":[{"filename":"src/novika/substrate.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Substrate is a fast, low-level copy-on-write wrapper for\nan array.","summary":"Substrate is a fast, low-level copy-on-write wrapper for an array.
","class_methods":[{"html_id":"[]-class-method","name":"[]","doc":"Initializes an empty substrate.","summary":"Initializes an empty substrate.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":19,"url":null},"def":{"name":"[]","visibility":"Public","body":"RealSubstrate(T).new"}},{"html_id":"[](*elements)-class-method","name":"[]","doc":"Initializes a substrate with *elements*.","summary":"Initializes a substrate with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/substrate.cr","line_number":24,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"for(elements.to_a)"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Initializes a substrate with *elements* as the underlying array.","summary":"Initializes a substrate with elements as the underlying array.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"args_string":"(elements : Array(T))","args_html":"(elements : Array(T))","location":{"filename":"src/novika/substrate.cr","line_number":29,"url":null},"def":{"name":"for","args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"visibility":"Public","body":"RealSubstrate.new(elements)"}}],"instance_methods":[{"html_id":"==(other)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/substrate.cr","line_number":96,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"other.is_a?(Substrate) && (array == other.array)"}},{"html_id":"at!(index)-instance-method","name":"at!","doc":"Unsafely fetches the element at *index*.","summary":"Unsafely fetches the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":37,"url":null},"def":{"name":"at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"array.unsafe_fetch(index)"}},{"html_id":"at?(index)-instance-method","name":"at?","doc":"Returns the element at *index*. Returns nil if *index* is\nout of bounds, i.e., *not* in `0 <= index < count`.","summary":"Returns the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":48,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if index.in?(0...count)\n at!(index)\nend"}},{"html_id":"copy-instance-method","name":"copy","doc":"Returns a copy of this substrate.","summary":"Returns a copy of this substrate.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":79,"url":null},"def":{"name":"copy","visibility":"Public","body":""}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of elements in the array.","summary":"Returns the amount of elements in the array.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":42,"url":null},"def":{"name":"count","visibility":"Public","body":"array.size"}},{"html_id":"delete?(atindex)-instance-method","name":"delete?","doc":"Deletes the element at *index*. Returns nil if *index* is\nout of bounds (see `at?`).","summary":"Deletes the element at index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""}],"args_string":"(at index)","args_html":"(at index)","location":{"filename":"src/novika/substrate.cr","line_number":73,"url":null},"def":{"name":"delete?","args":[{"name":"index","external_name":"at","restriction":""}],"visibility":"Public","body":""}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"Same as `Array#each`.","summary":"Same as Array#each
.
Same as Array#each
.
Adds element before index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"args_string":"(at index, element)","args_html":"(at index, element)","location":{"filename":"src/novika/substrate.cr","line_number":69,"url":null},"def":{"name":"insert?","args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":""}},{"html_id":"map!(&:T->T|Nil)-instance-method","name":"map!","doc":"Replaces elements of this substrate with the result of the\nblock. If the result is nil, leaves the original element.","summary":"Replaces elements of this substrate with the result of the block.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":90,"url":null},"def":{"name":"map!","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> T | ::Nil)"},"visibility":"Public","body":""}},{"html_id":"slice_at!(index)-instance-method","name":"slice_at!","doc":"Splits this substrate in two at *index*. Returns the two\nresulting substrates.\n\nThis method is unsafe: it does not check whether *index*\nis in bounds.","summary":"Splits this substrate in two at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":57,"url":null},"def":{"name":"slice_at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"lhs = Array(T).new(index) do |i|\n at!(i)\nend\nrhs = Array(T).new(count - index) do |j|\n at!(index + j)\nend\n{RealSubstrate.new(lhs), RealSubstrate.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"Sorts elements of this substrate inplace, using a *cmp*\ncomparator proc for comparing two elements.","summary":"Sorts elements of this substrate inplace, using a cmp comparator proc for comparing two elements.
","abstract":true,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/substrate.cr","line_number":94,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":""}},{"html_id":"unsafe_paste(other:Substrate(T),index,other_start,other_insert_count)-instance-method","name":"unsafe_paste","doc":"Pastes *count* elements of other starting at *b*egin, to\n*dest* index in self, without doing any checks whatsoever.\n\nA lot of undefined behavior unless you are sure all\nnumbers are good.","summary":"Pastes count elements of other starting at begin, to dest index in self, without doing any checks whatsoever.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"args_string":"(other : Substrate(T), index, other_start, other_insert_count)","args_html":"(other : Substrate(T), index, other_start, other_insert_count)","location":{"filename":"src/novika/substrate.cr","line_number":86,"url":null},"def":{"name":"unsafe_paste","args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Tape","path":"Novika/Tape.html","kind":"struct","full_name":"Novika::Tape(T)","name":"Tape","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/tape.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A `Substrate` with an integer cursor.","summary":"A Substrate
with an integer cursor.
Initializes a tape with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/tape.cr","line_number":23,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"Tape.new(Substrate[*elements])"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Creates a tape from an existing array of *elements*, which\nwill be used as the underlying container for `Substrate`.\nThis means that all mutations of substrate will be performed\non the *elements* array, and vice versa.","summary":"Creates a tape from an existing array of elements, which will be used as the underlying container for Substrate
.
Adds element before the cursor, and advances the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":57,"url":null},"def":{"name":"add","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor + 1)"}},{"html_id":"at!(*args,**options)-instance-method","name":"at!","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
Returns a shallow copy of this tape.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":133,"url":null},"def":{"name":"copy","visibility":"Public","body":"Tape.new(substrate.copy, cursor)"}},{"html_id":"count(*args,**options)-instance-method","name":"count","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Returns the cursor position.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":9,"url":null},"def":{"name":"cursor","return_type":"Int32","visibility":"Public","body":"@cursor"}},{"html_id":"drop?-instance-method","name":"drop?","doc":"Removes the element before the cursor, and moves the cursor\nback once. Returns the resulting tape.","summary":"Removes the element before the cursor, and moves the cursor back once.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":82,"url":null},"def":{"name":"drop?","visibility":"Public","body":"Tape.new((substrate.delete?(cursor - 1)) || (return), cursor - 1)"}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Drops and returns the element after cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":92,"url":null},"def":{"name":"eject?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new((substrate.delete?(cursor)).not_nil!, cursor), element}\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this tape is empty (has no elements).","summary":"Returns whether this tape is empty (has no elements).
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":31,"url":null},"def":{"name":"empty?","visibility":"Public","body":"count.zero?"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Adds element after cursor without moving the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":87,"url":null},"def":{"name":"inject","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor)"}},{"html_id":"map!(&)-instance-method","name":"map!","doc":"See `Substrate#map!`.","summary":"See Substrate#map!
.
Fetches the top element, and advances the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":51,"url":null},"def":{"name":"next?","visibility":"Public","body":"if cursor < count\n {Tape.new(substrate, cursor + 1), substrate.at!(cursor)}\nend"}},{"html_id":"paste(elements:Tape(T))-instance-method","name":"paste","doc":"Adds elements before cursor in *elements* to this tape.\nAdvances the cursor.","summary":"Adds elements before cursor in elements to this tape.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"args_string":"(elements : Tape(T))","args_html":"(elements : Tape(T))","location":{"filename":"src/novika/tape.cr","line_number":63,"url":null},"def":{"name":"paste","args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"visibility":"Public","body":"Tape.new(substrate.unsafe_paste(elements.substrate, index: cursor, other_start: 0, other_insert_count: elements.cursor), cursor + elements.cursor)"}},{"html_id":"resub(other)-instance-method","name":"resub","doc":"Replaces this tape's substrate with other. *cursor* is\nleft where it was in self if it fits, else is moved to\nthe end.","summary":"Replaces this tape's substrate with other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/tape.cr","line_number":108,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"substrate.deref\nTape.new(other.substrate.copy, Math.min(cursor, other.count))\n"}},{"html_id":"slice:Tuple(Tape(T),Tape(T))-instance-method","name":"slice","doc":"Slices this tape's substrate at cursor, returns the\ntwo resulting tape halves.","summary":"Slices this tape's substrate at cursor, returns the two resulting tape halves.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":126,"url":null},"def":{"name":"slice","return_type":"::Tuple(Tape(T), Tape(T))","visibility":"Public","body":"lhs, rhs = substrate.slice_at!(cursor)\n{Tape.new(lhs), Tape.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"See `Substrate#sort_using!`","summary":"","abstract":false,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/tape.cr","line_number":120,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":"Tape.new(substrate.sort_using!(cmp), cursor)"}},{"html_id":"swap?-instance-method","name":"swap?","doc":"Swaps two elements before the cursor.","summary":"Swaps two elements before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":74,"url":null},"def":{"name":"swap?","visibility":"Public","body":"if cursor < 2\n return\nend\nTape.new(substrate.unsafe_swap(cursor - 2, cursor - 1), cursor)\n"}},{"html_id":"thru?-instance-method","name":"thru?","doc":"Returns the element after cursor and moves the cursor forward.","summary":"Returns the element after cursor and moves the cursor forward.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":99,"url":null},"def":{"name":"thru?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new(substrate, cursor + 1), element}\n"}},{"html_id":"to?(cursorposition)-instance-method","name":"to?","doc":"Moves the cursor to *position*. Returns the resulting tape\non success, nil if position is out of bounds (see `Substrate#at?`).","summary":"Moves the cursor to position.
","abstract":false,"args":[{"name":"position","external_name":"cursor","restriction":""}],"args_string":"(cursor position)","args_html":"(cursor position)","location":{"filename":"src/novika/tape.cr","line_number":44,"url":null},"def":{"name":"to?","args":[{"name":"position","external_name":"cursor","restriction":""}],"visibility":"Public","body":"if position.in?(0..count)\n Tape.new(substrate, position)\nend"}},{"html_id":"top?-instance-method","name":"top?","doc":"Returns the element before the cursor.","summary":"Returns the element before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":36,"url":null},"def":{"name":"top?","visibility":"Public","body":"if cursor.zero?\n return\nend\nsubstrate.at!(cursor - 1)\n"}}]},{"html_id":"novika/Novika/True","path":"Novika/True.html","kind":"struct","full_name":"Novika::True","name":"True","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":45,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a truthy `Boolean`.","summary":"Represents a truthy Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean true\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::TypedSnapshot]","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"enum\", name: type, cls: UInt8, onlyif: nil, verify: nil, value: nil, encoding: SnapshotType}, {type: \"basic\", name: snapshot, cls: Snapshot, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}},{"html_id":"from_io(io:IO,format:IO::ByteFormat=IO::ByteFormat::BigEndian)-class-method","name":"from_io","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"args_string":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","args_html":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","location":{"filename":"src/novika/image.cr","line_number":304,"url":null},"def":{"name":"from_io","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"visibility":"Public","body":"type = SnapshotType.new(io.read_bytes(UInt8, format))\nsnapshot = case type\nin .block_ref?\n io.read_bytes(BlockRefSnapshot, format)\nin .boolean?\n io.read_bytes(BooleanSnapshot, format)\nin .color?\n io.read_bytes(ColorSnapshot, format)\nin .small_decimal?\n io.read_bytes(SmallDecimalSnapshot, format)\nin .large_decimal?\n io.read_bytes(LargeDecimalSnapshot, format)\nin .quote?\n io.read_bytes(QuoteSnapshot, format)\nin .word?\n io.read_bytes(WordSnapshot, format)\nin .quoted_word?\n io.read_bytes(QuotedWordSnapshot, format)\nin .builtin?\n io.read_bytes(BuiltinSnapshot, format)\nin .byteslice?\n io.read_bytes(BytesliceSnapshot, format)\nend\nnew(type, snapshot)\n"}}],"constructors":[{"html_id":"new(type:Novika::SnapshotType,snapshot:Novika::Snapshot)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"args_string":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","args_html":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","location":{"filename":"src/novika/image.cr","line_number":296,"url":null},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, snapshot)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(form:Block)-class-method","name":"new","doc":"Creates the corresponding `TypedSnapshot` for *form*.","summary":"Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Raises: no overload for form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":""}],"args_string":"(form)","args_html":"(form)","location":{"filename":"src/novika/image.cr","line_number":382,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":""}],"visibility":"Public","body":"raise(\"no overload for #{form.class}\")"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":288,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"snapshot:Snapshot-instance-method","name":"snapshot","doc":"Holds the `Snapshot` object.","summary":"Holds the Snapshot
object.
Holds the Snapshot
object.
See Snapshot#to_form
.
Holds the type of the #snapshot
.
Holds the type of the #snapshot
.
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ValueForm","path":"Novika/ValueForm.html","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm","abstract":false,"locations":[{"filename":"src/novika/forms/form.cr","line_number":88,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are classes (that is, reference types) that want\nto pretend they're value forms, i.e., value types.","summary":"Includers are classes (that is, reference types) that want to pretend they're value forms, i.e., value types.
"},{"html_id":"novika/Novika/Word","path":"Novika/Word.html","kind":"struct","full_name":"Novika::Word","name":"Word","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Words open entries they're assigned to in the dictionary\nof their enclosing block.","summary":"Words open entries they're assigned to in the dictionary of their enclosing block.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":17,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"word\""}}],"constructors":[{"html_id":"new(id:String)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/forms/words.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if id == other.id\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":13,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"word named '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":8,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":31,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"if entry = engine.block.entry_for?(self)\n entry.on_open(engine)\n return self\nend\nblock = current = engine.block\nwhile block && (trap = block.entry_for?(Hook.trap))\n form = trap.form\n if form.is_a?(Block) && (form.prototype.same?(current.prototype))\n block = block.parent?\n next\n end\n engine.stack.add(Word.new(id))\n trap.on_open(engine)\n return self\nend\ndie(\"definition for #{self} not found in the enclosing block(s)\")\nself\n"}},{"html_id":"private?-instance-method","name":"private?","doc":"Returns whether this word is private (by convention).","summary":"Returns whether this word is private (by convention).
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":22,"url":null},"def":{"name":"private?","visibility":"Public","body":"(id.prefixed_by?('_')) && (!(id.ends_with?('_')))"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds a level of quoting so this word becomes a quoted word.","summary":"Adds a level of quoting so this word becomes a quoted word.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":27,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(@id)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":67,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if id.in?(\"true\", \"false\")\n io << \"#\"\nend\nio << id\n"}}]},{"html_id":"novika/Novika/WordSnapshot","path":"Novika/WordSnapshot.html","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":196,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::WordSnapshot]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Word)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Word"}],"args_string":"(form : Word)","args_html":"(form : Word)","location":{"filename":"src/novika/image.cr","line_number":206,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Word"}],"visibility":"Public","body":"word = new\nword.id = form.id\nword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":197,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":202,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Word.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Set","path":"Set.html","kind":"struct","full_name":"Set(T)","name":"Set","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika.cr","line_number":19,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"}],"doc":"`Set` implements a collection of unordered values with no duplicates.\n\nAn `Enumerable` object can be converted to `Set` using the `#to_set` method.\n\n`Set` uses `Hash` as storage, so you must note the following points:\n\n* Equality of elements is determined according to `Object#==` and `Object#hash`.\n* `Set` assumes that the identity of each element does not change while it is stored. Modifying an element of a set will render the set to an unreliable state.\n\n### Example\n\n```\ns1 = Set{1, 2}\ns2 = [1, 2].to_set\ns3 = Set.new [1, 2]\ns1 == s2 # => true\ns1 == s3 # => true\ns1.add(2)\ns1.concat([6, 8])\ns1.subset_of? s2 # => false\ns2.subset_of? s1 # => true\n```","summary":"Set
implements a collection of unordered values with no duplicates.
A String
represents an immutable sequence of UTF-8 characters.
Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"args_string":"(prefix : String) : Bool","args_html":"(prefix : String) : Bool","location":{"filename":"src/novika.cr","line_number":9,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"bytesize > prefix.bytesize && (starts_with?(prefix))"}},{"html_id":"prefixed_by?(prefix:Char):Bool-instance-method","name":"prefixed_by?","doc":"Returns whether this string starts with *prefix* but also\nhas other characters after it.","summary":"Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"args_string":"(prefix : Char) : Bool","args_html":"(prefix : Char) : Bool","location":{"filename":"src/novika.cr","line_number":14,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"return_type":"Bool","visibility":"Public","body":"bytesize > 1 && (starts_with?(prefix))"}}]},{"html_id":"novika/Union","path":"Union.html","kind":"struct","full_name":"Union(*T)","name":"Union","abstract":false,"superclass":{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},"ancestors":[{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"doc":"A union type represents the possibility of a variable or an expression\nhaving more than one possible type at compile time.\n\nWhen invoking a method on a union type, the language checks that the\nmethod exists and can be resolved (typed) for each type in the union.\nFor this reason, adding instance methods to `Union` makes no sense and\nhas no effect. However, adding class method to `Union` is possible\nand can be useful. One example is parsing `JSON` into one of many\npossible types.\n\nUnion is special in that it is a generic type but instantiating it\nmight not return a union type:\n\n```\nUnion(Int32 | String) # => (Int32 | String)\nUnion(Int32) # => Int32\nUnion(Int32, Int32, Int32) # => Int32\n```","summary":"A union type represents the possibility of a variable or an expression having more than one possible type at compile time.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","doc":"Joins union members' `Form#typedesc`.","summary":"Joins union members' Form#typedesc
.
An Array
is an ordered, integer-indexed collection of objects of type T.
A pool of BlockIdMap
objects.
Regex that can be used to search for a pattern in Block
comments.
Returns whether the output of Novika should be colorful.
","abstract":false,"location":{"filename":"src/novika.cr","line_number":58,"url":null},"def":{"name":"colorful?","return_type":"Bool","visibility":"Public","body":"((STDOUT.tty? && STDERR.tty?) && (ENV[\"TERM\"]? != \"dumb\")) && (!(ENV.has_key?(\"NO_COLOR\")))"}}],"types":[{"html_id":"novika/Novika/Block","path":"Novika/Block.html","kind":"class","full_name":"Novika::Block","name":"Block","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/block.cr","line_number":338,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"MAX_COUNT_TO_S","name":"MAX_COUNT_TO_S","value":"128","doc":"Maximum amount of forms to display in block string representation.","summary":"Maximum amount of forms to display in block string representation.
"},{"id":"MAX_NESTED_COUNT_TO_S","name":"MAX_NESTED_COUNT_TO_S","value":"12","doc":"Maximum amount of forms to display in string representation\nof *nested* blocks.","summary":"Maximum amount of forms to display in string representation of nested blocks.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Blocks are fundamental to Novika.\n\nThey are a kind of AST node, they hold continuations and\nare continuations, they are arrays, stacks, and hash tables,\nall at the same time.\n\nIn this sense, blocks have *roles*. But any block can be\nany role, and change its role as often and whenever it\nwants or needs to.","summary":"Blocks are fundamental to Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":441,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"block\""}},{"html_id":"with(array:Array(Form),leaf:Bool|Nil=nil)-class-method","name":"with","doc":"Creates and returns an orphan block with *array* being\nits tape substrate's container. See `Tape.for`.","summary":"Creates and returns an orphan block with array being its tape substrate's container.
","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"args_string":"(array : Array(Form), leaf : Bool | Nil = nil)","args_html":"(array : Array(Form), leaf : Bool | Nil = nil)","location":{"filename":"src/novika/forms/block.cr","line_number":411,"url":null},"def":{"name":"with","args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"new(parent: nil, tape: Tape.for(array), leaf: leaf.nil? ? array.includes?(Block) : leaf)"}},{"html_id":"with(form1:Form,form2:Form)-class-method","name":"with","doc":"Double-*form* optimized version of `Block.with`.","summary":"Double-form optimized version of Block.with
.
Single-form optimized version of Block.with
.
Loose equality: for two blocks to be loosely equal, their tapes and their dictionaries must be loosely equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other) : Bool","args_html":"(other) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":1136,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"return_type":"Bool","visibility":"Public","body":"if other.is_a?(self)\nelse\n return false\nend\nif same?(other)\n return true\nend\nif count == other.count\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive(:==) do\n result = true\n if has_tape? || other.has_tape?\n result && (result = tape == other.tape)\n end\n if has_dict? || other.has_dict?\n result && (result = dict == other.dict)\n end\nend\nexecuted && result\n"}},{"html_id":"a(type:T.class,_depth=0):TforallT-instance-method","name":"a","doc":"Converts this block into the given *type*. Code execution\nmay be required, hence the need for *engine*. If failed,\nsame as `Form#a`.","summary":"Converts this block into the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"args_string":"(type : T.class, _depth = 0) : T forall T","args_html":"(type : T.class, _depth = 0) : T forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1237,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"return_type":"T","visibility":"Public","body":"if self.is_a?(T)\n return self\nend\n(case T\nwhen Decimal.class\n a?(Hook.as_decimal, type, _depth)\nwhen Quote.class\n a?(Hook.as_quote, type, _depth)\nwhen Word.class\n a?(Hook.as_word, type, _depth)\nwhen Color.class\n a?(Hook.as_color, type, _depth)\nwhen Boolean.class\n a?(Hook.as_boolean, type, _depth)\nwhen QuotedWord.class\n a?(Hook.as_quoted_word, type, _depth)\nwhen Byteslice.class\n a?(Hook.as_byteslice, type, _depth)\nend) || (afail(T))\n"}},{"html_id":"add(form:Form):self-instance-method","name":"add","doc":"Adds *form* to the tape.","summary":"Adds form to the tape.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":628,"url":null},"def":{"name":"add","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"impl = ->(other : Form) do\n if other.is_a?(Block)\n self.leaf = false\n end\n self.tape = tape.add(other)\nend\nif hook = flat_at?(Hook.on_shove)\n default = Builtin.new(\"__shove__\", desc: \"( F -- ): default __shove__ implementation. Pushes Form to\\n the block it was captured in.\") do |_, stack|\n impl.call(stack.drop)\n end\n stack = Block.with(form, default)\n Engine.exhaust(Engine.current.capabilities, hook, stack)\nelse\n impl.call(form)\nend\nself\n"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a block of forms between *b* and *e*, both\ninclusive. Clamps *b* and *e* to bounds.","summary":"Returns a block of forms between b and e, both inclusive.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/block.cr","line_number":568,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"if has_tape?\nelse\n return Block.new\nend\nb = Math.max(b, 0)\ne = Math.min(e, count - 1)\nBlock.with((b..e).map do |index|\n at(index)\nend)\n"}},{"html_id":"at(name:Form,entry:Entry):self-instance-method","name":"at","doc":"Binds *name* to *entry* in this block's dictionary.","summary":"Binds name to entry in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : self","args_html":"(name : Form, entry : Entry) : self","location":{"filename":"src/novika/forms/block.cr","line_number":995,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"self","visibility":"Public","body":"tap do\n dict.set(name, entry)\nend"}},{"html_id":"at(name:Form,form:Form):self-instance-method","name":"at","doc":"Binds *name* to *form* in this block's dictionary.","summary":"Binds name to form in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form) : self","args_html":"(name : Form, form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1000,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"at(name, Entry.new(form))"}},{"html_id":"at(index:Int32):Form-instance-method","name":"at","doc":"Returns the form at *index* in the tape. Dies if *index*\nis out of bounds. See `Tape#at?`.","summary":"Returns the form at index in the tape.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : Form","args_html":"(index : Int32) : Form","location":{"filename":"src/novika/forms/block.cr","line_number":560,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"index out of bounds\")\nend\n(tape.at?(index)) || (die(\"index out of bounds\"))\n"}},{"html_id":"at(name:String,desc=\"abuiltin\",&code:Engine,Block->):self-instance-method","name":"at","doc":"Makes an `OpenEntry` called *name* for *code* wrapped\nin `Builtin`.","summary":"Makes an OpenEntry
called name for code wrapped in Builtin
.
Makes an OpenEntry
called name for code wrapped in Builtin
.
Returns the form at index, or nil.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/forms/block.cr","line_number":552,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.at?(index)\n"}},{"html_id":"befriend(other:Block):self-instance-method","name":"befriend","doc":"Adds *other* to the friendlist of this block.","summary":"Adds other to the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":747,"url":null},"def":{"name":"befriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"friends.add(other)\nself\n"}},{"html_id":"can_be?(type:T.class):BoolforallT-instance-method","name":"can_be?","doc":"Returns whether this block implements hook(s) needed\nfor behaving like *type*. See also: `a(type)`.","summary":"Returns whether this block implements hook(s) needed for behaving like type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : Bool forall T","args_html":"(type : T.class) : Bool forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1253,"url":null},"def":{"name":"can_be?","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"Bool","visibility":"Public","body":"if self.is_a?(T)\n return true\nend\ncase T\nwhen Decimal.class\n flat_has?(Hook.as_decimal)\nwhen Quote.class\n flat_has?(Hook.as_quote)\nwhen Word.class\n flat_has?(Hook.as_word)\nwhen Color.class\n flat_has?(Hook.as_color)\nwhen Boolean.class\n flat_has?(Hook.as_boolean)\nwhen QuotedWord.class\n flat_has?(Hook.as_quoted_word)\nwhen Byteslice.class\n flat_has?(Hook.as_byteslice)\nelse\n false\nend\n"}},{"html_id":"clear_entries:self-instance-method","name":"clear_entries","doc":"Removes all owned dictionary entries in this block.","summary":"Removes all owned dictionary entries in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1052,"url":null},"def":{"name":"clear_entries","return_type":"self","visibility":"Public","body":"dict.clear\nself\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of forms in this block.","summary":"Returns the amount of forms in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":526,"url":null},"def":{"name":"count","visibility":"Public","body":"has_tape? ? tape.count : 0"}},{"html_id":"cursor-instance-method","name":"cursor","doc":"Returns the cursor position in this block.","summary":"Returns the cursor position in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":521,"url":null},"def":{"name":"cursor","visibility":"Public","body":"has_tape? ? tape.cursor : 0"}},{"html_id":"delete_at(index:Int32):self-instance-method","name":"delete_at","doc":"Deletes the form at *index*. Does nothing if index is out\nof bounds.","summary":"Deletes the form at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1034,"url":null},"def":{"name":"delete_at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if delpt = tape.to?(index + 1)\nelse\n return self\nend\nif delpt.drop?\nelse\n return self\nend\nself.tape = (tape.to?(Math.min(cursor, delpt.count))).not_nil!\nself\n"}},{"html_id":"delete_entry(name:Form):self-instance-method","name":"delete_entry","doc":"Deletes the entry corresponding to *name* form from the\ndictionary of this block if it exists there. Otherwise,\ndoes nothing.","summary":"Deletes the entry corresponding to name form from the dictionary of this block if it exists there.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : self","args_html":"(name : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1045,"url":null},"def":{"name":"delete_entry","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"dict.del(name)\nself\n"}},{"html_id":"delete_if(&:Form->Bool):self-instance-method","name":"delete_if","doc":"Yields forms from left to right until the block returns `true`\nfor one, then deletes that form. If the block does not return\n`true` for any form, does nothing.","summary":"Yields forms from left to right until the block returns true
for one, then deletes that form.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/block.cr","line_number":437,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << (prototype.comment? || \"a block\")"}},{"html_id":"describe_with?(comment:String,force=false):String|Nil-instance-method","name":"describe_with?","doc":"Sets the block comment of this block to *comment* in\ncase it doesn't have a comment already.\n\nSetting the comment can also be forced by making *force* true.","summary":"Sets the block comment of this block to comment in case it doesn't have a comment already.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"args_string":"(comment : String, force = false) : String | Nil","args_html":"(comment : String, force = false) : String | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":463,"url":null},"def":{"name":"describe_with?","args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"return_type":"String | ::Nil","visibility":"Public","body":"if force || (!comment?)\n @comment = dedent(comment)\nend"}},{"html_id":"drop:Form-instance-method","name":"drop","doc":"Removes and returns the top form. Dies if none.","summary":"Removes and returns the top form.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":695,"url":null},"def":{"name":"drop","return_type":"Form","visibility":"Public","body":"impl = -> do\n top.tap do\n self.tape = tape.drop? || (raise(\"unreachable\"))\n end\nend\nif hook = flat_at?(Hook.on_cherry)\n default = Builtin.new(\"__cherry__\", desc: \"( -- ): default __cherry__ implementation.\") do\n impl.call\n end\n stack = Block.with(default)\n (Engine.exhaust(Engine.current.capabilities, hook, stack)).top\nelse\n impl.call\nend\n"}},{"html_id":"dupe:self-instance-method","name":"dupe","doc":"Duplicates the form before the cursor, dies if none.","summary":"Duplicates the form before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":673,"url":null},"def":{"name":"dupe","return_type":"self","visibility":"Public","body":"add(top)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields all forms in this block, *going from left to right*.","summary":"Yields all forms in this block, going from left to right.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":536,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.each do |form|\n yield form\nend\n"}},{"html_id":"each_entry(&)-instance-method","name":"each_entry","doc":"Yields entry names and `Entry` objects from the dictionary\nof this block.","summary":"Yields entry names and Entry
objects from the dictionary of this block.
Yields entry name forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":908,"url":null},"def":{"name":"each_entry_name","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |name, _|\n yield name\nend"}},{"html_id":"each_entry_value(&)-instance-method","name":"each_entry_value","doc":"Yields entry value forms in this block's dictionary.","summary":"Yields entry value forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":915,"url":null},"def":{"name":"each_entry_value","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |_, entry|\n yield entry.form\nend"}},{"html_id":"each_friend(&)-instance-method","name":"each_friend","doc":"Yields friends of this block. Asserts each is a block,\notherwise, dies (e.g. the user may have mistakenly\nadded some other form).","summary":"Yields friends of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":735,"url":null},"def":{"name":"each_friend","yields":1,"block_arity":1,"visibility":"Public","body":"if has_friends?\nelse\n return\nend\nfriends.reverse_each do |friend|\n if friend.is_a?(Block)\n else\n die(\"expected a block, got #{friend.class.typedesc} for a friend\")\n end\n yield friend\nend\n"}},{"html_id":"each_neighbor(payload:Block->T|Nil,visited:BlockIdMap|Nil=nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","args_html":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":856,"url":null},"def":{"name":"each_neighbor","args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"visibility":"Public","body":"each do |form|\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\nif has_dict?\nelse\n return\nend\ndict.each do |_, entry|\n form = entry.form\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\n"}},{"html_id":"each_neighbor(visited:BlockIdMap|Nil=nil,&payload:Block->T|Nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","args_html":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":893,"url":null},"def":{"name":"each_neighbor","args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"yields":1,"block_arity":1,"block_arg":{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},"visibility":"Public","body":"each_neighbor(payload, visited)"}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* found in this\nblock. Matching is done using loose equality `==(other)`.","summary":"Yields occurrences of the given pattern found in this block.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/block.cr","line_number":1159,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\neach do |form|\n if pattern == form\n yield index\n end\n index = index + 1\nend\n"}},{"html_id":"each_relative_fetch(fetcher:Block->T|Nil,seen:BlockIdMap|Nil=nil,skip_self:Bool=false,history:Block|Nil=nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"args_string":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","args_html":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":792,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"return_type":"T | ::Nil","visibility":"Public","body":"if skip_self && (!has_relatives?)\n return\nend\nif history\nelse\n v0 = skip_self ? nil : self\n ilist = PIlist.make(self)\n ilist.each(v0) do |fastpath|\n if value = fetcher.call(fastpath)\n else\n next\n end\n return value\n end\nend\nacquired = seen.nil?\nseen || (seen = BlockMaps.acquire)\nbegin\n fetch = EachRelativeFetch.new(fetcher, seen, history)\n fetch.on(self, ignore: ilist)\nensure\n if acquired\n BlockMaps.release(seen)\n end\nend\n"}},{"html_id":"each_relative_fetch(*args,**kwargs,&fetcher:Block->T|Nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","args_html":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":827,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"block_arg":{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},"return_type":"T | ::Nil","visibility":"Public","body":"each_relative_fetch(fetcher, *args, **kwargs)"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1273,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << (prototype.comment? =~ EFFECT_PATTERN ? $~[1] : \"a block\")"}},{"html_id":"eject:Form-instance-method","name":"eject","doc":"Drops and returns the form after the cursor. Dies if\ncursor is at the end.","summary":"Drops and returns the form after the cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":612,"url":null},"def":{"name":"eject","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"eject out of bounds\")\nend\nself.tape, _ = tape.eject? || (die(\"eject out of bounds\"))\n"}},{"html_id":"entry_count-instance-method","name":"entry_count","doc":"Returns the amount of entries owned by (defined in) this block.","summary":"Returns the amount of entries owned by (defined in) this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":531,"url":null},"def":{"name":"entry_count","visibility":"Public","body":"has_dict? ? dict.count : 0"}},{"html_id":"entry_for(name:Form):Entry-instance-method","name":"entry_for","doc":"Returns the dictionary entry for *name*, or dies.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or dies.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry","args_html":"(name : Form) : Entry","location":{"filename":"src/novika/forms/block.cr","line_number":942,"url":null},"def":{"name":"entry_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry","visibility":"Public","body":"(entry_for?(name)) || (die(\"no value form for '#{name}'\"))"}},{"html_id":"entry_for?(name:Form):Entry|Nil-instance-method","name":"entry_for?","doc":"Returns the dictionary entry for *name*, or nil.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or nil.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":950,"url":null},"def":{"name":"entry_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if entry = flat_at?(name)\n return entry\nend\neach_relative_fetch(skip_self: true, &.flat_at?(name))\n"}},{"html_id":"flat_at?(name:Form):Entry|Nil-instance-method","name":"flat_at?","doc":"Returns the dictionary entry corresponding to *name*.\nDoes not traverse the block hierarchy.","summary":"Returns the dictionary entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":980,"url":null},"def":{"name":"flat_at?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if has_dict?\nelse\n return\nend\ndict.get(name) do\nend\n"}},{"html_id":"flat_has?(name:Form):Bool-instance-method","name":"flat_has?","doc":"Returns whether this block's (and this block's only)\ndictionary has an entry corresponding to *name*.","summary":"Returns whether this block's (and this block's only) dictionary has an entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":988,"url":null},"def":{"name":"flat_has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"if has_dict?\nelse\n return false\nend\ndict.has?(name)\n"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":962,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"(entry_for?(name)).try(&.form)"}},{"html_id":"has_comment?:Bool-instance-method","name":"has_comment?","doc":"Returns whether this block has a comment.","summary":"Returns whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":455,"url":null},"def":{"name":"has_comment?","return_type":"Bool","visibility":"Public","body":"!(!comment?)"}},{"html_id":"has_dict?:Bool-instance-method","name":"has_dict?","doc":"Returns whether this block has a dict.","summary":"Returns whether this block has a dict.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":372,"url":null},"def":{"name":"has_dict?","return_type":"Bool","visibility":"Public","body":"!(!@dict)"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":958,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(!each_relative_fetch do |block|\n (block.flat_has?(name)) || nil\nend)"}},{"html_id":"has_friends?:Bool-instance-method","name":"has_friends?","doc":"Returns whether this block has any friends.","summary":"Returns whether this block has any friends.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":723,"url":null},"def":{"name":"has_friends?","return_type":"Bool","visibility":"Public","body":"(!(!@friends)) && (!friends.count.zero?)"}},{"html_id":"has_relatives?:Bool-instance-method","name":"has_relatives?","doc":"Returns whether this block has a parent, friends, or both.","summary":"Returns whether this block has a parent, friends, or both.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":728,"url":null},"def":{"name":"has_relatives?","return_type":"Bool","visibility":"Public","body":"(!(!parent?)) || has_friends?"}},{"html_id":"has_tape?:Bool-instance-method","name":"has_tape?","doc":"Returns whether this block has a tape.","summary":"Returns whether this block has a tape.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":361,"url":null},"def":{"name":"has_tape?","return_type":"Bool","visibility":"Public","body":"!(!@tape)"}},{"html_id":"import!(fromdonor:Block):self-instance-method","name":"import!","doc":"Imports entries from *donor* to this block's dictionary\nby mutating this block's dictionary.","summary":"Imports entries from donor to this block's dictionary by mutating this block's dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"from","restriction":"Block"}],"args_string":"(from donor : Block) : self","args_html":"(from donor : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":578,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"from","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"dict.import!(donor.dict)\nself\n"}},{"html_id":"includes?(other:Form):Bool-instance-method","name":"includes?","doc":"Returns whether the tape of this block includes *other*,\nas per loose equality `==(other)`.","summary":"Returns whether the tape of this block includes other, as per loose equality #==(other)
.
Adds form after the cursor.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":605,"url":null},"def":{"name":"inject","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"self.tape = tape.inject(form)\nself\n"}},{"html_id":"instance(parentnew_parent:Block=self,shallow=false,__tr:BlockIdMap|Nil=nil):Block-instance-method","name":"instance","doc":"Creates and returns an instance of this block, under the\ngiven *parent*.","summary":"Creates and returns an instance of this block, under the given parent.
","abstract":false,"args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"args_string":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","args_html":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","location":{"filename":"src/novika/forms/block.cr","line_number":1169,"url":null},"def":{"name":"instance","args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"return_type":"Block","visibility":"Public","body":"copy = self.class.new(parent: new_parent, tape: has_tape? ? tape.copy : nil, prototype: prototype)\nif leaf? || shallow\n return copy\nend\n__tr || (__tr = BlockIdMap.new)\n__tr[object_id] = copy\ncopy.tape = copy.tape.map! do |form|\n if form.is_a?(Block)\n else\n next\n end\n __tr[form.object_id]? || (form.instance(same?(form.parent?) ? copy : form, __tr: __tr))\nend\ncopy.leaf = false\ncopy\n"}},{"html_id":"next?:Form|Nil-instance-method","name":"next?","doc":"See `Tape#next?`.","summary":"See Tape#next?
.
Schedules this block for execution in engine using the safe scheduling method (see Engine#schedule
).
Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":970,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"(entry_for(name)).opener?"}},{"html_id":"parent:Block|Nil-instance-method","name":"parent","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent","return_type":"Block | ::Nil","visibility":"Public","body":"if (value = @parent).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#parent cannot be nil\"))\nelse\n value\nend"}},{"html_id":"parent=(parent:Block|Nil)-instance-method","name":"parent=","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil)","args_html":"(parent : Block | Nil)","location":{"filename":"src/novika/forms/block.cr","line_number":388,"url":null},"def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"parent?:Block|Nil|Nil-instance-method","name":"parent?","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent?","return_type":"Block | ::Nil | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"paste(forms:Block)-instance-method","name":"paste","doc":"Mutably adds forms before the cursor in *forms* block's\ntape after the cursor in this block's tape.","summary":"Mutably adds forms before the cursor in forms block's tape after the cursor in this block's tape.
","abstract":false,"args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"args_string":"(forms : Block)","args_html":"(forms : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":654,"url":null},"def":{"name":"paste","args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"visibility":"Public","body":"if forms.count.zero?\n return\nend\nself.tape = tape.paste(forms.tape)\n"}},{"html_id":"path_to_entry?(name:Form):Tuple(Entry,Block)|Nil-instance-method","name":"path_to_entry?","doc":"Returns a tuple that consists of the dictionary entry\ncorresponding to *name*, followed by the path block which\nholds all blocks leading to the entry.\n\nReturns nil if *name* could not be found.\n\nIn general works like `entry_for` and friends, the only\ndifference being that it also tracks and returns the path.\nThe latter makes this method slightly slower that `entry_for`.","summary":"Returns a tuple that consists of the dictionary entry corresponding to name, followed by the path block which holds all blocks leading to the entry.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Tuple(Entry, Block) | Nil","args_html":"(name : Form) : Tuple(Entry, Block) | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":930,"url":null},"def":{"name":"path_to_entry?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"::Tuple(Entry, Block) | ::Nil","visibility":"Public","body":"path = Block.new\nif entry = each_relative_fetch(history: path, &.flat_at?(name))\nelse\n return\nend\n{entry, path}\n"}},{"html_id":"prototype:Block-instance-method","name":"prototype","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype","return_type":"Block","visibility":"Public","body":"if (value = @prototype).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#prototype cannot be nil\"))\nelse\n value\nend"}},{"html_id":"prototype=(prototype:Block)-instance-method","name":"prototype=","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"args_string":"(prototype : Block)","args_html":"(prototype : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":392,"url":null},"def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"prototype?:Block|Nil-instance-method","name":"prototype?","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype?","return_type":"Block | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":974,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(opener?(name))"}},{"html_id":"resub(other:Block):self-instance-method","name":"resub","doc":"Replaces this block's tape with *other*'s.","summary":"Replaces this block's tape with other's.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1105,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"self.tape = has_tape? ? tape.resub(other.tape) : Tape.new(other.tape.substrate)\nself\n"}},{"html_id":"reverse_each(&)-instance-method","name":"reverse_each","doc":"Yields all forms in this block, *going from right to left*.","summary":"Yields all forms in this block, going from right to left.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":543,"url":null},"def":{"name":"reverse_each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\n(0...tape.count).reverse_each do |index|\n yield tape.at!(index)\nend\n"}},{"html_id":"schedule(engine:Engine,stack:Block):self-instance-method","name":"schedule","doc":"Schedules an instance of this block for execution, with *stack*\nset as the stack that will be used by the instance during\nexecution.\n\nMoves the cursor of the instance before the first form\nso that the entire block will be executed by *engine*.","summary":"Schedules an instance of this block for execution, with stack set as the stack that will be used by the instance during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1087,"url":null},"def":{"name":"schedule","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\ninstance.schedule!(engine, stack)\nself\n"}},{"html_id":"schedule!(engine:Engine,stack:Block):self-instance-method","name":"schedule!","doc":"Schedules this block for execution, with *stack* set as the\nstack that will be used by this block during execution.\n\nMoves the cursor before the first form so that the entire\nblock will be executed by *engine*.","summary":"Schedules this block for execution, with stack set as the stack that will be used by this block during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1073,"url":null},"def":{"name":"schedule!","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\nengine.schedule!(stack: stack, block: to(0))\nself\n"}},{"html_id":"shallow:Block-instance-method","name":"shallow","doc":"Returns a shallow copy of this block.","summary":"Returns a shallow copy of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1096,"url":null},"def":{"name":"shallow","return_type":"Block","visibility":"Public","body":"self.class.new(parent: parent?, tape: has_tape? ? tape.copy : nil, dict: has_dict? ? dict.copy : nil, prototype: prototype)"}},{"html_id":"slice:Tuple(Block,Block)-instance-method","name":"slice","doc":"Slices this block at cursor. This results in two halves,\nwhich are consequently returned.","summary":"Slices this block at cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":685,"url":null},"def":{"name":"slice","return_type":"::Tuple(Block, Block)","visibility":"Public","body":"if has_tape?\nelse\n return {Block.new(parent: self), Block.new(parent: self)}\nend\nlhs, rhs = tape.slice\n{Block.new(parent: self, tape: lhs), Block.new(parent: self, tape: rhs)}\n"}},{"html_id":"slurp(source:String):self-instance-method","name":"slurp","doc":"Parses all forms in string *source*, and adds them to\nthis block.","summary":"Parses all forms in string source, and adds them to this block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String) : self","args_html":"(source : String) : self","location":{"filename":"src/novika/forms/block.cr","line_number":508,"url":null},"def":{"name":"slurp","args":[{"name":"source","external_name":"source","restriction":"String"}],"return_type":"self","visibility":"Public","body":"classifier = Classifier.new(source, block: self)\nScissors.cut(source) do |start, count, dot|\n classifier.classify(start, count, dot)\nend\nclassifier.end\nself\n"}},{"html_id":"sort_using!(&cmp:Form,Form->Int32):self-instance-method","name":"sort_using!","doc":"Sorts this block's tape inplace, calls *cmp* comparator proc\nfor each form pair for a comparison integer -1, 0, or 1.","summary":"Sorts this block's tape inplace, calls cmp comparator proc for each form pair for a comparison integer -1, 0, or 1.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":715,"url":null},"def":{"name":"sort_using!","yields":2,"block_arity":2,"block_arg":{"name":"cmp","external_name":"cmp","restriction":"(Form, Form -> Int32)"},"return_type":"self","visibility":"Public","body":"if has_tape?\nelse\n return self\nend\nself.tape = tape.sort_using!(cmp)\nself\n"}},{"html_id":"spot(io,vicinity=10,colorful=true)-instance-method","name":"spot","doc":"Appends a string representation of this block to *io* in\nwhich only forms in the negative and positive *vicinity*\nof this block's cursor are present, and the word before\nthe cursor is emphasized.\n\nDoes not respect `MAX_COUNT_TO_S`. Does not display quotes.\nDoes not display nested blocks.","summary":"Appends a string representation of this block to io in which only forms in the negative and positive vicinity of this block's cursor are present, and the word before the cursor is emphasized.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"args_string":"(io, vicinity = 10, colorful = true)","args_html":"(io, vicinity = 10, colorful = true)","location":{"filename":"src/novika/forms/block.cr","line_number":1284,"url":null},"def":{"name":"spot","args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"visibility":"Public","body":"io << \"[\"\nb = (cursor - vicinity).clamp(0..(count - 1))\ne = (cursor + vicinity).clamp(0..(count - 1))\n(b..e).each do |index|\n form = at(index)\n focus = index == (cursor - 1)\n (Colorize.with.bold.toggle(focus && colorful)).surround(io) do\n case form\n when Block\n io << \" […]\"\n when Quote\n io << \" '…'\"\n else\n (io << \" \") << form\n end\n end\n if focus\n io << (\" |\".colorize.toggle(colorful)).red\n end\nend\nio << \" ]\"\n"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/block.cr","line_number":966,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(entry_for?(name)).try(&.submit(form))"}},{"html_id":"swap:self-instance-method","name":"swap","doc":"Swaps two forms before the cursor, dies if none.","summary":"Swaps two forms before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":678,"url":null},"def":{"name":"swap","return_type":"self","visibility":"Public","body":"self.tape = tape.swap? || (die(\"at least two forms required before the cursor\"))\nself\n"}},{"html_id":"thru:Form-instance-method","name":"thru","doc":"Returns form after cursor, and moves cursor past it.\n\nSimilar to `eject`, but doesn't modify the block.","summary":"Returns form after cursor, and moves cursor past it.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":621,"url":null},"def":{"name":"thru","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"thru out of bounds\")\nend\nself.tape, _ = tape.thru? || (die(\"thru out of bounds\"))\n"}},{"html_id":"to(index:Int32):self-instance-method","name":"to","doc":"Moves tape cursor to *index*. Dies if *index* is out\nof bounds. See `Tape#to?`.","summary":"Moves tape cursor to index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":593,"url":null},"def":{"name":"to","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if (!has_tape?) && index.zero?\n return self\nend\nif has_tape?\nelse\n die(\"cursor index out of bounds\")\nend\nself.tape = (tape.to?(index)) || (die(\"cursor index out of bounds\"))\nself\n"}},{"html_id":"to_dict_block:Block-instance-method","name":"to_dict_block","doc":"Builds and returns a dictionary block for this block.\n\nDictionary block is an *orphan* block whose dictionary is a shallow\ncopy of this block's dictionary; and whose tape is empty.","summary":"Builds and returns a dictionary block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1122,"url":null},"def":{"name":"to_dict_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, dict: has_dict? ? dict.copy : nil)"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1269,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"(a?(Hook.as_quote, Quote)) || super()"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1309,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if repr = a?(Hook.as_quote, Quote)\n io << repr.string\n return\nend\nexecuted = exec_recursive(:to_s) do\n io << \"[\"\n if has_tape? && (!tape.empty?)\n (0...cursor).each do |index|\n (io << \" \") << (at(index))\n end\n if cursor == count\n else\n io << \" |\"\n (cursor...count).each do |index|\n (io << \" \") << (at(index))\n end\n end\n end\n if has_dict? && (!dict.empty?)\n io << \" ·\"\n dict.each do |name, entry|\n ((((io << \" \") << (entry.opener? ? \"@\" : \"$\")) << \"{\") << name) << \" :: \"\n entry.effect(io)\n io << \"}\"\n end\n end\n io << \" ]\"\nend\nif executed\nelse\n io << \"⭮\"\nend\n"}},{"html_id":"to_tape_block:Block-instance-method","name":"to_tape_block","doc":"Builds and returns a tape block for this block.\n\nTape block is an *orphan* block whose tape is a shallow copy\nof this block's tape; and whose dictionary is empty.","summary":"Builds and returns a tape block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1114,"url":null},"def":{"name":"to_tape_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, tape: has_tape? ? tape.copy : nil, leaf: leaf?)"}},{"html_id":"top:Form-instance-method","name":"top","doc":"Returns the top form, dies if none.","summary":"Returns the top form, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":661,"url":null},"def":{"name":"top","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"no top for block\")\nend\ntop? || (die(\"no top for block\"))\n"}},{"html_id":"top?:Form|Nil-instance-method","name":"top?","doc":"Returns the top form, or nil if none.","summary":"Returns the top form, or nil if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":668,"url":null},"def":{"name":"top?","return_type":"Form | ::Nil","visibility":"Public","body":"tape.top?"}},{"html_id":"unfriend(other:Block):self-instance-method","name":"unfriend","doc":"Removes *other* from the friendlist of this block.","summary":"Removes other from the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":754,"url":null},"def":{"name":"unfriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if has_friends?\nelse\n return self\nend\nfriends.delete_if do |friend|\n friend.is_a?(Block) && (friend.same?(other))\nend\nself\n"}}]},{"html_id":"novika/Novika/BlockIdMap","path":"Novika/BlockIdMap.html","kind":"alias","full_name":"Novika::BlockIdMap","name":"BlockIdMap","abstract":false,"locations":[{"filename":"src/novika/forms/block.cr","line_number":327,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Hash(UInt64, Novika::Block)","aliased_html":"Hash(UInt64, Novika::Block)","const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Maps block unique identifiers (currently, object ids are used as\nsuch) to blocks they identify.\n\nUsed instead of Sets for forcing identity-based lookup rather\nthan hash-based lookup.","summary":"Maps block unique identifiers (currently, object ids are used as such) to blocks they identify.
"},{"html_id":"novika/Novika/BlockPool","path":"Novika/BlockPool.html","kind":"class","full_name":"Novika::BlockPool","name":"BlockPool","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":549,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Creates a block pool by exploring the given pivot block's hierarchy, forms, etc.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"args_string":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","args_html":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","location":{"filename":"src/novika/image.cr","line_number":777,"url":null},"def":{"name":"new","args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"visibility":"Public","body":"pool = new\nvisitor = BlockVisitor.new(caps.block, mode)\nvisitor.enter(pivot)\npool.cb = caps.block.object_id\npool.pivot = pivot.object_id\npool.blocks = visitor.blocks\npool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":550,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"blocks:Array(FrozenBlock)-instance-method","name":"blocks","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"def":{"name":"blocks","return_type":"Array(FrozenBlock)","visibility":"Public","body":"@blocks"}},{"html_id":"blocks=(blocks:Array(FrozenBlock))-instance-method","name":"blocks=","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"args_string":"(blocks : Array(FrozenBlock))","args_html":"(blocks : Array(FrozenBlock))","def":{"name":"blocks=","args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"visibility":"Public","body":"@blocks = blocks"}},{"html_id":"cb:UInt64-instance-method","name":"cb","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"def":{"name":"cb","return_type":"UInt64","visibility":"Public","body":"@cb"}},{"html_id":"cb=(cb:UInt64)-instance-method","name":"cb=","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"args_string":"(cb : UInt64)","args_html":"(cb : UInt64)","def":{"name":"cb=","args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"visibility":"Public","body":"@cb = cb"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"pivot:UInt64-instance-method","name":"pivot","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"def":{"name":"pivot","return_type":"UInt64","visibility":"Public","body":"@pivot"}},{"html_id":"pivot=(pivot:UInt64)-instance-method","name":"pivot=","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"args_string":"(pivot : UInt64)","args_html":"(pivot : UInt64)","def":{"name":"pivot=","args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"visibility":"Public","body":"@pivot = pivot"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs (melts if necessary) the pivot block, its\nblock hierarchy, its forms etc. Returns the resulting\n`Block` form.","summary":"Reconstructs (melts if necessary) the pivot block, its block hierarchy, its forms etc.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":764,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"assembler = BlockAssembler.new(blocks, caps.block)\nassembler.resolve!(cb, caps.block)\nassembler.fetch(pivot)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Represents a boolean (true/false) value.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/boolean.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"boolean\""}}],"constructors":[{"html_id":"[](object):Boolean-class-method","name":"[]","doc":"Creates a `Boolean` subclass for the given *object*.","summary":"Creates a Boolean
subclass for the given object.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Snapshot of a boolean form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BooleanSnapshot]","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 0, cls: Novika::BooleanSnapshot, onlyif: nil, verify: nil}] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Boolean)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"args_string":"(form : Boolean)","args_html":"(form : Boolean)","location":{"filename":"src/novika/image.cr","line_number":85,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"visibility":"Public","body":"bool = new\nbool.state = form.is_a?(True)\nbool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":73,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"state:Bool-instance-method","name":"state","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state","return_type":"Bool","visibility":"Public","body":"@state == 1"}},{"html_id":"state=(state:UInt8)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"args_string":"(state : UInt8)","args_html":"(state : UInt8)","def":{"name":"state=","args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"visibility":"Public","body":"@state = state"}},{"html_id":"state=(value:Bool)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@state = UInt8.new(value ? 1 : 0)"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":81,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Boolean[state]"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Builtin","path":"Novika/Builtin.html","kind":"struct","full_name":"Novika::Builtin","name":"Builtin","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/builtin.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Wraps a snippet of Crystal (native) code, namely a Crystal\n`Proc`, for usage in the Novika-land.","summary":"Wraps a snippet of Crystal (native) code, namely a Crystal Proc
, for usage in the Novika-land.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/builtin.cr","line_number":20,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << @desc"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":33,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@desc =~ EFFECT_PATTERN ? (io << $~[1]) : \"native code\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the identifier of this builtin.
","abstract":false,"location":{"filename":"src/novika/forms/builtin.cr","line_number":9,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/builtin.cr","line_number":28,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"code.call(engine, engine.stack)\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":37,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[native code for: '\") << id) << \"']\""}}]},{"html_id":"novika/Novika/BuiltinSnapshot","path":"Novika/BuiltinSnapshot.html","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BuiltinSnapshot]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Builtin)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"args_string":"(form : Builtin)","args_html":"(form : Builtin)","location":{"filename":"src/novika/image.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"visibility":"Public","body":"builtin = new\nbuiltin.id = form.id\nbuiltin\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":246,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":252,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"assembler.cb.form_for(Novika::Word.new(id))"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Byteslice","path":"Novika/Byteslice.html","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/byteslice.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DEFAULT_PREVIEW","name":"DEFAULT_PREVIEW","value":"\"byteslice\"","doc":"Holds the default preview string for byteslices.","summary":"Holds the default preview string for byteslices.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":23,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"byteslice\""}}],"constructors":[{"html_id":"new(bytes:Bytes,preview:String=DEFAULT_PREVIEW,mutable:Bool=true)-class-method","name":"new","doc":"Initializes a byteslice from *bytes*.","summary":"Initializes a byteslice from bytes.
","abstract":false,"args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"args_string":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","args_html":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":15,"url":null},"def":{"name":"new","args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(bytes, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(io:IO,preview=DEFAULT_PREVIEW,mutable=true)-class-method","name":"new","doc":"Initializes a byteslice form from the given *io*.","summary":"Initializes a byteslice form from the given io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"args_string":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","args_html":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":19,"url":null},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(io, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(&)-class-method","name":"new","doc":"Yields an IO to the block, then returns a raw bytes\nform for it.","summary":"Yields an IO to the block, then returns a raw bytes form for it.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":82,"url":null},"def":{"name":"new","yields":1,"block_arity":1,"visibility":"Public","body":"io = IO::Memory.new\nyield io\nnew(io)\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @bytes == (other.@bytes)\nelse\n return false\nend\nif @mutable == (other.@mutable)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address-instance-method","name":"address","doc":"Returns the memory address where this byteslice points to.","summary":"Returns the memory address where this byteslice points to.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":66,"url":null},"def":{"name":"address","visibility":"Public","body":"@bytes.to_unsafe.address"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a sub-slice starting at *b*-th byte, and\nending at *e*-th byte.\n\nThe resulting byteslice *does not* preserve the\npreview string of this byteslice.","summary":"Returns a sub-slice starting at b-th byte, and ending at e-th byte.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":39,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nByteslice.new(@bytes[b..e], mutable: @mutable)\n"}},{"html_id":"at(index:Int32)-instance-method","name":"at","doc":"Returns the *index*-th byte.","summary":"Returns the index-th byte.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":28,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"byte = @bytes[index]? || (die(\"index out of bounds\"))\nDecimal.new(byte)\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of bytes in this byteslice.","summary":"Returns the amount of bytes in this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":46,"url":null},"def":{"name":"count","visibility":"Public","body":"@bytes.size"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":50,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @bytes.hash(hasher)\nhasher = @mutable.hash(hasher)\nhasher\n"}},{"html_id":"mutable?:Bool-instance-method","name":"mutable?","doc":"Returns whether this byteslice is mutable.","summary":"Returns whether this byteslice is mutable.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":12,"url":null},"def":{"name":"mutable?","return_type":"Bool","visibility":"Public","body":"@mutable"}},{"html_id":"points_to?(address:UInt64)-instance-method","name":"points_to?","doc":"Returns whether this byteslice points to the given *address*.","summary":"Returns whether this byteslice points to the given address.
","abstract":false,"args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"args_string":"(address : UInt64)","args_html":"(address : UInt64)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":89,"url":null},"def":{"name":"points_to?","args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"visibility":"Public","body":"address == self.address"}},{"html_id":"preview:String-instance-method","name":"preview","doc":"Returns the preview string of this byteslice.","summary":"Returns the preview string of this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":9,"url":null},"def":{"name":"preview","return_type":"String","visibility":"Public","body":"@preview"}},{"html_id":"same?(other:Byteslice)-instance-method","name":"same?","doc":"Returns whether this and *other* byteslices point to the same\nlocation in memory, and have the same mutability status.","summary":"Returns whether this and other byteslices point to the same location in memory, and have the same mutability status.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"args_string":"(other : Byteslice)","args_html":"(other : Byteslice)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":95,"url":null},"def":{"name":"same?","args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"visibility":"Public","body":"(other.points_to?(address)) && (@mutable == other.mutable?)"}},{"html_id":"to_io:IO::Memory-instance-method","name":"to_io","doc":"Wraps the underlying byte slice in an IO.","summary":"Wraps the underlying byte slice in an IO.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":71,"url":null},"def":{"name":"to_io","return_type":"IO::Memory","visibility":"Public","body":"IO::Memory.new(@bytes)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":54,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"[\") << @preview) << \", consists of \") << count) << \" \"\nio << (@mutable ? \"mutable\" : \"immutable\")\nio << \" byte(s)]\"\n"}},{"html_id":"to_unsafe:Bytes-instance-method","name":"to_unsafe","doc":"Returns the underlying byte slice.","summary":"Returns the underlying byte slice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":61,"url":null},"def":{"name":"to_unsafe","return_type":"Bytes","visibility":"Public","body":"@bytes"}},{"html_id":"write_to(io:IO)-instance-method","name":"write_to","doc":"Writes this byteslice to *io*.","summary":"Writes this byteslice to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":76,"url":null},"def":{"name":"write_to","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io.write(@bytes)"}}]},{"html_id":"novika/Novika/BytesliceSnapshot","path":"Novika/BytesliceSnapshot.html","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":268,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BytesliceSnapshot]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.size\nend}, {type: \"bytes\", name: content, cls: Bytes, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Byteslice)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"args_string":"(form : Byteslice)","args_html":"(form : Byteslice)","location":{"filename":"src/novika/image.cr","line_number":278,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"visibility":"Public","body":"byteslice = new\nbyteslice.content = form.to_unsafe\nbyteslice\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":269,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"content:Bytes-instance-method","name":"content","abstract":false,"def":{"name":"content","return_type":"Bytes","visibility":"Public","body":"@content"}},{"html_id":"content=(content:Bytes)-instance-method","name":"content=","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"args_string":"(content : Bytes)","args_html":"(content : Bytes)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"visibility":"Public","body":"@content = content"}},{"html_id":"count:UInt64-instance-method","name":"count","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":274,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Byteslice.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Capabilities","path":"Novika/Capabilities.html","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities","abstract":false,"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/disk.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/ink.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/system.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Capabilities/IConsole","path":"Novika/Capabilities/IConsole.html","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"BG_DEFAULT","name":"BG_DEFAULT","value":"Color.new(Decimal.new(0), Decimal.new(0), Decimal.new(0))","doc":"Background color used when there is no user-provided\nbackground color.","summary":"Background color used when there is no user-provided background color.
"},{"id":"FG_DEFAULT","name":"FG_DEFAULT","value":"Color.new(Decimal.new(255), Decimal.new(255), Decimal.new(255))","doc":"Foreground color used when there is no user-provided\nforeground color.","summary":"Foreground color used when there is no user-provided foreground color.
"}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Console","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables the console API.\n\nExposed vocabulary:\n\n* `console:on`, implemented by `on`\n* `console:off`, implemented by `off`\n* `console:256`, implemented by `colors_256`\n* `console:compat`, implemented by `colors_compat`\n* `console:truecolor`, implemented by `colors_truecolor`\n* `console:readKey`, implemented by `read_key`\n* `console:size`, implemented by `size`\n* `console:hadKeyPressed?`, implemented by `had_key_pressed?`\n* `console:hadCtrlPressed?`, implemented by `had_ctrl_pressed?`\n* `console:hadAltPressed?`, implemented by `had_alt_pressed?`\n* `console:hadShiftPressed?`, implemented by `had_shift_pressed?`\n* `console:hadBackspacePressed?`, implemented by `had_backspace_pressed?`\n* `console:hadFnPressed?`, implemented by `had_fn_pressed?`\n* `console:hadInsertPressed?`, implemented by `had_insert_pressed?`\n* `console:hadDeletePressed?`, implemented by `had_delete_pressed?`\n* `console:hadHomePressed?`, implemented by `had_home_pressed?`\n* `console:hadEndPressed?`, implemented by `had_end_pressed?`\n* `console:hadPgupPressed?`, implemented by `had_pgup_pressed?`\n* `console:hadPgdnPressed?`, implemented by `had_pgdn_pressed?`\n* `console:hadLeftPressed?`, implemented by `had_left_pressed?`\n* `console:hadRightPressed?`, implemented by `had_right_pressed?`\n* `console:hadUpPressed?`, implemented by `had_up_pressed?`\n* `console:hadDownPressed?`, implemented by `had_down_pressed?`\n* `console:getCharPressed`, implemented by `get_char_pressed`\n* `console:change`, implemented by `change`\n* `console:appendEcho`, implemented by `append_echo`\n* `console:present`, implemented by `present`\n* `console:clear`, implemented by `clear`","summary":"Enables the console API.
","class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":45,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"console\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":53,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":49,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"enables the console API\""}}],"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/console.cr","line_number":152,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"bg-instance-method","name":"bg","doc":"Returns the active primary background color.","summary":"Returns the active primary background color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":168,"url":null},"def":{"name":"bg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg1|\n __arg1.bg.last?\nend) || BG_DEFAULT"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/console.cr","line_number":158,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":""}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":64,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":67,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":70,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"fg-instance-method","name":"fg","doc":"Returns the active primary foreground color.","summary":"Returns the active primary foreground color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":163,"url":null},"def":{"name":"fg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg0|\n __arg0.fg.last?\nend) || FG_DEFAULT"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/console.cr","line_number":147,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":95,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":101,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":139,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":92,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":110,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":134,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":116,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":104,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":113,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":107,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":89,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":125,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":122,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":119,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":128,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":98,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":131,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/console.cr","line_number":172,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"console:on\", \"( -- ): enables the console. Must be called before using\\n any other console-related word.\") do |engine|\n on(engine)\nend\ntarget.at(\"console:off\", \"( -- ): disables the console. Must be called at the end\\n of your program or when you don't need console anymore.\") do |engine|\n off(engine)\nend\ntarget.at(\"console:compat\", \"( -- ): enables the compatibility color output mode. In\\n this mode, only 8 colors are available. All RGB colors\\n are automatically reduced to one of those 8 colors.\") do |engine|\n colors_compat(engine)\nend\ntarget.at(\"console:256\", \"( -- ): enables the 256-color output mode. In this mode,\\n 256 colors are available. All RGB colors are automatically\\n reduced to one of those 256 colors.\") do |engine|\n colors_256(engine)\nend\ntarget.at(\"console:truecolor\", \"( -- ): enables the truecolor output mode. In this mode,\\nall colors are available and are passed to the console\\nas-is.\") do |engine|\n colors_truecolor(engine)\nend\ntarget.at(\"console:size\", \"( -- Cw Ch ): leaves the Console width (in columns) and\\n Console height (in rows).\") do |engine, stack|\n w, h = size(engine)\n w.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"console:setTimeout\", \"( D -- ): sets input timeout to Duration, given in *milliseconds*.\\n\\n * If Duration is negative, `console:readKey` will wait\\n for input indefinitely (i.e., until there is input).\\n\\n * If Duration is zero, `console:readKey` won't wait for\\n input at all, but make note if there is any at the moment.\\n\\n * If Duration is positive, `console:readKey` will peek\\n during the timeout window.\") do |_, stack|\n @timeout = stack.drop.a(Decimal)\nend\ntarget.at(\"console:readKey\", \"( -- ): peeks or waits for input. See `console:setTimeout`.\\n Refreshes the input state. Use `console:hadKeyPressed` and\\n friends to explore the input state afterwards.\") do |engine|\n read_key(engine, @timeout)\nend\ntarget.at(\"console:hadKeyPressed?\", \"( -- true/false ): leaves whether any key was pressed.\") do |engine, stack|\n (had_key_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCtrlPressed?\", \"( -- true/false ): leaves whether the CTRL key was pressed.\") do |engine, stack|\n (had_ctrl_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadAltPressed?\", \"( -- true/false ): leaves whether the ALT key was pressed.\") do |engine, stack|\n (had_alt_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadShiftPressed?\", \"( -- true/false ): leaves whether the SHIFT key was pressed.\") do |engine, stack|\n (had_shift_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadBackspacePressed?\", \"( -- true/false ): leaves whether the Backspace key was pressed.\") do |engine, stack|\n (had_backspace_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadFnPressed?\", \"( -- true/false ): leaves whether one of the function keys\\n F1-F12 was pressed.\") do |engine, stack|\n (had_fn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadInsertPressed?\", \"( -- true/false ): leaves whether the INSERT key was pressed.\") do |engine, stack|\n (had_insert_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDeletePressed?\", \"( -- true/false ): leaves whether the DELETE key was pressed.\") do |engine, stack|\n (had_delete_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadHomePressed?\", \"( -- true/false ): leaves whether the HOME key was pressed.\") do |engine, stack|\n (had_home_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadEndPressed?\", \"( -- true/false ): leaves whether the END key was pressed.\") do |engine, stack|\n (had_end_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageUpPressed?\", \"( -- true/false ): leaves whether the PAGE UP key was pressed.\") do |engine, stack|\n (had_pgup_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageDownPressed?\", \"( -- true/false ): leaves whether the PAGE DOWN key was pressed.\") do |engine, stack|\n (had_pgdn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadLeftPressed?\", \"( -- true/false ): leaves whether the LEFT ARROW key was pressed.\") do |engine, stack|\n (had_left_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadRightPressed?\", \"( -- true/false ): leaves whether the RIGHT ARROW key was pressed.\") do |engine, stack|\n (had_right_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadUpPressed?\", \"( -- true/false ): leaves whether the UP ARROW key was pressed.\") do |engine, stack|\n (had_up_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDownPressed?\", \"( -- true/false ): leaves whether the DOWN ARROW key was pressed.\") do |engine, stack|\n (had_down_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCharPressed?\", \"( -- true/false ): leaves whether EXCLUSIVELY a printable\\n character key was pressed (no CTRL, ALT, etc.) Whether the\\n SHIFT key was pressed or not is ignored.\") do |engine, stack|\n (had_char_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:getCharPressed\", \"( -- Cq ): leaves Char quote for the key that was pressed.\\n Usually a lowercase or uppercase letter; but also may look\\n like `'\\\\n'` or `'\\\\t'`, etc.)\\n\\nIn case the key that was pressed cannot be represented\\nby the means of a quote, or if the user did not press\\nany key, an empty quote is left in place of Char quote.\") do |engine, stack|\n (get_char_pressed(engine)).onto(stack)\nend\ntarget.at(\"console:change\", \"( X Y -- ): changes the color of the cell at X, Y coordinates\\n to be the foreground, background colors set by ink's\\n `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n change(engine, x, y, fg, bg)\nend\ntarget.at(\"console:appendEcho\", \"( F X Y -- ): appends echo of Form at an X and Y position\\n (in columns and rows correspondingly) using the foreground,\\n background colors set by ink's `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, fg, bg, q)\nend\ntarget.at(\"console:withReverseAppendEcho\", \"( F X Y -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, bg, fg, q)\nend\ntarget.at(\"console:present\", \"( -- ): syncs internal buffer and console.\") do |engine|\n present(engine)\nend\ntarget.at(\"console:clear\", \"( -- ): clears console with primary colors.\") do |engine|\n clear(engine, fg, bg)\nend\n"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":61,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":58,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":155,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":86,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":73,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IDisk","path":"Novika/Capabilities/IDisk.html","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/disk.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Disk","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"disk\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes various disk-related (storage-related) words\""}}],"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":18,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":63,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":35,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":21,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":24,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":27,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":30,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":46,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":79,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"disk:has?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n on the disk.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:canRead?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and is readable.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (can_read?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasDir?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a directory.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_dir?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasFile?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a file.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_file?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasSymlink?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a symlink.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_symlink?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:dirEmpty?\", \"( Pq -- true/false ): leaves whether the directory at Path quote\\n is empty. Dies if Path quote points to something other than\\n a directory, or doesn't exist.\") do |engine, stack|\n path = stack.drop.a(Quote)\n if boolean = dir_empty?(engine, path)\n else\n path.die(\"no directory at path\")\n end\n boolean.onto(stack)\nend\ntarget.at(\"disk:join\", \"( Bpq Cpq -- Pq ): leaves Path quote, which is the result of joining\\n Base path quote and Child path quote using the platform-specific\\n path separator.\\n\\n```\\n'hello' 'world' disk:join leaves: 'hello/world' \\\"On Unix\\\"\\n'hello' 'world' disk:join leaves: 'hello\\\\\\\\world' \\\"On Windows\\\"\\n```\") do |engine, stack|\n cp = stack.drop.a(Quote)\n bp = stack.drop.a(Quote)\n (join(engine, bp, cp)).onto(stack)\nend\ntarget.at(\"disk:pwd\", \"( -- Pq ): leaves Path quote pointing to the current working directory.\") do |engine, stack|\n (pwd(engine)).onto(stack)\nend\ntarget.at(\"disk:home\", \"( -- Pq ): leaves Path quote pointing to the user's home directory.\") do |engine, stack|\n (home(engine)).onto(stack)\nend\ntarget.at(\"disk:touch\", \"( Pq -- ): creates an empty file at the location that Path quote\\n points to. Does nothing if Path already exists.\\n\\n```\\ndisk:pwd 'demo.txt' disk:join $: demoPath\\ndemoPath disk:touch 'Hey!' demoPath disk:write\\ndemoPath disk:read leaves: 'Hey!'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n touch(engine, path)\nend\ntarget.at(\"disk:mkdir\", \"( Pq -- ): creates an empty directory at the location that Path\\n quote points to. Also creates any non-existing intermediate\\n directories. Does nothing if Path quote already points to an\\n existing directory, file, symlink, etc.\\n\\n```\\ndisk:pwd 'demo-dir-a' disk:join\\n 'demo-dir-b' disk:join\\n 'demo-dir-c' disk:join $: demoDirPath\\n\\ndemoDirPath disk:mkdir\\ndemoDirPath disk:hasDir? leaves: true\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n mkdir(engine, path)\nend\ntarget.at(\"disk:copy\", \"( Spq Dpq -- ): copies whatever Source path quote points to, to the\\n location that Destination path quote points to. If Source is a\\n directory, it is copied recursively.\\n\\nIf copy process failed (for instance if there is already something\\nat Destination path quote), dies.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\ndisk:pwd 'b.txt' disk:join $: pathToB\\n\\npathToA disk:touch pathToA 'Content of file a.txt' disk:write\\npathToA pathToB disk:copy\\n\\npathToA disk:read leaves: 'Content of file a.txt'\\npathToB disk:read leaves: 'Content of file a.txt'\\n```\") do |engine, stack|\n dst = stack.drop.a(Quote)\n src = stack.drop.a(Quote)\n if copy(engine, src, dst)\n else\n src.die(\"could not copy\")\n end\nend\ntarget.at(\"disk:read\", \"( Pq -- Q ): leaves Quote containing the content of the file that\\n Path quote points to. Dies if Path quote points to nothing or if\\n it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n if contents = read?(engine, path)\n else\n path.die(\"no file at path\")\n end\n contents.onto(stack)\nend\ntarget.at(\"disk:write\", \"( Q/Bf Pq -- ): (over)writes the content of the file that Path quote\\n points to, with the given Quote or Byteslice form. Dies if Path quote\\n points to nothing or if it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n\\n[ 0 $: count\\n [ count dup 1 + =: count ]\\n] @: counter\\n\\ncounter @: inc\\ninc leaves: 0\\ninc leaves: 1\\ninc leaves: 2\\n\\ndisk:pwd 'counter.nki' disk:join $: pathToCounter\\npathToCounter disk:touch\\n\\n\\\"Save inc state using NKI and write the resulting byteslice\\n to the file we've just created. Note that captureAll is similar\\n to deep copy (it copies the *entire* Novika environment including\\n the standard library), it's not the best way to do this but\\n by far the easiest.\\\"\\n(this -> inc nki:captureAll) pathToCounter disk:write\\n\\npathToCounter disk:read toByteslice nki:toBlock @: incFromDisk\\n\\nincFromDisk leaves: 3\\nincFromDisk leaves: 4\\nincFromDisk leaves: 5\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n content = stack.drop.a(Quote | Byteslice)\n if write?(engine, content, path)\n else\n path.die(\"no file at path\")\n end\nend\n"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":40,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":55,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":43,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":67,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":""}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":50,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":72,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":77,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IFrontend","path":"Novika/Capabilities/IFrontend.html","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Frontend","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"frontend\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes information about the language frontend\""}}],"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":21,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":23,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"novika:version\", \"( -- Vq ): leaves Version of the frontend as a quote.\") do |engine, stack|\n (version(engine)).onto(stack)\nend\ntarget.at(\"novika:capabilities\", \"( -- Lb ): lists the ids of capabilities provided by the\\n frontend in List block.\\n\\n```\\n\\\"Yours may differ!\\\"\\nnovika:capabilities leaves: [ [ 'essential' 'colors' 'console' ] ]\\n```\") do |engine, stack|\n (capabilities(engine)).onto(stack)\nend\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":18,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IInk","path":"Novika/Capabilities/IInk.html","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/ink.cr","line_number":14,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"NO_SYSTEM_ECHO_ERROR","name":"NO_SYSTEM_ECHO_ERROR","value":"\"with...Echo words need 'echo' from capability 'system', but this capability is not available\""}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Ink","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables colorful output using `withColorAppendEcho` and friends.\n\nExposed vocabulary:\n\n* `withEchoFg`, generic implementation\n* `withEchoBg`, generic implementation\n* `dropEchoFg`, generic implementation\n* `dropEchoBg`, generic implementation\n* `withColorAppendEcho`, implemented by `with_color_append_echo`\n* `withEmphasisAppendEcho`, implemented by `with_emphasis_append_echo`\n* `withReverseAppendEcho`, generic implementation; when no\n colors given by the use, `with_reverse_append_echo` is used.","summary":"Enables colorful output using withColorAppendEcho
and friends.
Echo background color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg","visibility":"Public","body":"@bg"}},{"html_id":"bg=(bg:Array(Novika::Color))-instance-method","name":"bg=","doc":"Echo background color stack.","summary":"Echo background color stack.
","abstract":false,"args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"args_string":"(bg : Array(Novika::Color))","args_html":"(bg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg=","args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@bg = bg"}},{"html_id":"enabled=(enabled:Bool)-instance-method","name":"enabled=","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"args_string":"(enabled : Bool)","args_html":"(enabled : Bool)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled=","args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"visibility":"Public","body":"@enabled = enabled"}},{"html_id":"enabled?:Bool-instance-method","name":"enabled?","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled?","return_type":"Bool","visibility":"Public","body":"if (value = @enabled).nil?\n @enabled = (Novika.colorful?)\nelse\n value\nend"}},{"html_id":"fg:Array(Novika::Color)-instance-method","name":"fg","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg","visibility":"Public","body":"@fg"}},{"html_id":"fg=(fg:Array(Novika::Color))-instance-method","name":"fg=","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"args_string":"(fg : Array(Novika::Color))","args_html":"(fg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg=","args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@fg = fg"}},{"html_id":"inject(intotarget)-instance-method","name":"inject","doc":"Injects the colors vocabulary into *target*.","summary":"Injects the colors vocabulary into target.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":62,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"withEchoFg\", \"( C -- ): pushes Color form onto the echo foreground\\n color stack.\") do |_, stack|\n fg << (stack.drop.a(Color))\nend\ntarget.at(\"withEchoBg\", \"( C -- ): pushes Color form onto the echo background\\n color stack.\") do |_, stack|\n bg << (stack.drop.a(Color))\nend\ntarget.at(\"dropEchoFg\", \"( -- ): drops a color from the echo foreground color stack.\") do\n fg.pop?\nend\ntarget.at(\"dropEchoBg\", \"( -- ): drops a color from the echo background color stack.\") do\n bg.pop?\nend\ntarget.at(\"withReverseAppendEcho\", \"( F -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\\n\\nNote: if unsupported by the output stream, will print\\nForm as-is.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? && bg.last?)\n with_color_append_echo(engine, bg.last, fg.last, form)\n else\n with_reverse_append_echo(engine, form)\n end\nend\ntarget.at(\"withEmphasisAppendEcho\", \"( F -- ): same as `withColorAppendEcho`, but also emphasizes\\n echo of Form. Bold style is used by default, but implementors\\n may choose e.g. italic.\") do |engine, stack|\n form = stack.drop\n if enabled?\n with_emphasis_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\ntarget.at(\"withColorAppendEcho\", \"( F -- ): appends Form with last color from the echo\\n foreground color stack set as foreground color, and\\n last color from the echo background stack set as background\\n color, to the standard output stream.\\n\\nNote: some implementations (particularly Novika's default\\nimplementation) choose to restrict foreground and background\\ncolors to system's basic 16 colors for compatibility &\\nportability. If you want more cross-platform control over\\ncolors (and pretty much everything else), take a look at\\nconsole capability.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? || bg.last?)\n with_color_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\n"}},{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":46,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":59,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/Impl","path":"Novika/Capabilities/Impl.html","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl","abstract":false,"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/colors.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/console.cr","line_number":5,"url":null},{"filename":"src/novika/capabilities/impl/disk.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/essential.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ink.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/nki.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/system.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"types":[{"html_id":"novika/Novika/Capabilities/Impl/Bit","path":"Novika/Capabilities/Impl/Bit.html","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"bit\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"allows to interpret decimals as sequences of bits\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"bit:fromLeft\", \"( D I -- B ): leaves Index-th Bit from left in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromLeft leaves: 1\\n0b00010001 1 bit:fromLeft leaves: 0\\n0b00010001 2 bit:fromLeft leaves: 0\\n0b00010001 3 bit:fromLeft leaves: 0\\n0b00010001 4 bit:fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n if bit = decimal.nth_ms_bit?(index)\n else\n index.die(\"bit index out of bounds\")\n end\n bit.onto(stack)\nend\ntarget.at(\"bit:fromRight\", \"( D I -- B ): leaves Index-th Bit from right in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromRight leaves: 1\\n0b00010001 1 bit:fromRight leaves: 0\\n0b00010001 2 bit:fromRight leaves: 0\\n0b00010001 3 bit:fromRight leaves: 0\\n0b00010001 4 bit:fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n (decimal.nth_ls_bit(index)).onto(stack)\nend\ntarget.at(\"bit:count\", \"( D -- Bc ): leaves Bit count, the number of bits in the given\\n Decimal. Dies if Decimal has a fractional part.\\n\\n```\\n0b00010001 bit:count leaves: 4\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n decimal.bitcount.onto(stack)\nend\ntarget.at(\"bit:or\", \"( D D -- D ): combines two Decimal numbers using bitwise or, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b00010001\\n0b10001000 bit:or leaves:\\n0b10011001\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a | b).onto(stack)\nend\ntarget.at(\"bit:and\", \"( D D -- D ): combines two Decimal numbers using bitwise and, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b10011001\\n0b00011000 bit:and leaves:\\n0b00011000\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a & b).onto(stack)\nend\ntarget.at(\"bit:bits\", \"( D -- Bb ): leaves Bits block for the given Decimal, which contains\\n the binary representation of the *absolute value* of Decimal, starting\\n with the most-significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [ 1 0 0 1 1 0 0 1 ]\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n bits = Block.new\n decimal.each_bit(&.onto(bits))\n bits.onto(stack)\nend\ntarget.at(\"bit:fromBits\", \"( Bb -- D ): converts Bits block to a Decimal. Bits block should\\n contain binary digits (represented by `0` or `1`), and should\\n begin with the most significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [[ 1 0 0 1 1 0 0 1 ]]\\n bit:fromBits leaves: 0b10011001\\n```\") do |_, stack|\n bits = stack.drop.a(Block)\n acc = Decimal.new(0)\n pow = Decimal.new(bits.count - 1)\n one = Decimal.new(1)\n two = Decimal.new(2)\n bits.each do |bit|\n acc = acc + (((bit.a(Decimal)).int.in(0..1)) * (two ** pow))\n pow = pow - one\n end\n acc.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Colors","path":"Novika/Capabilities/Impl/Colors.html","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/colors.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"colors\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes vocabulary for working with colors\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"rgb\", \"( R G B -- Cf ): creates a Color form from three decimals\\n Red (0-255), Green (0-255), and Blue (0-255).\\n\\n```\\n36 255 255 rgb toQuote leaves: 'rgb(36, 255 ,255)'\\n```'\") do |_, stack|\n b = ((stack.drop.a(Decimal)).in(0..255)).posint\n g = ((stack.drop.a(Decimal)).in(0..255)).posint\n r = ((stack.drop.a(Decimal)).in(0..255)).posint\n (Color.rgb(r, g, b)).onto(stack)\nend\ntarget.at(\"getRGB\", \"( Cf -- R G B ): leaves Red, Green, Blue values for a\\n Color form.\\n\\n```\\n0 25 3 rgb \\\"rgb(0, 25, 3)\\\" getRGB leaves: [ 0 25 3 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n r, g, b = color.rgb\n r.onto(stack)\n g.onto(stack)\n b.onto(stack)\nend\ntarget.at(\"hsl\", \"( H S L -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Lightness (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSL color is\\nfirst converted into RGB.\\n\\n```\\n206 35 46 hsl toQuote leaves: 'rgb(76, 123, 158)'\\n```\") do |_, stack|\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsl(h, s, l)).onto(stack)\nend\ntarget.at(\"getHSL\", \"( Cf -- H S L ): leaves Hue, Saturation, Lightness for\\n a Color form.\\n\\n```\\n206 35 46 hsl \\\"rgb(76, 123, 158)\\\" getHSL leaves: [ 206 35 46 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, l = color.hsl\n h.onto(stack)\n s.onto(stack)\n l.onto(stack)\nend\ntarget.at(\"hsv\", \"( H S V -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Value (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSV color is\\nfirst converted into RGB.\\n\\n```\\n120 100 100 hsv toQuote leaves: 'rgb(0, 255, 0)'\\n```\") do |_, stack|\n v = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsv(h, s, v)).onto(stack)\nend\ntarget.at(\"getHSV\", \"( Cf -- H S V ): leaves Hue, Saturation, Value for a\\n Color form.\\n\\n```\\n180 100 50 hsv \\\"rgb(0,128,128)\\\" getHSV leaves: [ 180 100 50 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, v = color.hsv\n h.onto(stack)\n s.onto(stack)\n v.onto(stack)\nend\ntarget.at(\"lch\", \"( L C H -- Cf ): creates a Color form from three decimals\\n Lightness (0-100), Chroma (0-132), Hue (0-360).\\n\\nSince color forms are stored as RGB, the LCH color is\\nfirst converted into RGB.\\n\\nLCH colors are tricky to implement but very fun to use.\\nThat's why they're in Novika's standard library.\\n\\nCIELAB encloses more colors than sRGB, so some conversion\\nimprecisions *are* to be expected because some colors just\\nfall out of sRGB gamut (lossiness is especially noticeable\\nin LCH -> RGB -> LCH conversions, but it stabilizes on the\\nlast step because the last step's LCH is guraranteed to be\\ninside the sRGB gamut).\\n\\nAny color out of the sRGB gamut is brought into the sRGB\\ngamut by lowering chroma until it's in the sRGB bounds.\\n\\nHere is a 'good' conversion, meaning it nicely closes\\non itself:\\n\\n```\\n78 74 133 lch $: color\\n\\ncolor toQuote leaves: 'rgb(122, 215, 85)'\\ncolor getLCH leaves: [ 78 74 133 ]\\ncolor getLCH lch toQuote leaves: 'rgb(122, 215, 85)''\\n\\\"And so on...\\\"\\n```\\n\\nAnd here is a bad conversion. At first, though, for it\\ndoes stabilize after a few rounds as it falls firmly\\ninto the sRGB color space.\\n\\n```\\n74 107 26 lch $: color\\ncolor toQuote leaves: 'rgb(255, 154, 151)'\\n\\n\\\"Note how many chroma units we lose! Plus, Lab and\\n LCH have hue shift on chroma changes, hence 26 -> 25.\\\"\\ncolor getLCH leaves: [ 74 41 25 ]\\n\\ncolor getLCH lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\ncolor getLCH lch getLCH leaves: [ 74 41 25 ]\\n\\\"... and so on, conversion had stabilized ...\\\"\\n```\\n\\nYou don't necessarily have to think about this, because\\nthe resulting colors do look very similar, differing in\\npoints rather than magnitudes. Just be aware that the\\nconversion method used by this word and `getLCH` is lossy\\nin some cases.\") do |_, stack|\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n c = ((stack.drop.a(Decimal)).in(0..132)).posint\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n (Color.lch(l, c, h)).onto(stack)\nend\ntarget.at(\"getLCH\", \"( Cf -- L C H ): leaves Lightness, Chroma, Hue for a Color\\n form. Please read documentation for `lch` to understand\\n why `a b c lch getLCH` might not leave `a b c`.\\n\\n```\\n78 74 133 lch toQuote leaves: 'rgb(122, 215, 85)'\\n78 74 133 lch getLCH leaves: [ 78 74 133 ]\\n\\n74 107 26 lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\n\\\"Chroma lowered to fit into sRGB. Lab and LCH have hue\\n shift on chroma changes, 26 -> 25\\\"\\n74 107 26 lch getLCH leaves: [ 74 41 25 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n l, c, h = color.lch\n l.onto(stack)\n c.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"withAlpha\", \"( Cf A -- Cf' ): leaves Color form with alpha channel\\n set to Alpha (0-255).\\n\\n```\\n0 25 3 rgb toQuote leaves: 'rgb(0, 25, 3)'\\n0 25 3 rgb 100 withAlpha toQuote leaves: 'rgba(0, 25, 3, 100)'\\n```\") do |_, stack|\n alpha = ((stack.drop.a(Decimal)).in(0..255)).posint\n color = stack.drop.a(Color)\n color.a = alpha\n color.onto(stack)\nend\ntarget.at(\"getAlpha\", \"( Cf -- A ): leaves Alpha for the given Color form.\\n\\n```\\n0 25 3 rgb getAlpha leaves: 255 \\\"Opaque = 255\\\"\\n0 25 3 rgb 100 withAlpha getAlpha leaves: 100\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n color.a.onto(stack)\nend\ntarget.at(\"fromPalette\", \"( Cf Pb -- Cc ): leaves the Closest color form to Color from\\n a Palette block. How close the color is is determined by\\n distance: the Closest color is that color in Palette block\\n to which Color has least (minimum) distance.\\n\\n```\\n[ 0 0 0 rgb\\n 255 0 0 rgb\\n 0 255 0 rgb\\n 0 0 255 rgb\\n 255 255 255 rgb\\n] vals $: pal\\n\\n0 0 0 rgb pal fromPalette toQuote leaves: 'rgb(0, 0, 0)'\\n76 175 80 rgb pal fromPalette \\\"greenish\\\" toQuote leaves: 'rgb(0, 255, 0)'\\n220 237 200 rgb pal fromPalette \\\"very light green\\\" toQuote leaves: 'rgb(255, 255, 255)'\\n74 20 140 rgb pal fromPalette \\\"very dark purple\\\" toQuote leaves: 'rgb(255, 0, 0)'\\n```\") do |_, stack|\n palette = stack.drop.a(Block)\n color = stack.drop.a(Color)\n colors = [] of Color\n palette.each do |pcolor|\n colors << (pcolor.a(Color))\n end\n (color.closest(colors)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Console","path":"Novika/Capabilities/Impl/Console.html","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/console.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":208,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.print(xi, yi, fg, bg, quote.string[...(Termbox.width - xi)])\nend\n"}},{"html_id":"change(engine,x:Decimal,y:Decimal,fg:Color,bg:Color)-instance-method","name":"change","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":199,"url":null},"def":{"name":"change","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.change(xi, yi, fg, bg)\nend\n"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":221,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nTermbox.clear(fg, bg)\nTermbox.clear\n"}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":21,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M256_A\nTermbox.set_output_mode(Termbox::OutputMode::M256)\n"}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":26,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M8_A\nTermbox.set_output_mode(Termbox::OutputMode::Normal)\n"}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":31,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = nil\nTermbox.set_output_mode(Termbox::OutputMode::Truecolor)\n"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":110,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"if event = @event.as?(Termbox::Event::KeyEvent)\nelse\n return Quote.new(\"\")\nend\nif char = event.char\n return Quote.new(char)\nend\nkey = event.key.not_nil!\ncase key\nwhen .ctrl_tilde?\n char = '~'\nwhen .ctrl_2?\n char = '2'\nwhen .ctrl_a?\n char = 'a'\nwhen .ctrl_b?\n char = 'b'\nwhen .ctrl_c?\n char = 'c'\nwhen .ctrl_d?\n char = 'd'\nwhen .ctrl_e?\n char = 'e'\nwhen .ctrl_f?\n char = 'f'\nwhen .ctrl_g?\n char = 'g'\nwhen .ctrl_h?\n char = 'h'\nwhen .tab?\n char = '\\t'\nwhen .ctrl_i?\n char = 'i'\nwhen .ctrl_j?\n char = 'j'\nwhen .ctrl_k?\n char = 'k'\nwhen .ctrl_l?\n char = 'l'\nwhen .enter?\n char = '\\n'\nwhen .ctrl_m?\n char = 'm'\nwhen .ctrl_n?\n char = 'n'\nwhen .ctrl_o?\n char = 'o'\nwhen .ctrl_p?\n char = 'p'\nwhen .ctrl_q?\n char = 'q'\nwhen .ctrl_r?\n char = 'r'\nwhen .ctrl_s?\n char = 's'\nwhen .ctrl_t?\n char = 't'\nwhen .ctrl_u?\n char = 'u'\nwhen .ctrl_v?\n char = 'v'\nwhen .ctrl_w?\n char = 'w'\nwhen .ctrl_x?\n char = 'x'\nwhen .ctrl_y?\n char = 'y'\nwhen .ctrl_z?\n char = 'z'\nwhen .esc?\n char = '\\e'\nwhen .ctrl_lsq_bracket?\n char = '['\nwhen .ctrl_3?\n char = '3'\nwhen .ctrl_4?\n char = '4'\nwhen .ctrl_backslash?\n char = '\\\\'\nwhen .ctrl_5?\n char = '5'\nwhen .ctrl_rsq_bracket?\n char = ']'\nwhen .ctrl_6?\n char = '6'\nwhen .ctrl_7?\n char = '7'\nwhen .ctrl_slash?\n char = '/'\nwhen .ctrl_underscore?\n char = '_'\nwhen .space?\n char = ' '\nwhen .ctrl_8?\n char = '8'\nwhen .f1?\n char = '1'\nwhen .f2?\n char = '2'\nwhen .f3?\n char = '3'\nwhen .f4?\n char = '4'\nwhen .f5?\n char = '5'\nwhen .f6?\n char = '6'\nwhen .f7?\n char = '7'\nwhen .f8?\n char = '8'\nwhen .f9?\n char = '9'\nwhen .f10?\n char = \"10\"\nwhen .f11?\n char = \"11\"\nwhen .f12?\n char = \"12\"\nelse\n return Quote.new(\"\")\nend\nQuote.new(char)\n"}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":56,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.alt?]\n"}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":80,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n key.backspace? || key.backspace2?\nend"}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":106,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"Boolean[!(!(@event.as?(Termbox::Event::KeyEvent)).try do |__arg5|\n __arg5.char.try(&.printable?)\nend)]"}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":50,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.ctrl?]\n"}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.delete?)"}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":102,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_down?)"}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.end?)"}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":68,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n case key\n when .f1?, .f2?, .f3?, .f4?, .f5?, .f6?, .f7?, .f8?, .f9?, .f10?, .f11?, .f12?\n true\n end\nend"}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.home?)"}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.insert?)"}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":44,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[!(!event)]\n"}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":90,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_left?)"}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgdn?)"}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgup?)"}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":94,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_right?)"}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":62,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && (event.char.try(&.uppercase?) || event.mod.shift?)]\n"}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":98,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_up?)"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":17,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.disable"}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":13,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.enable"}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":217,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.present"}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":40,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":"@event = Termbox.peek?(timeout.to_i)"}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":36,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":"{Decimal.new(Termbox.width), Decimal.new(Termbox.height)}"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Disk","path":"Novika/Capabilities/Impl/Disk.html","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/disk.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":5,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.readable?(path.string)]"}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":51,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if File.exists?(src.string)\nelse\n return false\nend\nFileUtils.cp_r(src.string, dst.string)\ntrue\n"}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":25,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":"if File.directory?(path.string)\n Boolean[Dir.empty?(path.string)]\nend"}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":9,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.exists?(path.string)]"}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":17,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[Dir.exists?(path.string)]"}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":13,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.file?(path.string)]"}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":21,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.symlink?(path.string)]"}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":37,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Path.home.to_s)"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":29,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(File.join(base.string, child.string))"}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":45,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"if File.exists?(path.string)\n return\nend\nFileUtils.mkdir_p(path.string)\n"}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":33,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Dir.current)"}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":59,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if File.file?(path.string)\n Quote.new(File.read(path.string))\nend"}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":41,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"File.touch(path.string)"}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":63,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.write(path.string, content.string)\ntrue\n"}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":71,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.open(path.string, \"wb\") do |handle|\n content.write_to(handle)\nend\ntrue\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Essential","path":"Novika/Capabilities/Impl/Essential.html","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/essential.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"essential\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes essential native code vocabulary, such as 'hydrate' and 'new'\""}}],"instance_methods":[{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(Word.new(\"true\"), True.new)\ntarget.at(Word.new(\"false\"), False.new)\ntarget.at(\"prototype\", \"( B -- Pb ): leaves the Prototype block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.prototype.onto(stack)\nend\ntarget.at(\"parent\", \"( B -- Pb ): leaves the Parent block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n if parent = block.parent?\n else\n block.die(\"no parent for block\")\n end\n parent.onto(stack)\nend\ntarget.at(\"address\", \"( B -- A ): leaves pointer Address of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.object_id)).onto(stack)\nend\ntarget.at(\"conts\", \"( -- Cb ): pushes the Continuations block.\") do |engine, stack|\n engine.conts.onto(stack)\nend\ntarget.at(\"cont\", \"( -- Cb ): pushes the Continuation block.\") do |engine, stack|\n engine.cont.onto(stack)\nend\ntarget.at(\"newContinuation\", \"( S B -- C ): creates a Continuation from a Stack and\\n a Block.\") do |_, stack|\n Engine.cont(block: stack.drop.a(Block), stack: stack.drop.a(Block)).onto(stack)\nend\ntarget.at(\"getContBlock\", \"( C -- Cb ): leaves the Code block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_BLOCK_AT)).onto(stack)\nend\ntarget.at(\"getContStack\", \"( C -- Sb ): leaves the Stack block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_STACK_AT)).onto(stack)\nend\ntarget.at(\"this\", \"( -- B ): pushes the Block it's opened in.\\n\\n```\\n[ this ] open echo\\n\\\"STDOUT: [ this ]⏎ (instance of `[ this ]`)\\\"\\n```\") do |engine, stack|\n engine.block.onto(stack)\nend\ntarget.at(\"stack\", \"( -- S ): pushes the Stack it's opened in.\\n\\n```\\nstack dup echo\\n\\\"STDOUT: [ ⭮ ]⏎\\\"\\n\\n'foo' <<\\nstack echo\\n\\\"STDOUT: [ ⭮ 'foo' ]⏎\\\"\\n```\") do |_, stack|\n stack.onto(stack)\nend\ntarget.at(\"ahead\", \"( -- B ): leaves the block that will be executed after\\n `this` finishes.\\n\\n```\\n100 [ ahead 1 inject ] open + leaves: 101 \\\"(i.e. 100 1 +)\\\"\\n```\") do |engine, stack|\n cont = engine.conts.at(engine.conts.count - 2)\n cont = (cont.as?(Block)) || (cont.die(\"malformed continuation\"))\n ahead = cont.at(Engine::C_BLOCK_AT)\n ahead.onto(stack)\nend\ntarget.at(\"resume\", \"( B -- ): closes blocks all the way up to, but not\\n including, Block.\") do |engine, stack|\n block = stack.drop.a(Block)\n conts = engine.conts\n found = false\n while !(conts.tape.empty? || (found = block.same?(engine.block)))\n conts.drop\n end\n if found\n else\n block.die(\"resume: no such block in continuations\")\n end\nend\ntarget.at(\"dup\", \"( F -- F F ): duplicates the Form before cursor.\\n\\n```\\n'hello' dup leaves: [ 'hello' 'hello' ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ dup ] hydrate\\nblock leaves: [ [ 1 2 2 | 3 ] ]\\n```\") do |_, stack|\n stack.dupe\nend\ntarget.at(\"drop\", \"( F -- ): drops the Form before cursor.\\n\\n```\\n'hello' drop leaves: [ ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ drop ] hydrate\\nblock leaves: [ [ 1 | 3 ] ]\\n```\") do |_, stack|\n stack.drop\nend\ntarget.at(\"swap\", \"( A B -- B A ): swaps two Forms before cursor.\\n\\n```\\n1 2 swap leaves: [ 2 1 ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ swap ] hydrate\\nblock leaves: [ [ 2 1 | 3 ] ]\\n```\") do |_, stack|\n stack.swap\nend\ntarget.at(\"hydrate\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, it is added to\\n Stack (equivalent to `<<`), If Form is a block, its\\n instance is opened. To open a block without creating\\n an instance of it (unsafe), use `hydrate!`.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"hydrate!\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, the behavior is\\n the same as in `hydrate`. If Form is a block, performs\\n unsafe hydration (hydrates without making an instance\\n of the block). For a safer alternative, see `hydrate`.\\n Use if you know what you're doing, or if you're ready\\n to make an instance yourself.\\n\\nDetails: `hydrate!` is considered unsafe because hydration\\nartifacts are exposed to the user and/or its blocks. The\\ncontents of a block after hydration may differ from its\\ncontents before unsafe hydration. Indeed, `hydrate!` is\\nalmost as unsafe as pushing into `conts`; the only benefit\\nit provides is that it is able to catch infinite/very\\ndeep recursion.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule!(form, new_stack)\nend\ntarget.at(\"open\", \"( F -- F' ): opens Form in the active stack. Equivalent\\n to `stack F hydrate`.\\n\\n```\\n100 open leaves: 100\\n\\n1 [ 2 + ] open leaves: 3\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, stack)\nend\ntarget.at(\"there\", \"( S B -- S ): opens Block with Stack set as the active\\n stack. Leaves Stack. Ahead is transferred to block.\\n\\n```\\n[ 1 2 ] [ + ] there leaves: [ [ 3 ] ]\\n[ 1 2 ] [ ahead thruBlock open ] there + leaves: [ [ 3 ] ]\\n```\") do |engine, stack|\n form = stack.drop\n new_stack = stack.top.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"do\", \"( F -- ): opens Form with an empty stack activated, and\\n disposed when Form has been evaluated.\\n\\n```\\n[ 'Hi!' echo ] do\\n\\\"STDOUT: Hi!⏎\\\"\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, Block.new)\nend\ntarget.at(\"new\", \"( B -- I ): leaves an Instance of a Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance.onto(stack)\nend\ntarget.at(\"shallowNew\", \"( B -- Si ): leaves a Shallow instance of Block.\\n\\n`shallowNew` is different from `new` in that it does not reparent\\nsub-blocks to the parent instance recursively. Instead, it only\\ncreates an instance of Block, and does not look at skips its\\ncontent entirely.\\n\\n```\\n[ $: x [ x ] ] @: newBox\\n\\n1 newBox $: fooBox1\\n2 newBox $: fooBox2\\n3 newBox $: fooBox3\\n\\nfooBox1 open leaves: 1\\nfooBox2 open leaves: 2\\nfooBox3 open leaves: 3\\n\\n[ fooBox1 fooBox2 fooBox3 ] vals $: boxes\\n\\nboxes shallowNew $: shallowBoxesInstance\\nshallowBoxesInstance 0 fromLeft open leaves: 1\\nshallowBoxesInstance 1 fromLeft open leaves: 2\\nshallowBoxesInstance 2 fromLeft open leaves: 3\\n\\n\\\"Works as expected! Note that sub-blocks are exactly the same as\\n those in the original 'boxes' block. However, 'shallowBoxesInstance'\\n and 'boxes' are different blocks now:\\\"\\n\\n(shallowBoxesInstance 0 fromLeft) (boxes 0 fromLeft) same? leaves: true\\n(shallowBoxesInstance 1 fromLeft) (boxes 1 fromLeft) same? leaves: true\\n(shallowBoxesInstance 2 fromLeft) (boxes 2 fromLeft) same? leaves: true\\n\\nboxes shallowBoxesInstance same? leaves: false\\n\\n\\\"... and 'shallowBoxesInstance' does indeed have 'boxes' as its parent:\\\"\\n\\n(shallowBoxesInstance parent) boxes same? leaves: true\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance(shallow: true).onto(stack)\nend\ntarget.at(\"sel\", \"( D A B -- A/B ): selects A (Determiner is truthy) or B\\n (Determiner is falsey)\") do |_, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n (det.sel(a, b)).onto(stack)\nend\ntarget.at(\"br\", \"( D T F -- ? ): opens True/False forms depending on\\n Determiner being true/false.\") do |engine, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n engine.schedule(det.sel(a, b), stack)\nend\ntarget.at(\"<\", \"( A B -- S ): leaves whether A is smaller than (less than) B.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n Boolean[a < b].onto(stack)\nend\ntarget.at(\"same?\", \"( F1 F2 -- true/false ): leaves whether two Forms are the\\n same (by reference for block, by value for any other form).\\n\\n```\\n1 2 same? leaves: false\\n1 1 same? leaves: true\\n\\n'hello' 'hello world' same? leaves: false\\n'hello' 'hello' same? leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 same? leaves: false \\\"They're different blocks, content doesn't matter!\\\"\\n\\nb1 b1 same? leaves: true\\nb2 b2 same? leaves: true\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n (Boolean.same?(a, b)).onto(stack)\nend\ntarget.at(\"=\", \"( F1 F2 -- true/false ): leaves whether two Forms are equal by\\n content (they may or may not be the same forms reference-wise,\\n i.e., those for which `same?` would leave true).\\n\\n```\\n1 2 = leaves: false\\n1 1 = leaves: true\\n\\n'hello' 'hello world' = leaves: false\\n'hello' 'hello' = leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 = leaves: true \\\"They're equal by content!\\\"\\n\\nb1 b1 = leaves: true\\nb2 b2 = leaves: true\\n\\n\\\"Supports self-reference:\\\"\\n[ ] $: b3\\nb3 b3 shove\\nb3 b3 = leaves: true\\n(b3 first) b3 = leaves: true\\n\\\"etc...\\\"\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n Boolean[a == b].onto(stack)\nend\ntarget.at(\"anyof?\", \"( F B -- true/false ): leaves whether any form in Block is\\n equal (via `=`) to Form.\\n\\n```\\n1 [ 1 2 3 ] anyof? leaves: true\\n'hello' [ 'hello' 'world' 1 ] anyof? leaves: true\\n'hello' [ 1 2 3 ] anyof? leaves: false\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n form = stack.drop\n Boolean[form.in?(block)].onto(stack)\nend\ntarget.at(\"occurrences\", \"( B/Q Pf/Pq -- Bi ): leaves Begin indices of all occurrences\\n of Pattern form/Pattern quote in Block/Quote. Begin indices\\n is an orphan with no entries.\\n\\nWorks in a similar way to `anyof?` in that it compares each\\nelement of the Block/Quote with Pattern form/Pattern quote\\nlike `=` (but not using `=`, at least in the quote case\\nwhere KMP is used).\\n\\n```\\n[ ] 123 occurrences leaves: [ [ ] ]\\n\\n[ 1 1 2 0 0 1 2 1 3 4 8 ] $: haystack\\nhaystack 0 occurrences leaves: [ [ 3 4 ] ]\\nhaystack 1 occurrences leaves: [ [ 0 1 5 7 ] ]\\nhaystack 'foo' occurrences leaves: [ [ ] ]\\n\\n'' 'foobar' occurrences leaves: [ [ ] ]\\n'foobar' '' occurrences leaves: [ [ ] ]\\n\\n'foobra' $: haystack\\nhaystack 'o' occurrences leaves: [ [ 1 2 ] ]\\nhaystack 'foo' occurrences leaves: [ [ 0 ] ]\\nhaystack 'ra' occurrences leaves: [ [ 4 ] ]\\n\\n'GATCCATATG' $: haystack\\nhaystack 'ATAAT' occurrences leaves: [ [ ] ]\\nhaystack 'ATAT' occurrences leaves: [ [ 5 ] ]\\n```\") do |_, stack|\n pattern = stack.drop\n iterable = stack.drop.a(Block | Quote)\n case iterable\n in Quote\n fail = iterable.empty? || (pattern.is_a?(Quote) && pattern.empty?)\n in Block\n fail = iterable.count.zero?\n end\n if fail\n Block.new.onto(stack)\n next\n end\n occurrences = [] of Form\n iterable.each_occurrence_of(pattern) do |index|\n occurrences << (Decimal.new(index))\n end\n (Block.with(occurrences, leaf: false)).onto(stack)\nend\ntarget.at(\"uppercase?\", \"( Q -- true/false ): leaves whether Quote is all-uppercase.\\n If Quote is empty, leaves false.\\n\\n```\\n'' uppercase? leaves: false\\n'A' uppercase? leaves: true\\n'hello' uppercase? leaves: false\\n'Hello' uppercase? leaves: false\\n'HELLO' uppercase? leaves: true\\n'HELLO WORLD' uppercase? leaves: false\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n string = quote.string\n case string.size\n when 0\n isup = false\n when 1\n isup = string[0].uppercase?\n else\n isup = true\n string.each_char do |char|\n if char.uppercase?\n else\n isup = false\n break\n end\n end\n end\n Boolean[isup].onto(stack)\nend\ntarget.at(\"toUppercase\", \"( Q -- Uq ): leaves all- Uppercase quote for Quote: converts\\n lowercase character(s) in Quote to uppercase. If Quote is empty,\\n leaves empty quote.\\n\\n```\\n'' toUppercase leaves: ''\\n'hello' toUppercase leaves: 'HELLO'\\n'hello world' toUppercase? leaves: 'HELLO WORLD'\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n (Quote.new(quote.string.upcase)).onto(stack)\nend\ntarget.at(\"block?\", \"( F -- true/false ): leaves whether Form is a block.\") do |_, stack|\n Boolean[stack.drop.is_a?(Block)].onto(stack)\nend\ntarget.at(\"asBlock\", \"( F -- B ): asserts that Form is a Block, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBlock\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n[] asBlock leaves: [ [] \\\"(the same block)\\\" ]\\n```\") do |_, stack|\n stack.top.a(Block)\nend\ntarget.at(\"word?\", \"( F -- true/false ): leaves whether Form is a word form,\\n or a block that implements '__word__'.\\n\\n```\\n#foo word? leaves: true\\n\\n[ #foo $: __word__ this ] open word? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Word) || (form.is_a?(Block) && (form.can_be?(Word)))].onto(stack)\nend\ntarget.at(\"private?\", \"( W -- true/false ): leaves whether Word is private (by convention).\\n\\nA Word prefixed by one or more underscores '_' *but that which\\ndoes not end with one(s)* is considered private by convention.\\nHook words such as `__quote__` are *not* considered private.\\n\\nThe fact that privacy is defined \\\"by convention\\\" means that nothing\\nactually stops anyone from obtaining the word's associated value form.\\n\\n```\\n#hello private? leaves: false\\n#_hello private? leaves: true\\n#_ private? leaves: false \\\"Beware!\\\"\\n```\") do |_, stack|\n Boolean[(stack.drop.a(Word)).private?].onto(stack)\nend\ntarget.at(\"toWord\", \"( F -- W ): converts Form into Word.\\n 1. If Form is a word, behaves as noop\\n 2. If Form is a quote, dies only if quote contains\\n Unicode whitespace characters or is itself empty.\\n 3. If Form is a quoted word, peels off **all** quoting\") do |_, stack|\n form = stack.drop.a((Word | QuotedWord) | Quote)\n case form\n in Word\n form.onto(stack)\n in QuotedWord\n form.to_word.onto(stack)\n in Quote\n string = form.string\n if string.empty?\n form.die(\"toWord: quote argument is empty\")\n else\n if string.each_char.any?(&.whitespace?)\n form.die(\"toWord: quote argument contains whitespace\")\n end\n end\n (Word.new(form.string)).onto(stack)\n end\nend\ntarget.at(\"asWord\", \"( F -- W ): asserts that Form is a Word form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#foo asWord leaves: [ foo ]\\n```\\n\\n`__word__` hook can make a block usable in place of a word,\\nprovided its definition leaves a word or a block which\\nimplements '__word__':\\n\\n```\\n[ $: x x $: __word__ this ] @: a\\n#foo a asWord \\\"beware: leaves instance of a\\\"\\n#boo a a asWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Word)\nend\ntarget.at(\"quotedWord?\", \"( F -- true/false ): leaves whether Form is a quoted word\\n form, or a block that implements '__quotedWord__'.\\n\\n```\\n##foo quotedWord? leaves: true\\n[ ##foo $: __quotedWord__ this ] open quotedWord? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(QuotedWord) || (form.is_a?(Block) && (form.can_be?(QuotedWord)))].onto(stack)\nend\ntarget.at(\"asQuotedWord\", \"( F -- Qw ): asserts that Form is a Quoted word form,\\n dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuotedWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n##foo asQuotedWord leaves: #foo\\n```\\n\\n`__quotedWord__` hook can make a block usable in place of\\na quoted word, provided its definition leaves a quoted\\nword or a block that implements `__quotedWord__`:\\n\\n```\\n[ $: x x $: __quotedWord__ this ] @: a\\n##foo a asQuotedWord \\\"beware: leaves instance of a\\\"\\n##boo a a asQuotedWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(QuotedWord)\nend\ntarget.at(\"decimal?\", \"( F -- true/false ): leaves whether Form is a decimal form,\\n or a block that implements '__decimal__'.\\n\\n```\\n123 decimal? leaves: true\\n[ 123 $: __decimal__ this ] open decimal? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Decimal) || (form.is_a?(Block) && (form.can_be?(Decimal)))].onto(stack)\nend\ntarget.at(\"toQuotedWord\", \"( Qw/W -- #Qw/#W ): adds a layer of \\\"quoting\\\" to Quoted\\n word or Word.\\n\\n```\\n\\\"Note that in quoted word literals (here on the left hand\\n side) one layer of quoting is 'eaten off' by the parser!\\\"\\n\\n#foo toQuotedWord leaves: #foo\\n##foo toQuotedWord leaves: ##foo\\n```\") do |_, stack|\n form = stack.drop.a(Word | QuotedWord)\n form.to_quoted_word.onto(stack)\nend\ntarget.at(\"asDecimal\", \"( F -- D ): asserts that Form is a Decimal form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asDecimal\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n100 asDecimal leaves: 100\\n```\\n\\n`__decimal__` hook can make a block usable in place of a\\ndecimal, provided its definition leaves a decimal or a\\nblock that implements `__decimal__`:\\n\\n```\\n[ $: x x $: __decimal__ this ] @: a\\n100 a asDecimal \\\"beware: leaves an instance of a\\\"\\n200 a a asDecimal \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Decimal)\nend\ntarget.at(\"quote?\", \"( F -- true/false ): leaves whether Form is a quote form,\\n or a block that implements '__quote__'.\\n\\n```\\n'foo' quote? leaves: true\\n[ 'foo' $: __quote__ this ] open quote? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Quote) || (form.is_a?(Block) && (form.can_be?(Quote)))].onto(stack)\nend\ntarget.at(\"asQuote\", \"( F -- Q ): asserts that Form is a Quote form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuote\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'foo' asQuote leaves: 'foo'\\n```\\n\\n`__quote__` hook can make a block usable in place of a\\nquote, provided its definition leaves a quote or a block\\nthat implements `__quote__`:\\n\\n```\\n[ $: x x $: __quote__ this ] @: a\\n'foo' a asQuote \\\"beware: leaves instance of a\\\"\\n'boo' a a asQuote \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Quote)\nend\ntarget.at(\"boolean?\", \"( F -- true/false ): leaves whether Form is a boolean form,\\n or a block that implements '__boolean__'.\\n\\n```\\ntrue boolean? leaves: true\\n[ true $: __boolean__ this ] open boolean? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Boolean) || (form.is_a?(Block) && (form.can_be?(Boolean)))].onto(stack)\nend\ntarget.at(\"asBoolean\", \"( F -- true/false ): asserts that Form is a boolean form, dies\\n if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBoolean\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\ntrue asBoolean leaves: true\\nfalse asBoolean leaves: false\\n```\\n\\n`__boolean__` hook can make a block usable in place of a\\nboolean, provided its definition leaves a boolean or a\\nblock that implements `__boolean__`:\\n\\n```\\n[ $: x x $: __boolean__ this ] @: a\\ntrue a asBoolean \\\"beware: leaves an instance of a\\\"\\ntrue a a asBoolean \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Boolean)\nend\ntarget.at(\"builtin?\", \"( F -- true/false ): leaves whether Form is a builtin form.\") do |_, stack|\n Boolean[stack.drop.is_a?(Builtin)].onto(stack)\nend\ntarget.at(\"asBuiltin\", \"( F -- B ): asserts Form is a Builtin, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asBuiltin\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#+ here asBuiltin toQuote leaves: '[ native code ]'\\n```\") do |_, stack|\n stack.top.a(Builtin)\nend\ntarget.at(\"color?\", \"( F -- true/false ): leaves whether Form is a color form,\\n or a block that implements '__color__'.\\n\\n```\\n0 0 0 rgb color? leaves: true\\n[ 0 0 0 rgb $: __color__ this ] open color? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Color) || (form.is_a?(Block) && (form.can_be?(Color)))].onto(stack)\nend\ntarget.at(\"asColor\", \"( F -- C ): asserts that Form is a Color form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asColor\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n0 0 0 rgb asColor toQuote leaves: 'rgb(0, 0, 0)'\\n```\\n\\n`__color__` hook can make a block usable in place of a\\ncolor, provided its definition leaves a color or a block\\nthat implements `__color__`:\\n\\n```\\n[ $: x x $: __color__ this ] @: a\\n0 0 0 rgb a asColor \\\"beware: leaves an instance of a\\\"\\n0 0 0 rgb a a asColor \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Color)\nend\ntarget.at(\"byteslice?\", \"( F -- true/false ): leaves whether Form is a byteslice\\n form, or a block that implements '__byteslice__'.\\n\\n```\\n'hello world' toByteslice byteslice? leaves: true\\n[ [ 'Hi!' toByteslice ] $: __byteslice__ this ] open byteslice? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Byteslice) || (form.is_a?(Block) && (form.can_be?(Byteslice)))].onto(stack)\nend\ntarget.at(\"asByteslice\", \"( F -- B ): asserts that Form is a Byteslice form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asByteslice\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'hello world' toByteslice asByteslice leaves: '[byteslice, consists of 11 mutable byte(s)]'\\n```\\n\\n`__byteslice__` hook can make a block usable in place of\\na byteslice, provided its definition leaves a byteslice\\nor a block that implements `__byteslice__`:\\n\\n```\\n[ $: x x $: __byteslice__ this ] @: a\\n'foo' toByteslice a asByteslice \\\"beware: leaves an instance of a\\\"\\n'foo' toByteslice a a asByteslice \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Byteslice)\nend\ntarget.at(\"pushes\", \"( B N F -- ): creates a definition for Name in Block that\\n pushes Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form))\nend\ntarget.at(\"opens\", \"( B N F -- ): creates a definition for Name in Block that\\n opens Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form, opener: true))\nend\ntarget.at(\"entry:submit\", \"( Ss N F -- ): replaces the value form of an existing\\n definition for Name in Submittable store (usually a block)\\n to Form. Does not change whether the definition opens\\n or pushes.\\n\\n```\\n[ 'John Doe' $: fullName\\n [ fullName count ] @: fullNameLength\\n] obj $: person\\n\\nperson.fullName leaves: 'John Doe'\\nperson.fullNameLength leaves: 8\\n\\n\\\"Let's try to change the name:\\\"\\nperson #fullName 'Alice Bobette' entry:submit\\nperson.fullName leaves: 'Alice Bobette'\\nperson.fullNameLength leaves: 13\\n\\n\\\"Now let's change the way we compute the length; let's count\\n how many double-Ts there are in the full name.\\\"\\nperson #fullNameLength [ person.fullName 'tt' occurrences count ] entry:submit\\n\\n\\\"... just one:\\\"\\nperson.fullNameLength leaves: 1\\n\\n\\\"... or maybe multiple:\\\"\\nperson #fullName 'Tette Mopettitte' entry:submit\\nperson.fullName leaves: 'Tette Mopettitte'\\nperson.fullNameLength leaves: 3\\n```\") do |_, stack|\n form = stack.drop\n name = stack.drop\n submittable = stack.drop.a(ISubmittableStore)\n submittable.submit(name, form)\nend\ntarget.at(\"entry:exists?\", \"( Rs N -- true/false ): leaves whether Readable store\\n (usually a block) can fetch value for Name.\\n\\n```\\n[ orphan $: table\\n orphan extendWith: [\\n [ ${ name age score }\\n [ name $: name\\n age $: age ] obj toDict $: record\\n table record score pushes\\n ] @: set\\n [ ${ name age } table (this toDict) entry:fetch ] @: get\\n [ ${ name age } table (this toDict) entry:exists? ] @: has?\\n [ table entry:names map: [ $: record\\n [\\n record.name (31 ' ' lpad) (31 '...' fit)\\n record.age toQuote (15 ' ' lpad) (15 '...' fit)\\n (table record entry:fetch) toQuote (16 ' ' lpad) (16 '...' fit)\\n ] vals sepBy: ' |'\\n ] sepBy: '\\n'\\n ] @: __quote__\\n ]\\n] @: newScoreboard\\n\\nnewScoreboard $: scoreboard\\n\\n'John Doe' 42 '100 points' scoreboard.set\\n'Johnanna Doe' 28 '170 points' scoreboard.set\\n'Alice H.' 19 '250 points' scoreboard.set\\n'David A.' 67 '90 points' scoreboard.set\\n\\nscoreboard echo\\n\\n\\\"\\\"\\\"STDOUT:\\n John Doe | 42 | 100 points⏎\\n Johnanna Doe | 28 | 170 points⏎\\n Alice H. | 19 | 250 points⏎\\n David A. | 67 | 90 points⏎\\n\\\"\\\"\\\"\\n\\n'John Doe' 42 scoreboard.get leaves: '100 points'\\n'Alice H.' 19 scoreboard.get leaves: '250 points'\\n\\n'David A.' 67 scoreboard.has? leaves: true\\n'David A.' 123 scoreboard.has? leaves: false\\n'Peter Peterson' 19 scoreboard.has? leaves: false\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.has_form_for?(name)].onto(stack)\nend\ntarget.at(\"entry:fetch\", \"( Rs N -- F ): leaves the value Form with the given Name\\n in Readable store (usually a block). Does not open the\\n value form. Dies if Store does not contain an entry\\n for Name.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: a\\n\\na #x entry:fetch leaves: 100\\na #y entry:fetch leaves: 200\\na #a entry:fetch leaves: a \\\"via inheritance\\\"\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n (store.form_for(name)).onto(stack)\nend\ntarget.at(\"entry:fetch?\", \"( Rs N -- F true / false ): leaves value Form of the entry with\\n the given Name in Readable store (usually a block), follows it\\n with `true`. If there is no entry with the given name leaves\\n `false` only. Does not open the value form.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: a\\n\\na #x entry:fetch? leaves: [ 100 true ]\\na #y entry:fetch? leaves: false\\n\\na ('Enter name> ' readLine or: okbye toWord) entry:fetch? br:\\n [ 'Here is its value: ' _ ~ ]\\n 'Entry does not exist :('\\necho\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n if form = store.form_for?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:open\", \"( Rs C N -- ... ): resolves Name in Readable store and *opens*\\n it if it is an opener, assuming Caller to be the opener block.\") do |_, stack|\n name = stack.drop.a(Word)\n caller = stack.drop.a(Block)\n store = stack.drop.a(IReadableStore)\n if store.is_a?(Block)\n else\n form = store.form_for(name)\n form.onto(stack)\n next\n end\n entry = store.entry_for(name)\n if entry.opener?\n caller.inject(Word.new(\"open\"))\n end\n entry.onto(stack)\nend\ntarget.at(\"entry:flatFetch?\", \"( B N -- F true / false ): leaves the value Form of the entry with the\\n given Name in Block's dictionary. Follows it by `true` if it exists.\\n Leaves only `false` if there is no such entry in Block. Block hierarchy\\n (friends, parents) is not traversed. This word only looks at Block's\\n own dictionary). Does not open the value Form.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: myParent\\n[ 'hello' $: x ] obj $: myChild\\n\\n(myParent -- myChild) drop\\n\\nmyParent #x entry:flatFetch? leaves: [ 100 true ]\\nmyParent #y entry:flatFetch? leaves: [ 200 true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\nmyChild #x entry:flatFetch? leaves: [ 'hello' true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\n\\\"Even though myChild is a child of myParent and has access to 'y',\\n `entry:flatFetch?` doesn't care.\\\"\\nmyChild #y entry:flatFetch? leaves: false \\\"doesn't inherit!\\\"\\n\\n\\\"Compare it with `entry:fetch?`:\\\"\\nmyChild #y entry:fetch? leaves: [ 200 true ]\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if form = block.flat_at?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:opener?\", \"( Rs N -- true/false ): leaves whether an entry with the given\\n Name is an opener entry in Readable store (usually a block).\\n Dies if Readable store has no entry with the given Name.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: foo\\n\\nfoo #x entry:opener? leaves: false\\nfoo.x leaves: 100\\n\\n\\\"Change not only the value form for 'x' but also its type: make\\n it an opener.\\\"\\nfoo extend: [ [ 1 2 + ] @: x ]\\n\\nfoo #x entry:opener? leaves: true\\nfoo.x leaves: 3\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.opener?(name)].onto(stack)\nend\ntarget.at(\"entry:delete\", \"( B N -- ): removes the entry corresponding to Name form\\n from the dictionary of Block if it exists there. Otherwise,\\n does nothing.\\n\\n```\\n100 $: x\\n\\n[ 200 $: x ] obj $: foo\\n\\n\\\"'x' of foo shadows 'x' of toplevel block\\\"\\nfoo.x leaves: 200\\n\\n\\\"Let's try to remove it so it doesn't:\\\"\\nfoo #x entry:delete\\nfoo.x leaves: 100\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n block.delete_entry(name)\nend\ntarget.at(\"entry:wipeout\", \"( B -- ): removes all *owned* dictionary entries in Block.\\n\\n```\\n[ 100 $: x\\n 200 $: y\\n] obj $: numbers\\n\\nnumbers entry:names leaves: [ [x y] ]\\n\\nnumbers entry:wipeout\\nnumbers entry:names leaves: [ [] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.clear_entries\nend\ntarget.at(\"entry:pathTo?\", \"( B N -- P F true / false ): leaves Path, a block describing the\\n path to Form (including Block itself) under the corresponding\\n Name (like `entry:fetch?`). Follows Path and Form with `true`\\n indicating success, otherwise *only* `false` indicating that\\n there is no Form corresponding to Name in Block or any of the\\n blocks reachable from Block.\\n\\nThis word exists mainly for testing word lookup sanity. Feel free\\nto use it if you find any reason to!\\n\\n```\\n[ 100 $: x 'a' $: __quote__ ] obj $: a\\n[ 200 $: y 'b' $: __quote__ ] obj $: b\\n[ 300 $: z 'c' $: __quote__ ] obj $: c\\n\\na -- b -- c drop\\n\\n[ a #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ a ] 100 true'\\n[ b #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ b a ] 100 true'\\n[ c #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b a ] 100 true'\\n\\n[ b #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ b ] 200 true'\\n[ c #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b ] 200 true'\\n\\n[ c #z entry:pathTo? ] vals sepBy: ' ' leaves: '[ c ] 300 true'\\n\\n[ c #foo entry:pathTo? ] vals sepBy: ' ' leaves: 'false'\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if result = block.path_to_entry?(name)\n else\n Boolean[false].onto(stack)\n next\n end\n needle, path = result\n path.onto(stack)\n needle.onto(stack)\n Boolean[true].onto(stack)\nend\ntarget.at(\"entry:names\", \"( B -- Nb ): gathers all *owned* dictionary entry names of Block\\n into Name block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop \\\"for good measure :)\\\"\\n\\nmyParent entry:names leaves: [ [y x] ]\\nmyChild entry:names leaves: [ [z] ]\\nmyFriend entry:names leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_name do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:names*\", \"( B -- Nb ): gathers all dictionary entry names *reachable* from\\n Block to Name block. That is, gathers all entry names in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance of\\nBlock's relative graph.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:names* leaves: [ [y x greeting] ]\\nmyChild entry:names* leaves: [ [z y x greeting] ]\\nmyFriend entry:names* leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n names = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_name do |name|\n names << name\n if leaf\n next\n end\n leaf = name.is_a?(Block)\n end\n nil\n end\n names.uniq!\n (Block.with(names, leaf)).onto(stack)\nend\ntarget.at(\"entry:values\", \"( B -- Vb ): gathers all *owned* dictionary entry value forms of\\n Block into Value block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values leaves: [ [200 100] ]\\nmyChild entry:values leaves: [ [300] ]\\nmyFriend entry:values leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_value do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:values*\", \"( B -- Nb ): gathers all dictionary entry values *reachable* from\\n Block to Name block. That is, gathers all entry values in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance\\nof Block's relative graph. Values may repeat if some blocks\\nin this graph define entries with the same name.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values* leaves: [ [200 100 'Hello World'] ]\\nmyChild entry:values* leaves: [ [300 200 100 'Hello World'] ]\\nmyFriend entry:values* leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n values = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_value do |value|\n values << value\n if leaf\n next\n end\n leaf = value.is_a?(Block)\n end\n nil\n end\n (Block.with(values, leaf)).onto(stack)\nend\ntarget.at(\"entry:count\", \"( B -- Ec ): leaves Entry count, that is, the amount of entries\\n owned by (defined in) Block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myBlock\\n\\nmyBlock entry:count leaves: 2 \\\"'x' and 'y'\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.entry_count)).onto(stack)\nend\ntarget.at(\"shallowCopy\", \"( B -- C ): makes a shallow copy (sub-blocks are not copied)\\n of Block's tape and dictionary, and leaves a Copy block with\\n the tape copy, dictionary copy set as its tape, dictionary.\\n\\n```\\n[ 1 2 3 ] $: a\\na shallowCopy $: b\\na #x 0 pushes\\nb #y 1 pushes\\nb 1 shove\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 1 · ${y :: 1} ]⏎\\\"\\n```\") do |_, stack|\n (stack.drop.a(Block)).shallow.onto(stack)\nend\ntarget.at(\"resub\", \"( O B -- ): replaces the substrate of Block with Other's\\n substrate. This is useful if you want to swap Block's\\n contents with Other's without changing Block's identity:\\n\\n```\\n[ 1 2 3 ] $: a\\n[ 'a' 'b' 'c' ] $: b\\nb #x 0 pushes\\nb echo\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n```\\n\\nNote that since *substrate* is replaced, not *tape*, the\\ncursor position is saved:\\n\\n```\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\nb 2 |-\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' | 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 | 2 3 · ${x :: 0} ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n other = stack.drop.a(Block)\n block.resub(other)\nend\ntarget.at(\"fromLeft\", \"( B/Q/Bf I -- E ): leaves Index-th Element from left in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(index.to_i)).onto(stack)\nend\ntarget.at(\"fromRight\", \"( B/Q/Bf I -- E ): leaves Index-th Element from right in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromRight leaves: 3\\n[ 1 2 3 ] 1 fromRight leaves: 2\\n[ 1 2 3 ] 2 fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at((form.count - index.to_i) - 1)).onto(stack)\nend\ntarget.at(\"fromLeft*\", \"( B/Q/Bf N -- Eb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from left in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromLeft* leaves: [ [ 1 ] ]\\n[ 1 2 3 ] 2 fromLeft* leaves: [ [ 1 2 ] ]\\n[ 1 2 3 ] 3 fromLeft* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromLeft* leaves: [ [ 1 2 3 ] ]\\n'hello' 3 fromLeft* leaves: 'hel'\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(0, size.to_i - 1)).onto(stack)\nend\ntarget.at(\"fromRight*\", \"( B/Q/Bf N -- Fb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from right in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromRight* leaves: [ [ 3 ] ]\\n[ 1 2 3 ] 2 fromRight* leaves: [ [ 2 3 ] ]\\n[ 1 2 3 ] 3 fromRight* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromRight* leaves: [ [ 1 2 3 ] ]\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(form.count - size.to_i, form.count - 1)).onto(stack)\nend\ntarget.at(\"+\", \"( A B -- S ): leaves the Sum of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a + b)\nend\ntarget.at(\"-\", \"( A B -- D ): leaves the Difference of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a - b)\nend\ntarget.at(\"*\", \"( A B -- P ): leaves the Product of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a * b)\nend\ntarget.at(\"/\", \"( A B -- Q ): leaves the Quotient of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"division by zero\")\n end\n stack.add(a / b)\nend\ntarget.at(\"mod\", \"( A B -- M ): leaves the Modulo of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"modulo by zero\")\n end\n stack.add(a % b)\nend\ntarget.at(\"**\", \"( A B -- R ): raises A to the power B, leaves Result.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a ** b)\nend\ntarget.at(\"round\", \"( D -- Rd ): rounds Decimal towards the nearest integer,\\n leaves the corresoinding Rounded decimal. If both neighboring\\n integers are equidistant, rounds towards the even neighbor\\n (Banker's rounding).\\n\\n```\\n1 round leaves: 1\\n1.23 round leaves: 1\\n\\n1.5 round leaves: 2\\n1.67 round leaves: 2\\n\\n2.5 round leaves: 2 \\\"rounds towards the even neighbor\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.round.onto(stack)\nend\ntarget.at(\"floor\", \"( D -- Rd ): rounds Decimal *down* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 floor leaves: 1\\n1.23 floor leaves: 1\\n\\n1.5 floor leaves: 1\\n1.67 floor leaves: 1\\n\\n2.5 floor leaves: 2\\n\\n-2.5 floor leaves: -3 \\\"rounds down!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.floor.onto(stack)\nend\ntarget.at(\"ceil\", \"( D -- Rd ): rounds Decimal *up* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 ceil leaves: 1\\n1.23 ceil leaves: 2\\n\\n1.5 ceil leaves: 2\\n1.67 ceil leaves: 2\\n\\n2.5 ceil leaves: 3\\n\\n-2.5 ceil leaves: -2 \\\"rounds up!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.ceil.onto(stack)\nend\ntarget.at(\"trunc\", \"( D -- Rd ): rounds Decimal towards zero, leaves the resulting\\n Rounded decimal.\\n\\n```\\n1 trunc leaves: 1\\n1.23 trunc leaves: 1\\n1.5 trunc leaves: 1\\n1.67 trunc leaves: 1\\n2.5 trunc leaves: 2\\n\\n-2.3 trunc leaves: -2\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.trunc.onto(stack)\nend\ntarget.at(\"sqrt\", \"( D -- R ): leaves the square Root of Decimal.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.sqrt.onto(stack)\nend\ntarget.at(\"cos\", \"( Air -- Dc ): leaves Decimal cosine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_cos.onto(stack)\nend\ntarget.at(\"sin\", \"( Air -- Ds ): leaves Decimal sine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_sin.onto(stack)\nend\ntarget.at(\"rand\", \"( -- Rd ): leaves a Random decimal between 0 and 1.\") do |_, stack|\n (Decimal.new(rand)).onto(stack)\nend\ntarget.at(\"sliceQuoteAt\", \"( Q Sp -- Pb Pa ): for the given Quote, leaves the Part\\n before and Part after Slice point.\\n\\n```\\n'hello world' 2 sliceQuoteAt leaves: [ 'he' 'llo world' ]\\n```\") do |_, stack|\n spt = stack.drop.a(Decimal)\n quote = stack.drop.a(Quote)\n qpre, qpost = quote.slice_at(spt.to_i)\n qpre.onto(stack)\n qpost.onto(stack)\nend\ntarget.at(\"count\", \"( B/Q/Bf -- N ): leaves N, the amount of elements/graphemes/\\n bytes in Block/Quote/Byteslice form.\") do |_, stack|\n form = stack.drop.a((Block | Quote) | Byteslice)\n (Decimal.new(form.count)).onto(stack)\nend\ntarget.at(\"chr\", \"( Uc -- Q ): leaves a quote that consists of a single\\n character with the given Unicode codepoint.\") do |_, stack|\n ord = (stack.drop.a(Decimal)).posint.in(0..55295, 57344..1114111)\n (Quote.new(ord.chr)).onto(stack)\nend\ntarget.at(\"ord\", \"( Q -- Uc ): leaves the Unicode codepoint for the first\\n character in Quote. Dies if Quote is empty.\") do |_, stack|\n quote = stack.drop.a(Quote)\n if ord = quote.ord?\n else\n quote.die(\"ord: quote must contain at least one character\")\n end\n (Decimal.new(ord)).onto(stack)\nend\ntarget.at(\"lpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the left of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' lpad leaves: '-----hello'\\n'hello' 10 ':-' lpad leaves: ':----hello'\\n'hello' 7 'XYZABC' lpad leaves: 'XYhello'\\n'hello' 9 'XYZABC' lpad leaves: 'XYZAhello'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Left)).onto(stack)\nend\ntarget.at(\"rpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the right of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' rpad leaves: 'hello-----'\\n'hello' 10 ' -' rpad leaves: 'hello ----'\\n'hello' 7 'foobar' rpad leaves: 'hellofo'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Right)).onto(stack)\nend\ntarget.at(\"fit\", \"( Q Tl Eq -- Fq ): if Quote is longer than Total length, truncates\\n it so that it can fit Ellipsis quote, and stitches the truncated\\n Quote with the Ellipsis quote, forming Fit quote which is then\\n left on the stack.\\n\\nEssentially, Fit quote is guaranteed to be of Total length\\ncharacters **or less!**.\\n\\n```\\n'hello' 10 '…' fit leaves: 'hello'\\n'hello world' 10 '…' fit leaves: 'hello wor…'\\n'hello world' 8 '' fit leaves: 'hello wo'\\n'Lorem ipsum dolor sit amet' 10 '-' fit leaves: 'Lorem ipsu-'\\n'Lorem ipsum dolor sit amet' 24 '… (hidden)' fit leaves: 'Lorem ipsum do… (hidden)'\\n```\") do |_, stack|\n ellipsis = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.fit(total.to_i, ellipsis)).onto(stack)\nend\ntarget.at(\"|at\", \"( B -- N ): leaves N, the position of the cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n cursor = Decimal.new(block.cursor)\n cursor.onto(stack)\nend\ntarget.at(\"|to\", \"( B N -- ): moves the cursor in Block to N.\") do |_, stack|\n cursor = stack.drop.a(Decimal)\n block = stack.drop.a(Block)\n block.to(cursor.to_i)\nend\ntarget.at(\"<|\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor - 1)\nend\ntarget.at(\"|>\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor + 1)\nend\ntarget.at(\"|slice\", \"( B -- Lh Rh ): slices Block at cursor. Leaves Left half\\n and Right half.\") do |_, stack|\n block = stack.drop.a(Block)\n lhs, rhs = block.slice\n lhs.onto(stack)\n rhs.onto(stack)\nend\ntarget.at(\"cherry\", \"( [ ... E | ... ]B ~> [ ... | ... ]B -- E ): drops Block\\n and Element before cursor in Block (and moves cursor back\\n once), leaves Element.\") do |_, stack|\n (stack.drop.a(Block)).drop.onto(stack)\nend\ntarget.at(\"shove\", \"( [ ... | ... ]B E ~> [ ... E | ... ]B -- ): adds Element\\n before cursor in Block (and moves cursor forward once),\\n drops both.\") do |_, stack|\n stack.drop.onto(stack.drop.a(Block))\nend\ntarget.at(\"shove*\", \"( [ ...bl | ...br ]B [ ...el | ...er ]Eb ~> [ ...bl ...el | ...br ]B -- ): adds\\n elements before cursor in Element block after the cursor in Block.\\n\\n```\\n[ 1 2 3 ] $: xs\\nxs [ 4 5 6 ] shove*\\nxs leaves: [ [ 1 2 3 4 5 6 \\\"|\\\" ] ]\\n\\n[ 1 | 2 3 ] $: ys\\nys [ 100 200 300 ] shove*\\nys leaves: [ 1 100 200 300 | 2 3 ]\\n```\") do |_, stack|\n elems = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.paste(elems)\nend\ntarget.at(\"eject\", \"( [ ... | F ... ]B ~> [ ... | ... ]B -- F ): drops and\\n leaves the Form after cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.eject\n form.onto(stack)\nend\ntarget.at(\"inject\", \"( B F -- ): inserts Form to Block: adds Form to Block,\\n and moves cursor back again.\") do |_, stack|\n form = stack.drop\n block = stack.drop.a(Block)\n block.inject(form)\nend\ntarget.at(\"thru\", \"( [ ... | F ... ] -> [ ... F | ... ] -- F ): moves cursor\\n after Form, and leaves Form. Dies if cursor is at the end.\\n\\nNote: prefer `thru` to `eject` because `eject` modifies\\nthe block, and that may cause a tape copy which uses up\\na bit of memory and resources. The difference would matter\\nonly in high load scenarios, though.\\n\\nNote: anything that *does not* `ahead inject` will be OK\\nwith `ahead thru`. And even if it does `ahead inject`,\\nstill, there are ways to overcome the problems from not\\n`ahead eject`ing.\") do |_, stack|\n block = stack.drop.a(Block)\n block.thru.onto(stack)\nend\ntarget.at(\"thruBlock\", \"( B -- Bf / [ Vf ] ): similar to `thru` for Block. If\\n form after cursor is a Block form, it is left. If it is\\n a Value form, then it is enclosed in a new block whose\\n parent is Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.thru\n if form.is_a?(Block)\n form.onto(stack)\n else\n child = Block.new(block)\n child.add(form)\n child.onto(stack)\n end\nend\ntarget.at(\"top\", \"( [ ... F | ... ]B -- F ): leaves the top Form in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.top.onto(stack)\nend\ntarget.at(\"mergeDicts\", \"( Rb Db -- ): copies entries from Donor block's dictionary\\n to Recipient block's dictionary. Donor entries override\\n same-named entries in Recipient. Donor entries starting\\n with one or more underscores are not imported.\\n\\n```\\n[ ] $: a\\na #x 100 pushes\\na #_private 'Fool!' pushes\\n[ ] $: b\\nb #y 200 pushes\\n\\na b 2echo\\n\\\"STDOUT: [ · ${x :: 100} ${_private :: 'Fool!'} ]⏎\\\"\\n\\\"STDOUT: [ · ${y :: 200} ]⏎\\\"\\n\\nb a mergeDicts\\nb echo\\n\\\"STDOUT: [ · ${y :: 200} ${x :: 100} ]⏎\\\"\\n```\") do |_, stack|\n donor = stack.drop.a(Block)\n recpt = stack.drop.a(Block)\n recpt.import!(from: donor)\nend\ntarget.at(\"sortUsing!\", \"( B Cb -- B ): leaves Block sorted inplace. Forms in Block\\n are compared using Comparator block.\\n\\nComparator block is opened with two forms on the stack; let's\\ncall them A and B. If Comparator block leaves a negative decimal\\n(conventionally `-1`), then `A < B`. If Comparator block leaves\\n`0`, then `A = B`. If Comparator block leaves a positive decimal\\n(conventionally `1`), then `A > B`.\\n\\nDies if Comparator block leaves any other (kind of) form.\\n\\nIgnores all forms but the topmost for Comparator block.\\n\\n\\n```\\n[ 3 2 1 ] [ - ] sortUsing! leaves: [ 1 2 3 ]\\n```\") do |_, stack|\n cmp = stack.drop.a(Block)\n block = stack.top.a(Block)\n block.sort_using! do |a, b|\n stack = Block.with(a, b)\n ((Engine.exhaust(Engine.current.capabilities, cmp, stack)).top.a(Decimal)).to_i\n end\nend\ntarget.at(\"getErrorDetails\", \"( Eo -- Dq ): leaves Details quote containing error details\\n of an Error object.\") do |_, stack|\n error = stack.drop.a(Error)\n (Quote.new(error.details)).onto(stack)\nend\ntarget.at(\"toQuote\", \"( F -- Qr ): leaves Quote representation of Form.\") do |_, stack|\n stack.drop.to_quote.onto(stack)\nend\ntarget.at(\"toByteslice\", \"( Q -- B ): leaves immutable Byteslice for Quote.\") do |_, stack|\n (stack.drop.a(Quote)).to_byteslice.onto(stack)\nend\ntarget.at(\"replaceAll\", \"( Sq Pq Q -- Rq ): replaces all instances of Pattern quote\\n in Source quote with Quote. Leaves the Resulting quote.\\n\\n```\\n'hello' 'l' 'y' replaceAll leaves: 'heyyo'\\n```\") do |_, stack|\n repl = stack.drop.a(Quote)\n pattern = stack.drop.a(Quote)\n quote = stack.drop.a(Quote)\n (quote.replace_all(pattern, repl)).onto(stack)\nend\ntarget.at(\"effect\", \"( F -- Eq ): leaves Effect quote for Form.\\n\\nIf Form is not a block nor a builtin, it is simply converted\\nto quote in the same way as `toQuote`.\\n\\nIf Form is a block or a builtin, an attempt is made at\\nextracting a stack effect expression from its comment.\\nIf the attempt fails, Form's description is left. If the\\nattempt was successful, the extracted stack effect quote\\nis added onto the stack as Effect quote.\\n\\n```\\n100 effect leaves: '100'\\ntrue effect leaves: 'true'\\n\\n[] effect leaves: 'a block'\\n[ \\\"Hello World\\\" ] effect leaves: 'a block'\\n[ \\\"( -- ) \\\"] effect leaves: '( -- )'\\n\\n#+ here effect leaves: '( A B -- S )' \\\"(yours may differ)\\\"\\n#map: here effect leaves: '( Lb B -- MLb )'\\n```\") do |_, stack|\n (Quote.new(stack.drop.effect)).onto(stack)\nend\ntarget.at(\"die\", \"( D/Eo -- ): dies with Details quote/Error object.\") do |engine, stack|\n form = stack.drop.a(Quote | Error)\n case form\n in Quote\n raise(engine.die(form.string))\n in Error\n raise(form)\n end\nend\ntarget.at(\"stitch\", \"( Q1 Q2 -- Q3 ): quote concatenation.\") do |_, stack|\n b = stack.drop.a(Quote)\n a = stack.drop.a(Quote)\n stack.add(a.stitch(b))\nend\ntarget.at(\"reparent\", \"( Cb Pb -- Cb ): changes the parent of Child block to Parent block.\\n Lookup cycles are allowed and handled gracefully.\") do |_, stack|\n parent = stack.drop.a(Block)\n child = stack.top.a(Block)\n child.parent = parent\nend\ntarget.at(\"befriend\", \"( B F -- ): adds Friend to Block's friend list.\\n\\nFriends are asked for word entries after parents, grandparents\\netc. have failed to retrieve them. This recurses, e.g. friends\\nask their own friends and so on, until the entry is found. Lookup\\ncycles are allowed and handled gracefully.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\nb a befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\nb.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\nb.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\na #x [ 'I\\\\'ve changed!' echo ] opens\\n\\na.x\\n\\\"STDOUT: I've changed!⏎\\\"\\nb.x\\n\\\"STDOUT: I've changed!⏎\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.befriend(friend)\nend\ntarget.at(\"unfriend\", \"( B F -- ): removes Friend from Block's friend list. Does\\n nothing if Friend is not in the friend list. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na b unfriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n source = stack.drop.a(Block)\n source.unfriend(friend)\nend\ntarget.at(\"friends\", \"( B -- Fl ): leaves Friend list of Block. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na friends count echo\\n\\\"STDOUT: 1⏎\\\"\\na friends first b same? echo\\n\\\"STDOUT: true⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na friends [ drop ] hydrate\\na friends count echo\\n\\\"STDOUT: 0⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n source = stack.drop.a(Block)\n source.friends.onto(stack)\nend\ntarget.at(\"slurp\", \"( B Q -- B ): parses Quote and adds all forms from Quote\\n to Block.\") do |_, stack|\n source = stack.drop.a(Quote)\n block = stack.top.a(Block)\n block.slurp(source.string)\nend\ntarget.at(\"orphan\", \"( -- B ): creates and leaves a new orphan Block.\\n\\nOrphan blocks are blocks without a parent. Therefore, they do not\\nparticipate in any block hierarchy until they acquire some friends,\\nor a parent, and when (and whether) this should happen if for you —\\nnot Novika, as is usually the case — to decide.\\n\\n```\\n'Outer A' $: a\\n'Outer B' $: b\\n\\norphan $: x\\n\\n[ [ drop 'I die!' ] @: __died__ x.a ] do leaves: 'I die!'\\n[ [ drop 'I die too!' ] @: __died__ x.b ] do leaves: 'I die too!'\\n\\n\\\"Define `a` and `b` on the block itself. As you can see there\\n is no inheritance.\\\"\\nx extend: [\\n 100 $: a\\n 200 $: b\\n]\\n\\n\\\"Now `a` and `b` are looked up fine.\\\"\\nx.a leaves: 100\\nx.b leaves: 200\\n```\") do |_, stack|\n Block.new.onto(stack)\nend\ntarget.at(\"orphan?\", \"( B -- true/false ): leaves whether the given Block is an orphan\\n (see `orphan`).\\n\\n```\\norphan orphan? leaves: true\\n[ \\\"I'm not an orphan\\\" ] orphan? leaves: false\\n```\") do |_, stack|\n Boolean[!(stack.drop.a(Block)).parent?].onto(stack)\nend\ntarget.at(\"toOrphan\", \"( B -- B ): makes Block an orphan (destroys the link with\\n its parent).\\n\\n```\\n0 $: x\\n[ ] $: b\\nb . x echo\\n\\\"STDOUT: 0⏎\\\"\\n\\nb toOrphan leaves: [ [ ] ]\\n. x\\n\\\"Sorry: no value form found for 'x'\\\"\\\"\\n```\") do |_, stack|\n (stack.top.a(Block)).parent = nil\nend\ntarget.at(\"toTape\", \"( B -- Tb ): leaves Tape block for Block, i.e., the tape part\\n of Block. Useful for e.g. comparing two blocks only for tape\\n content, when Block may have dictionary entries.\\n\\nLookup hierarchy is destroyed: Tape block is an orphan.\\n\\n```\\n[ 1 2 3 ] $: a\\na #x 0 pushes\\na (a toTape) 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_tape_block.onto(stack)\nend\ntarget.at(\"toDict\", \"( B -- Db ): leaves Dictionary block for Block, i.e., the dictionary\\n part of Block. Useful for e.g. comparing two blocks only for dictionary\\n content in case tape contents differ.\\n\\nLookup hierarchy is destroyed: Dictionary block is an orphan.\\n\\n```\\n[ ${ x y } this ] @: createPoint\\n\\n10 20 createPoint $: a\\n10 20 createPoint $: b\\n\\na b = leaves: false\\n\\n\\\"And not for the reason you might think of. Their TAPES are not\\n equal; `a` and `b` are not only objects, they are also pieces\\n of code that led to each one's creation (sort of).\\\"\\na toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\nb toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\n\\n\\\"Let's strip the code using toDict:\\\"\\na toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\nb toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\n = leaves: true \\\"< now they're equal\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_dict_block.onto(stack)\nend\ntarget.at(\"desc\", \"( F -- Dq ): leaves the Description quote of the given Form.\\n\\n```\\n100 desc leaves: 'decimal number 100'\\n'foobar' desc leaves: 'quote \\\\\\\\'foobar\\\\\\\\''\\n[ 1 2 3 ] desc leaves: 'a block'\\n[ \\\"I am a block\\\" 1 2 3 ] desc leaves: 'I am a block'\\ntrue desc leaves: 'boolean true'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.desc)\n quote.onto(stack)\nend\ntarget.at(\"typedesc\", \"( F -- Dq ): leaves the type Description quote of the\\n given Form.\\n\\n```\\n100 typedesc leaves: 'decimal'\\n'foobar' typedesc leaves: 'quote'\\n[ 1 2 3 ] typedesc leaves: 'block'\\n[ \\\"I am a block\\\" 1 2 3 ] typedesc leaves: 'block'\\ntrue typedesc leaves: 'boolean'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.class.typedesc)\n quote.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/FFI","path":"Novika/Capabilities/Impl/FFI.html","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"ffi\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words for working with foreign functions, structs, and unions\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"ffi:library?\", \"( F -- true/false ): leaves whether Form is a foreign\\n library form.\\n\\n```\\n'foo' ffi:getLibrary ffi:library? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Library)].onto(stack)\nend\ntarget.at(\"ffi:layout?\", \"( F -- true/false ): leaves whether Form is a foreign\\n layout form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:layout? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(StructLayoutForm)].onto(stack)\nend\ntarget.at(\"ffi:struct&?\", \"( F -- true/false ): leaves whether Form is a struct\\n reference view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint& ffi:struct&? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.reference?)].onto(stack)\nend\ntarget.at(\"ffi:struct~?\", \"( F -- true/false ): leaves whether Form is an inline\\n struct view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct~ $: point~\\npoint~ ffi:struct~? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.inline?)].onto(stack)\nend\ntarget.at(\"ffi:union?\", \"( F -- true/false ): leaves whether Form is a union\\n view form.\\n\\n```\\n[ chr char ord u8 ] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxU\\nquuxU ffi:union? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.union?)].onto(stack)\nend\ntarget.at(\"ffi:hole?\", \"( F -- true/false ): leaves whether Form is a hole.\\n\\n```\\n#i32 ffi:hole $: intHole\\n\\nintHole ffi:hole? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Hole)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary?\", \"( I -- Lf true / false ): leaves Library form followed by true\\n if dynamic library with the given Id exists and was loaded &\\n retrieved successfully; otherwise, leaves false.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary? leaves: [ \\\"[foreign library]\\\" true ]\\n'random-nonexisting-library' ffi:getLibrary? leaves: false\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n library.onto(stack)\n end\n Boolean[!(!library)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary\", \"( I -- Lf ): leaves Library form if dynamic library with the\\n given Id exists and was loaded & retrieved successfully;\\n otherwise, dies.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary ffi:library? leaves: true\\n'random-nonexisting-library' ffi:getLibrary \\\"Dies: no such library\\\"\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n else\n id.die(\"no such library\")\n end\n library.onto(stack)\nend\ntarget.at(\"ffi:createLayout\", \"( Lb -- Slf ): parses Layout block and leaves the resulting\\n Struct layout form.\\n\\nStruct layouts are a generalization over structs (heap-\\nallocated and stack-allocated) and unions. They literally\\ndescribe how structs (unions) are layed out in memory.\\n\\nLayout block consists of *name words followed by type words*.\\nSee the example below. A reference to another struct layout\\ncan be made in Layout block using the prefixes `&` (heap-\\nallocated struct, i.e., pointer to struct), `~` (inline or\\nstack-allocated struct), and `?` (stack-allocated union).\\n\\nInline struct cycles are forbidden. Union cycles are forbidden.\\nEither could be hidden behind a reference/pointer.\\n\\nLayout block is parsed lazily (on first use, e.g., by `toQuote`,\\n`allocateStruct` variants, `=`, etc.) Therefore, you can define\\nself-referential structs, mutually referential structs, and\\nreference layouts that are defined later.\\n\\nSee FFI documentation on GitHub Wiki for a list of available\\ntypes and the corresponding C types.\\n\\n```\\n[ x f32\\n y f32\\n] ffi:createLayout $: point\\n\\n[ datum ~point \\\"<- inline struct\\\"\\n next &pointNode \\\"<- struct reference\\\"\\n] ffi:createLayout $: pointNode\\n\\n[ asPoint &point\\n asPointNode ~pointNode\\n] ffi:createLayout $: pointNodeUnion\\n\\n[ type u8\\n value ?pointNodeUnion \\\"<- stack-allocated union\\\"\\n] ffi:createLayout $: pointNodeOrPoint\\n```\") do |engine, stack|\n decl = stack.drop.a(Block)\n this = engine.block\n names = [] of Word\n types = [] of Word\n cur, nxt = names, types\n decl.each do |form|\n if form.is_a?(Word)\n else\n form.die(\"only words (for field name and for field type) are allowed in struct layout declaration\")\n end\n cur << form\n cur, nxt = nxt, cur\n end\n if names.size == types.size\n else\n decl.die(\"malformed struct layout: missing field name or type\")\n end\n if names.empty?\n decl.die(\"struct layout must have at least one field\")\n end\n (StructLayoutForm.new(this, names, types, decl.prototype.comment?)).onto(stack)\nend\n{% for method, desc in {inline: {\"~\", :InlineStruct, \"Isv\", \"Inline struct\"}, reference: {\"&\", :StructReference, \"Srv\", \"Struct reference\"}} %}\n\n {% sign, cls, ann, qual = desc %}\n\n target.at(\"ffi:allocateStruct{{ sign.id }}\", <<-END\n ( Slf -- {{ ann.id }} ): allocates {{ qual.id }} view for the\n given Struct layout form. If the struct is no longer in\n use, it is freed by the GC automatically.\n\n This word is **unsafe**: the resulting {{ qual.id }} view is\n in an undefined state (may contain junk) before you (or the\n C code you pass it to) fills it with good values. Showing\n the struct view left by this word to clients may expose your\n program to a whole class of security vulnerabilities.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n point ffi:allocateStruct{{ sign.id }} $: point{{ sign.id }}\n point{{ sign.id }} #x 123 entry:submit\n point{{ sign.id }} #y 456 entry:submit\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=123_i32, y=456_i32⟩'\n ```\n END\n ) do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.{{ method.id }}.make!\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:buildStruct{{ sign.id }}\", <<-END\n ( Eb Slf -- {{ ann.id }} ): allocates and fills {{ qual.id }}\n view with entries by asking Entry block for them.\n\n If Entry block is missing an entry matching a field that\n Struct layout form declares, and that field is of type\n `pointer` or struct reference (`&`), `none` (C nullptr)\n is used as the value. Dies if Entry block is missing\n matching entry or entries for fields of other types.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n\n \"Note: `this` has entries called `x` and `y`. `point` has\n fields called `x` and `y`. A match!\"\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = layout_form.layout\n view = layout.{{ method.id }}.make!\n layout.each_desc_with_index do |desc|\n entry = block.entry_for? Word.new(desc.id)\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n elsif desc.type.is_a?(Novika::FFI::UntypedPointer.class) || desc.type.is_a?(Novika::FFI::StructReferenceType)\n view[desc.id] = Novika::FFI::UntypedPointer.none\n else\n block.die(\n \"block is missing field '#{desc.id}'. Note that none (C nullptr) \\\n as default value is only supported for untyped pointers (`pointer`) \\\n and struct references (`&name`)\")\n end\n end\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:asStruct{{ sign.id }}\", <<-END\n ( A Slf -- {{ ann.id }} ): creates and leaves {{ qual.id }} view\n for the given Address, according to Struct layout form.\n\n This word is **unsafe**: it does not check whether Address\n points at something that is layed out according to Struct\n layout form. Passing 0 (none aka null pointer) for Address\n will lead to segfault. Passing Address that is outside of\n your program's memory will lead to segfault. Passing Address\n that *is* in the bounds of your program's memory, but one\n not pointing at a struct in accordance with Struct layout\n form, will lead to undefined behavior (most likely junk\n values in {{ qual.id }} view).\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} ffi:addressof $: addr\n\n addr point ffi:asStruct{{ sign.id }} $: addrPoint{{ sign.id }}\n addrPoint{{ sign.id }}.x leaves: x\n addrPoint{{ sign.id }}.y leaves: y\n addrPoint{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::{{ cls.id }}View.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n StructViewForm.new(view).onto(stack)\n end\n {% end %}\ntarget.at(\"ffi:allocateUnion\", \"( Slf -- Uv ): allocates Union view for the given Struct\\n layout form.\\n\\nThis word is **unsafe**: the resulting Union view is in\\nan undefined (uninitialized) state (may be zeroed out,\\ncontain junk, or both) before you (or the C code you pass\\nit to) fills it with good values. Showing the uninitialized\\nunion to clients may expose your program to a whole class\\nof security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxUnion\\nquuxUnion #chr 'A' entry:submit\\nquuxUnion.ord leaves: 65\\n\\n\\\"Union toQuote avoids printing values, because that could\\n cause a segfault/overflow in some cases, and would mostly\\n output junk anyway.\\\"\\nquuxUnion toQuote leaves: '(⋃ ⟪chr=char, ord=u8⟫)'\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.union.make!\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:buildUnion\", \"( Eb Slf -- Uv ): allocates and fills Union view with an\\n entry by asking Entry block for any *one* entry out of\\n those specified in Struct layout form, in the order they\\n are specified in Struct layout form. If the union is no\\n longer in use, it is freed by the GC automatically.\\n\\nEntry block must have at least one of the Struct layout\\nform's fields defined. Otherwise, this word dies.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n[ 'A' $: chr\\n this quux ffi:buildUnion\\n] val $: unionByChr\\n\\n[ 66 $: ord\\n this quux ffi:buildUnion\\n] val $: unionByOrd\\n\\n[ 'A' $: chr\\n 123 $: ord\\n this quux ffi:buildUnion\\n] val $: unionBoth\\n\\nunionByChr.ord leaves: 65\\nunionByOrd.chr leaves: 'B'\\n\\n\\\"'chr' is defined first, therefore, it is used rather\\n than 'ord'\\\"\\nunionBoth.chr leaves: 'A'\\nunionBoth.ord leaves: 65\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = form.layout\n view = layout.union.make!\n had_entry = false\n layout.each_desc_with_index do |desc|\n entry = block.entry_for?(Word.new(desc.id))\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n had_entry = true\n break\n end\n end\n if had_entry\n else\n block.die(\"block must have one of the union's fields defined\")\n end\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:asUnion\", \"( A Slf -- Uv ): creates and leaves a Union view for the\\n given Address, according to Struct layout form.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is layed out according to Struct\\nlayout form. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing\\nAddress that *is* in the bounds of your program's memory,\\nbut one not pointing at a union in accordance with Struct\\nlayout form, will lead to undefined behavior (most likely\\njunk values in Union view). Showing ill-formed results of\\nthis word to clients may expose your program to a whole\\nclass of security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n'A' $: chr\\n\\nthis quux ffi:buildUnion $: quuxUnion\\n\\nquuxUnion ffi:addressof $: addr\\n\\naddr quux ffi:asUnion $: addrUnion\\naddrUnion.chr leaves: 'A'\\naddrUnion.ord leaves: 65\\n```\") do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::UnionView.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:hole\", \"( T/Oh -- H ): allocates garbage-collected memory for Hole\\n that will hold a value of the given Type. If Other hole\\n is passed, wraps that Other hole instead (this could be\\n useful in C situations like `int**`)\\n\\nHoles are (just a bit) safer way of letting C write to a\\nmemory location. You first create the hole, then pass it\\nto C, then read from the hole by opening it.\\n\\nNote: this word is **unsafe**: since we cannot check whether\\nthe hole was written to, reading from hole (opening it) before\\nwriting to it will result in undefined behavior.\\n\\n```\\n\\\"\\\"\\\"\\nvoid outputCInt(int* x)\\n{\\n *x = 123;\\n}\\n\\\"\\\"\\\"\\n\\n#i32 ffi:hole $: intBox\\n\\nintBox outputCInt\\nintBox open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word | Hole)\n type = case typename\n in Hole\n Novika::FFI::UntypedPointer.new(typename.address)\n in Word\n (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n end\n (Hole.new(type)).onto(stack)\nend\ntarget.at(\"ffi:box\", \"( F T -- A ): allocates garbage-collected memory for Type, and\\n writes Form there. Form must be of (or convertible to) Type;\\n otherwise, this word dies. Leaves Address of the beginning of\\n the allocated memory.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n pointer = (type.from(form)).box\n (Decimal.new(pointer.address)).onto(stack)\nend\ntarget.at(\"ffi:unbox\", \"( A T -- F ): interprets whatever Address points at as a\\n value of the given Type, and leaves the matching Form.\\n Inverse of `ffi:box`.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is of the given Type. Passing 0\\n(none aka null pointer) for Address will lead to segfault.\\nPassing Address that points outside of your program's memory\\nwill lead to segfault. Passing Address that *is* in the bounds\\nof your program's memory, but one not pointing at a value of\\nthe given Type, will lead to undefined behavior (most likely\\njunk value of Form). Showing ill-formed results of this word to\\nclients, or letting clients control Address or Type, may expose\\nyour program to a whole class of security vulnerabilities.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n base = Pointer(Void).new(address.to_u64)\n form = (type.unbox(base)).to_form?.not_nil!\n form.onto(stack)\nend\ntarget.at(\"ffi:unsafeWrite\", \"( A F T -- ): interprets Form as that of the given Type,\\n and writes it at Address.\\n\\nThis word is **unsafe**: it does not check whether Address\\ncan be written to, whether there is enough memory to fully\\nwrite Form, etc. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing Address\\nthat *is* in the bounds of your program's memory and can\\nbe written to may lead to undefined behavior.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n value = type.from(form)\n base = Pointer(Void).new(address.to_u64)\n value.write_to!(base)\nend\ntarget.at(\"ffi:viewLayout\", \"( Svf -- Slf ): leaves Struct layout form for the given\\n Struct view form (an inline struct view, struct reference\\n view, or union view).\\n\\n```\\n[ x f32 y f32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint ffi:allocateStruct~ $: point~\\npoint ffi:allocateUnion $: pointU\\n\\npoint& ffi:viewLayout leaves: point\\npoint~ ffi:viewLayout leaves: point\\npointU ffi:viewLayout leaves: point\\n```\") do |_, stack|\n view = stack.drop.a(StructViewForm)\n view.layout.onto(stack)\nend\ntarget.at(\"ffi:sizeof\", \"( T -- B ): leaves the size of Type, in Bytes.\\n\\n```\\n#u8 ffi:sizeof leaves: 1\\n#u16 ffi:sizeof leaves: 2\\n#u32 ffi:sizeof leaves: 4\\n#u64 ffi:sizeof leaves: 8\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n (Decimal.new(type.sizeof)).onto(stack)\nend\ntarget.at(\"ffi:addressof\", \"( Svf/H -- A ): leaves Address of the given Struct view form\\n (an inline struct view, struct reference view, or union view),\\n or Hole in memory.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |_, stack|\n form = stack.drop.a(Hole | StructViewForm)\n (Decimal.new(form.address)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Frontend","path":"Novika/Capabilities/Impl/Frontend.html","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":7,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":"list = Block.new\ncapabilities.enabled.each do |klass|\n list.add(Quote.new(klass.id))\nend\nlist\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":3,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Novika::VERSION)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Ink","path":"Novika/Capabilities/Impl/Ink.html","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ink.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"COMPAT","name":"COMPAT","value":"{Color.rgb(0, 0, 0) => :black, Color.rgb(128, 0, 0) => :red, Color.rgb(0, 128, 0) => :green, Color.rgb(128, 128, 0) => :yellow, Color.rgb(0, 0, 128) => :blue, Color.rgb(128, 0, 128) => :magenta, Color.rgb(0, 128, 128) => :cyan, Color.rgb(192, 192, 192) => :light_gray, Color.rgb(128, 128, 128) => :dark_gray, Color.rgb(255, 0, 0) => :light_red, Color.rgb(0, 255, 0) => :light_green, Color.rgb(255, 255, 0) => :light_yellow, Color.rgb(0, 0, 255) => :light_blue, Color.rgb(255, 0, 255) => :light_magenta, Color.rgb(0, 255, 255) => :light_cyan, Color.rgb(255, 255, 255) => :white}"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":42,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"string = form.to_quote.string\ncolorful = string.colorize\nif fg\n colorful = colorful.fore(COMPAT[fg.closest(COMPAT.keys)])\nend\nif bg\n colorful = colorful.back(COMPAT[bg.closest(COMPAT.keys)])\nend\nappend_echo(engine, colorful)\n"}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":38,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"append_echo(engine, form.to_quote.string.colorize.reverse)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Nki","path":"Novika/Capabilities/Impl/Nki.html","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/nki.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"nki\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words to capture, read, and manipulate Novika images\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"nki:toBlock\", \"( Bf -- B ): leaves Block for the given Byteslice form,\\n assumed to contain a well-formed Novika image created\\n with `nki:captureAll`, `nki:captureNeighborhood`, or\\n otherwise. Dies if Byteslice form is an invalid Novika\\n image, or isn't a Novika image.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n bytes = stack.drop.a(Byteslice)\n begin\n image = bytes.to_io.read_bytes(Image)\n rescue error : BinData::ReadingVerificationException\n bytes.die(\"apparently, this byteslice is not a Novika image\")\n end\n (image.to_block(engine.capabilities)).onto(stack)\nend\ntarget.at(\"nki:captureAll\", \"( B -- Bf ): thoroughly, recursively captures entire\\n hierarchy of Block (its parents, prototype, friends,\\n tape, and dictionary), and leaves the resulting Novika\\n image as a Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nIf you're a visual type of person, imagine this word and\\nall related facilities as a kind of \\\"mold\\\", which carefully,\\nin an ordered fashion \\\"fills up\\\" a maze, until all paths\\nwere explored and all exits found.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhood\", \"( B -- Bf ): like `nki:captureAll`, but rather than\\n capturing all reachable blocks, captures only Block's\\n neighborhood. Leaves the resulting Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nWe store each block in Block's tape and dictionary in\\na list, then ask that block to do the same. When recursion\\nfinishes, the resulting list is called *block neighborhood*.\\n\\nParent, friends, and prototype of the given block are\\nreconstructed *if and only if they are in the block\\nneighborhood*.\\n\\n```\\n[ 1 2 3 ] nki:captureNeighborhood $: imgN\\n\\nimgN toQuote leaves: '[byteslice, consists of 111 byte(s)]' \\\"yours may differ!\\\"\\nimgN nki:toBlock leaves: [ [ 1 2 3 ] ]\\n\\n\\\"As opposed to nki:captureAll, which will capture EVERYTHING\\n it can reach:\\\"\\n[ 1 2 3 ] nki:captureAll $: imgA\\n\\nimgA toQuote leaves: '[byteslice, consists of 38298 byte(s)]' \\\"yours may differ!\\\"\\n\\n\\\"Note: [ 1 2 3 ] lives in a parallel universe now, with\\n its own friends, prototypes, toplevel block, and so on!\\n It doesn't have any links whatsoever to the whoever-it-was\\n that called nki:captureAll!\\\"\\nimgA nki:toBlock leaves: [ [ 1 2 3 ] ]\\n```\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllRaw\", \"( B -- Bf ): same as `nki:captureAll`, but does not archive\\n image payload obtained from capturing Block. May yield very\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodRaw\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but does not\\n archive image payload obtained from capturing Block. May yield\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllGzipBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodGzipBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliFast\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliFast\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/System","path":"Novika/Capabilities/Impl/System.html","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"ancestors":[{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/system.cr","line_number":100,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":101,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"print(form.to_quote.string)"}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":130,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":"exit(code.to_i)"}},{"html_id":"monotonic(engine):Decimal-instance-method","name":"monotonic","doc":"Returns a reading from the monotonic clock, in milliseconds.","summary":"Returns a reading from the monotonic clock, in milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":122,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(Time.monotonic.total_milliseconds)"}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":126,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":"sleep(millis.to_i.milliseconds)"}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":111,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":"string = prompt.to_quote.string\nprint(string)\nanswer = gets\n{answer ? Quote.new(answer) : nil, Boolean[!(!answer)]}\n"}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":118,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":"error.report(STDERR)"}}]}]},{"html_id":"novika/Novika/Capabilities/ISystem","path":"Novika/Capabilities/ISystem.html","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/System","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":77,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"system\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":85,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":81,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes all sorts of OS-related vocabulary, such as 'echo' and 'nap'\""}}],"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/system.cr","line_number":90,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":114,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/system.cr","line_number":116,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"appendEcho\", \"( F -- ): enquotes and appends Form to the standard\\n output stream.\") do |engine, stack|\n append_echo(engine, stack.drop)\nend\ntarget.at(\"readLine\", \"( Pf -- Aq true / false ): enquotes and prints Prompt\\n form to the standard output stream. Waits for the user\\n to answer, enquotes the answer and leaves it.\\n\\nIf user answered the prompt, leaves Answer quote followed\\nby boolean true. Otherwise, leaves boolean false.\\n\\n```\\n'What is your name? ' readLine => echo\\n\\n\\\"INPUT: What is your name? John Doe⏎\\\"\\n\\\"STDOUT: John Doe⏎\\\"\\n\\n\\\"INPUT: What is your name?Returns a reading from the monotonic clock, in milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/system.cr","line_number":111,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":""}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":108,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/system.cr","line_number":99,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":""}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/system.cr","line_number":105,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Capabilities/ISystem/PromptConfig","path":"Novika/Capabilities/ISystem/PromptConfig.html","kind":"struct","full_name":"Novika::Capabilities::ISystem::PromptConfig","name":"PromptConfig","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DELIMITERS","name":"DELIMITERS","value":"Word.new(\"delimiters\")"},{"id":"HISTORY","name":"HISTORY","value":"Word.new(\"history\")"},{"id":"MORE","name":"MORE","value":"Word.new(\"more?\")"},{"id":"PROMPT","name":"PROMPT","value":"Word.new(\"prompt\")"},{"id":"SUGGEST","name":"SUGGEST","value":"Word.new(\"suggest\")"}],"namespace":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"doc":"A thin wrapper around the prompt configuration block of `readLine*`.","summary":"A thin wrapper around the prompt configuration block of readLine*
.
Returns word delimiter quote, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":23,"url":null},"def":{"name":"delimiters?","return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(DELIMITERS)\nelse\n return\nend\n(Engine.exhaust(Engine.current.capabilities, entry)).top.a(Quote)\n"}},{"html_id":"history_entry?:Entry|Nil-instance-method","name":"history_entry?","doc":"Returns the history entry in the carrier block, if any.","summary":"Returns the history entry in the carrier block, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":17,"url":null},"def":{"name":"history_entry?","return_type":"Entry | ::Nil","visibility":"Public","body":"@carrier.entry_for?(HISTORY)"}},{"html_id":"more?(expression:String):Form|Nil-instance-method","name":"more?","doc":"Returns `false` or nil if no more input is expected after\n*expression*, otherwise, returns some form that the user\nassigned \"more\" to or that they left on top of the stack\n(interpreted as `true`).","summary":"Returns false
or nil if no more input is expected after expression, otherwise, returns some form that the user assigned "more" to or that they left on top of the stack (interpreted as true
).
Returns the prompt quote for the given line_number, or nil if no prompt should be used.
","abstract":false,"args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"args_string":"(line_number : Int32) : Quote | Nil","args_html":"(line_number : Int32) : Quote | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":43,"url":null},"def":{"name":"prompt?","args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(PROMPT)\nelse\n return\nend\nstack = Block.with(Decimal.new(line_number))\nform = (Engine.exhaust(Engine.current.capabilities, entry, stack)).top\nform.to_quote\n"}},{"html_id":"suggest?(word:String,prior:String):Tuple(Quote,Block)|Nil-instance-method","name":"suggest?","doc":"Returns the title quote followed by suggestions block for\nthe given *word* and input *prior* to *word*.","summary":"Returns the title quote followed by suggestions block for the given word and input prior to word.
","abstract":false,"args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"args_string":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","args_html":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":54,"url":null},"def":{"name":"suggest?","args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"return_type":"::Tuple(Quote, Block) | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(SUGGEST)\nelse\n return\nend\nif entry.opener?\n stack = Block.with(Quote.new(prior), Quote.new(word))\n block = Engine.exhaust(Engine.current.capabilities, entry, stack)\nelse\n block = entry.form.a(Block)\n if block.count == 2\n else\n block.die(\"expected block of the form [ title:quote [ ...suggestion:quote ] ]\")\n end\nend\ntitle, suggestions = block.at(block.count - 2), block.at(block.count - 1)\n{title.a(Quote), suggestions.a(Block)}\n"}}]}]}]},{"html_id":"novika/Novika/Capability","path":"Novika/Capability.html","kind":"module","full_name":"Novika::Capability","name":"Capability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":31,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Merges instance-side and class-side interfaces to a Novika\ncapability. Automatically includes `ICapabilityClass` and\n`ICapability` for you.","summary":"Merges instance-side and class-side interfaces to a Novika capability.
"},{"html_id":"novika/Novika/CapabilityCollection","path":"Novika/CapabilityCollection.html","kind":"class","full_name":"Novika::CapabilityCollection","name":"CapabilityCollection","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capability.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A collection of language capability implementations.\n\nCapability implementations can indirectly (by id) interact\nwith each other by sharing the capability collection they're\nmembers of.\n\n```\n# (!) Compile with -Dnovika_console\n\ncaps = CapabilityCollection.new\n\n# Add capability classes:\ncaps << Capabilities::Impl::Essential\ncaps << Capabilities::Impl::System\ncaps << Capabilities::Impl::Console\n\n# Enable capabilities. At this point you kinda don't know\n# which implementation is used under the hood, so you\n# need to refer to the capability by its id.\ncaps.enable(\"essential\")\ncaps.enable(\"system\")\ncaps.enable(\"console\")\n\nblock = Block.new(caps.block)\nblock.slurp(\"console:on 1000 nap console:off\")\n\nEngine.exhaust(block, caps)\n```","summary":"A collection of language capability implementations.
","class_methods":[{"html_id":"available:Array(ICapabilityClass)-class-method","name":"available","doc":"Lists *all* available (registered) capability classes.\n\nFor a capability class to be registered (available), it\nshould be the last subclass of a `Capability` includer\n(subclass depth is irrelevant), or have no subclasses\nand directly include `Capability`.","summary":"Lists all available (registered) capability classes.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":282,"url":null},"def":{"name":"available","return_type":"Array(ICapabilityClass)","visibility":"Public","body":"{% if true %}\n [{% for capability in Capability.includers %}\n {% subclasses = capability.all_subclasses %}\n {% if (!capability.abstract?) && subclasses.empty? %}\n {{ capability }},\n {% else %}{% if subclass = subclasses.reject(&.abstract?).last %}\n {{ subclass }},\n {% end %}{% end %}\n {% end %}] of ICapabilityClass\n {% end %}"}},{"html_id":"with_available-class-method","name":"with_available","doc":"Creates a capability collection, and adds *all* available\ncapabilities (see `CapabilityCollection.available`). Does\nnot enable any of them.\n\nReturns the resulting capability collection.","summary":"Creates a capability collection, and adds all available capabilities (see CapabilityCollection.available
).
Creates a capability collection, and adds capabilities that are on by default.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":256,"url":null},"def":{"name":"with_default","visibility":"Public","body":"caps = CapabilityCollection.new\navailable.each do |cap|\n if cap.on_by_default?\n else\n next\n end\n caps << cap\nend\ncaps\n"}}],"constructors":[{"html_id":"new(parent:Block|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil = nil)","args_html":"(parent : Block | Nil = nil)","location":{"filename":"src/novika/capability.cr","line_number":72,"url":null},"def":{"name":"new","args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(parent)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(cls:ICapabilityClass)-instance-method","name":"<<","doc":"Adds a capability class *cls* to this collection.","summary":"Adds a capability class cls to this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"args_string":"(cls : ICapabilityClass)","args_html":"(cls : ICapabilityClass)","location":{"filename":"src/novika/capability.cr","line_number":217,"url":null},"def":{"name":"<<","args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"visibility":"Public","body":"@classes[cls.id] = cls"}},{"html_id":"<<(library:Library)-instance-method","name":"<<","doc":"Adds a *library* to this collection. Overwrites any previous\nlibrary with the same id.","summary":"Adds a library to this collection.
","abstract":false,"args":[{"name":"library","external_name":"library","restriction":"Library"}],"args_string":"(library : Library)","args_html":"(library : Library)","location":{"filename":"src/novika/capability.cr","line_number":223,"url":null},"def":{"name":"<<","args":[{"name":"library","external_name":"library","restriction":"Library"}],"visibility":"Public","body":"@libraries[library.id] = library"}},{"html_id":"[]?(cls:T.class):T|NilforallT-instance-method","name":"[]?","doc":"Returns the instance of the given capability class *cls*,\nif such instance can be found in this collection. Otherwise,\nreturns nil.","summary":"Returns the instance of the given capability class cls, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class) : T | Nil forall T","args_html":"(cls : T.class) : T | Nil forall T","location":{"filename":"src/novika/capability.cr","line_number":154,"url":null},"def":{"name":"[]?","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"@objects[cls.id]?.try do |__arg1|\n __arg1.as(T)\nend"}},{"html_id":"block:Block-instance-method","name":"block","doc":"Returns the *capability block*: a block managed by this\ncollection, which includes the vocabulary injected by\nthe enabled capabilities.","summary":"Returns the capability block: a block managed by this collection, which includes the vocabulary injected by the enabled capabilities.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":70,"url":null},"def":{"name":"block","return_type":"Block","visibility":"Public","body":"@block"}},{"html_id":"copy:CapabilityCollection-instance-method","name":"copy","doc":"Copies this capability collection.\n\n* This collection shares library load callbacks (themselves,\n *not* the list of them) with the returned collection.\n\n* This collection shares FFI `Library` instances with the\n returned one, by reference.\n\n* This collection shares capability block parent (see `new`)\n with the returned one, by reference.\n\nEverything else is copied or created anew.","summary":"Copies this capability collection.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":239,"url":null},"def":{"name":"copy","return_type":"CapabilityCollection","visibility":"Public","body":"copy = CapabilityCollection.new\n@classes.each_value do |cls|\n copy << cls\nend\n@objects.each_key do |id|\n copy.enable(id)\nend\n@libraries.each_value do |library|\n copy << library\nend\n@load_library_callbacks.each do |callback|\n copy.on_load_library?(callback)\nend\ncopy\n"}},{"html_id":"enable(id:String):Bool-instance-method","name":"enable","doc":"Enables a capability with the given *id*.\n\nTo enable a capability means to create an instance of the\ncorresponding implementation class, and use that instance\nto inject the capability vocabulary into this collection's\n*capabilities block*, `block`. You can then access `block`\nand e.g. inherit from it to access the vocabulary of the\nenabled capabilities.\n\nDoes nothing if the capability is already enabled.\nDoes nothing if there is no capability with the given id.\n\nReturns whether there is a capability with the given *id*.","summary":"Enables a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Bool","args_html":"(id : String) : Bool","location":{"filename":"src/novika/capability.cr","line_number":116,"url":null},"def":{"name":"enable","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"if @objects.has_key?(id)\n return true\nend\nif cap = get_capability_class?(id)\nelse\n return false\nend\nobject = cap.new(self)\nobject.inject(block)\n@objects[id] = object\ntrue\n"}},{"html_id":"enable_all-instance-method","name":"enable_all","doc":"Enables all capabilities unconditionally.\n\nReturns self.","summary":"Enables all capabilities unconditionally.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":145,"url":null},"def":{"name":"enable_all","visibility":"Public","body":"@classes.each_key do |k|\n enable(k)\nend\nself\n"}},{"html_id":"enable_default-instance-method","name":"enable_default","doc":"Enables all capabilities that respond with true when sent\n`ICapabilityClass#on_by_default?`.\n\nFor capabilities that respond with false, you'll need to\ntarget them explicitly with `enable(id)`, or use `enable_all`\ninstead of `enable_default`.\n\nReturns self.","summary":"Enables all capabilities that respond with true when sent ICapabilityClass#on_by_default?
.
Returns an array of capabilities that are enabled in this collection at the moment.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":81,"url":null},"def":{"name":"enabled","visibility":"Public","body":"@objects.values.map(&.class)"}},{"html_id":"fetch(cls:T.class,&:T->U):U|NilforallT,U-instance-method","name":"fetch","doc":"Yields the capability instance of the given capability\nclass *cls* to the block, if such instance can be found\nin this collection.\n\nReturns the result of the block, or nil.","summary":"Yields the capability instance of the given capability class cls to the block, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class, & : T -> U) : U | Nil forall T, U","args_html":"(cls : T.class, & : T -> U) : U | Nil forall T, U","location":{"filename":"src/novika/capability.cr","line_number":210,"url":null},"def":{"name":"fetch","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> U)"},"return_type":"U | ::Nil","visibility":"Public","body":"if impl = self[cls]?\n yield impl\nend"}},{"html_id":"get_capability_class?(id:String)-instance-method","name":"get_capability_class?","doc":"Returns the capability class with the given *id*. Returns nil\nif there is no such capability class in this collection.","summary":"Returns the capability class with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":166,"url":null},"def":{"name":"get_capability_class?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes[id]?"}},{"html_id":"get_library?(id:String)-instance-method","name":"get_library?","doc":"Returns the library with the given *id*. Returns nil if there\nis no such library in this collection.","summary":"Returns the library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":160,"url":null},"def":{"name":"get_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries[id]?"}},{"html_id":"has_capability?(id:String)-instance-method","name":"has_capability?","doc":"Returns whether this collection includes a capability with\nthe given *id*.","summary":"Returns whether this collection includes a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":93,"url":null},"def":{"name":"has_capability?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes.has_key?(id)"}},{"html_id":"has_capability_enabled?(id:String)-instance-method","name":"has_capability_enabled?","doc":"Returns whether this collection has the capability with\nthe given *id* enabled.","summary":"Returns whether this collection has the capability with the given id enabled.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":87,"url":null},"def":{"name":"has_capability_enabled?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@objects.has_key?(id)"}},{"html_id":"has_library?(id:String)-instance-method","name":"has_library?","doc":"Returns whether this collection includes a library with\nthe given *id*.","summary":"Returns whether this collection includes a library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":99,"url":null},"def":{"name":"has_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries.has_key?(id)"}},{"html_id":"load_library?(id:String):Library|Nil-instance-method","name":"load_library?","doc":"Tries to load a library (aka shared object) with the given\n*id*. Returns the resulting `Library` object, or nil.\n\nThe library object is cached: further calls to `load_library?`\nand `get_library?` will return that library object.","summary":"Tries to load a library (aka shared object) with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Library | Nil","args_html":"(id : String) : Library | Nil","location":{"filename":"src/novika/capability.cr","line_number":195,"url":null},"def":{"name":"load_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Library | ::Nil","visibility":"Public","body":"@libraries.fetch(id) do\n @load_library_callbacks.each do |callback|\n if library = callback.call(id)\n return @libraries[id] = library\n end\n end\nend"}},{"html_id":"on_load_library?(callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"args_string":"(callback : String -> Library | Nil)","args_html":"(callback : String -> Library | Nil)","location":{"filename":"src/novika/capability.cr","line_number":181,"url":null},"def":{"name":"on_load_library?","args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"visibility":"Public","body":"@load_library_callbacks << callback"}},{"html_id":"on_load_library?(&callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":186,"url":null},"def":{"name":"on_load_library?","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"},"visibility":"Public","body":"on_load_library?(callback)"}}]},{"html_id":"novika/Novika/CaptureMode","path":"Novika/CaptureMode.html","kind":"enum","full_name":"Novika::CaptureMode","name":"CaptureMode","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":24,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CaptureAll","name":"CaptureAll","value":"0"},{"id":"CaptureNeighborhood","name":"CaptureNeighborhood","value":"1"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"capture_all?-instance-method","name":"capture_all?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":25,"url":null},"def":{"name":"capture_all?","visibility":"Public","body":"self == CaptureAll"}},{"html_id":"capture_neighborhood?-instance-method","name":"capture_neighborhood?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":26,"url":null},"def":{"name":"capture_neighborhood?","visibility":"Public","body":"self == CaptureNeighborhood"}}]},{"html_id":"novika/Novika/Classifier","path":"Novika/Classifier.html","kind":"struct","full_name":"Novika::Classifier","name":"Classifier","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/classifier.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"`Classifier` brings *unclassified forms* to life.\n\n`Classifier` assigns types to fragments of Novika code\nconveniently called *unclassified forms*: this\nunclassified form is a decimal, this one is a word, that\none is a quote.\n\nUnclassified forms are given to `Classifier` by `Scissors`,\nan object dedicated to cutting a big blob of Novika code\ninto smaller fragments.\n\n`Scissors` and `Classifier` are designed to work in\ntandem. Separating one from the other is possible and will\nwork, but is not recommended unless you have read the source\ncode of both.","summary":"Classifier
brings unclassified forms to life.
Initializes a classifier from the given source string and Novika block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"args_string":"(source : String, block : Novika::Block)","args_html":"(source : String, block : Novika::Block)","location":{"filename":"src/novika/classifier.cr","line_number":29,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source, block)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"block:Novika::Block-instance-method","name":"block","doc":"Returns the block used by this classifier.","summary":"Returns the block used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":21,"url":null},"def":{"name":"block","visibility":"Public","body":"@block"}},{"html_id":"bytes:Pointer(UInt8)-instance-method","name":"bytes","doc":"Returns the source code byte pointer used by this classifier.","summary":"Returns the source code byte pointer used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":18,"url":null},"def":{"name":"bytes","visibility":"Public","body":"@bytes"}},{"html_id":"classify(start,count,dot):Nil-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long. *dot* is the byte index of `'.'`.\n\nThese three arguments are assumed to come from `Scissors#cut`.\n\nThis method does practically no bounds checks, is unsafe\nand must be worked with carefully.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"args_string":"(start, count, dot) : Nil","args_html":"(start, count, dot) : Nil","location":{"filename":"src/novika/classifier.cr","line_number":223,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if count.zero?\n return\nend\nbyte = @bytes[start]\ncase byte\nwhen '['\n nest\nwhen ']'\n unnest\nwhen '#'\n if count > 1\n add(Novika::QuotedWord.new(build_raw(start + 1, count - 1)))\n else\n add(Novika::Word.new(\"#\"))\n end\nwhen '|'\n if count > 1\n add(Novika::Word.new(build_raw(start, count)))\n else\n push_cursor(block.count)\n end\nwhen '\\''\n add(Novika::Quote.new(build_quote(start + 1, count - 2)))\nwhen '\"'\n if block.has_comment?\n return\n end\n if block.count.zero?\n else\n return\n end\n block.describe_with?(build_comment(start + 1, count - 2))\nelse\n e = (start + count) - 1\n if dot\n else\n frag = build_raw(start, count)\n if decimal?(start, e, sign: true)\n add(Novika::Decimal.new(frag))\n else\n if number_with_base = number_with_base?(frag)\n number, base = number_with_base\n add(Novika::Decimal.new(number.to_big_i(base)))\n else\n add(Novika::Word.new(frag))\n end\n end\n return\n end\n if ((start < dot && dot < e) && (decimal?(start, dot - 1, sign: true))) && (decimal?(dot + 1, e))\n add(Novika::Decimal.new(build_raw(start, count)))\n else\n classify(start, dot - start, dot: nil)\n add(Novika::Word.new(\".\"))\n classify(dot + 1, e - dot)\n end\nend\n"}},{"html_id":"classify(start,count)-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"args_string":"(start, count)","args_html":"(start, count)","location":{"filename":"src/novika/classifier.cr","line_number":311,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"visibility":"Public","body":"dot = nil\nstart.upto((start + count) - 1) do |index|\n if @bytes[index] === '.'\n dot = index\n break\n end\nend\nclassify(start, count, dot)\n"}},{"html_id":"end-instance-method","name":"end","doc":"Ends classification. Makes sure all blocks are closed\n(have their corresponding `]`).","summary":"Ends classification.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":324,"url":null},"def":{"name":"end","visibility":"Public","body":"if @ceiling.same?(@block)\nelse\n @block.die(\"missing ']'\")\nend"}}]},{"html_id":"novika/Novika/Color","path":"Novika/Color.html","kind":"struct","full_name":"Novika::Color","name":"Color","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/color.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"rgb(r,g,b)-class-method","name":"rgb","doc":"Creates a `Color` from *r*ed (0 <= h <= 255), *g*reen\n(0 <= g <= 255), *b*lue (0 <= b <= 255) channel values.","summary":"Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and lightness (0 <= l <= 100, percents).
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and value (0 <= v <= 100, percents).
Creates a Color
from lightness (0-100), chroma (0-132), hue (0-360).
Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Holds alpha channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a","return_type":"Decimal","visibility":"Public","body":"@a"}},{"html_id":"a=(a:Decimal)-instance-method","name":"a=","doc":"Holds alpha channel value decimal (0-255).\n\nYou can mutate this to set alpha, but do remember that\n`Color` is a struct.","summary":"Holds alpha channel value decimal (0-255).
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"args_string":"(a : Decimal)","args_html":"(a : Decimal)","location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:Decimal-instance-method","name":"b","doc":"Returns blue channel value decimal (0-255).","summary":"Returns blue channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":14,"url":null},"def":{"name":"b","return_type":"Decimal","visibility":"Public","body":"@b"}},{"html_id":"closest(palette:Array(Color))-instance-method","name":"closest","doc":"Returns the color closest to this color from *palette*.\n\nHow close one color is to another is determined by their\ndistance in an HSV-backed coordinate system.","summary":"Returns the color closest to this color from palette.
","abstract":false,"args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"args_string":"(palette : Array(Color))","args_html":"(palette : Array(Color))","location":{"filename":"src/novika/forms/color.cr","line_number":55,"url":null},"def":{"name":"closest","args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"visibility":"Public","body":"h, s, v = hsv\npalette.min_by do |other|\n h1, s1, v1 = other.hsv\n (((h1 - h).to_f64 ** 2) + ((s1 - s).to_f64 ** 2)) + ((v1 - v).to_f64 ** 2)\nend\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":67,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"g:Decimal-instance-method","name":"g","doc":"Returns green channel value decimal (0-255).","summary":"Returns green channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":11,"url":null},"def":{"name":"g","return_type":"Decimal","visibility":"Public","body":"@g"}},{"html_id":"hsl:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsl","doc":"Returns a tuple with H, S, L of this color.","summary":"Returns a tuple with H, S, L of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":31,"url":null},"def":{"name":"hsl","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, l = Color.rgb2hsl(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(l)}\n"}},{"html_id":"hsv:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsv","doc":"Returns a tuple with H, S, V of this color.","summary":"Returns a tuple with H, S, V of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":38,"url":null},"def":{"name":"hsv","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, v = Color.rgb2hsv(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(v)}\n"}},{"html_id":"lch:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"lch","doc":"Returns a tuple with L, C, H of this color.","summary":"Returns a tuple with L, C, H of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":45,"url":null},"def":{"name":"lch","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"l, c, h = LCH.rgb2lch(r.to_i, g.to_i, b.to_i)\n{Decimal.new(l.round), Decimal.new(c.round), Decimal.new(h.round)}\n"}},{"html_id":"r:Decimal-instance-method","name":"r","doc":"Returns red channel value decimal (0-255).","summary":"Returns red channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":8,"url":null},"def":{"name":"r","return_type":"Decimal","visibility":"Public","body":"@r"}},{"html_id":"rgb:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"rgb","doc":"Returns a tuple of R, G, B channel values.","summary":"Returns a tuple of R, G, B channel values.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":26,"url":null},"def":{"name":"rgb","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"{r, g, b}"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":71,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"a255 = Decimal.new(255)\nio << \"rgb\"\nif a == a255\nelse\n io << \"a\"\nend\n(((((io << \"(\") << r) << \", \") << g) << \", \") << b\nif a == a255\nelse\n (io << \", \") << a\nend\nio << \")\"\n"}}]},{"html_id":"novika/Novika/ColorSnapshot","path":"Novika/ColorSnapshot.html","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":95,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ColorSnapshot]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: r, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: g, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: b, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: a, cls: UInt8, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Color)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Color"}],"args_string":"(form : Color)","args_html":"(form : Color)","location":{"filename":"src/novika/image.cr","line_number":116,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Color"}],"visibility":"Public","body":"color = new\ncolor.r = form.r.to_u8\ncolor.g = form.g.to_u8\ncolor.b = form.b.to_u8\ncolor.a = form.a.to_u8\ncolor\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":96,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"a:UInt8-instance-method","name":"a","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"def":{"name":"a","return_type":"UInt8","visibility":"Public","body":"@a"}},{"html_id":"a=(a:UInt8)-instance-method","name":"a=","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"args_string":"(a : UInt8)","args_html":"(a : UInt8)","def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:UInt8-instance-method","name":"b","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"def":{"name":"b","return_type":"UInt8","visibility":"Public","body":"@b"}},{"html_id":"b=(b:UInt8)-instance-method","name":"b=","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"args_string":"(b : UInt8)","args_html":"(b : UInt8)","def":{"name":"b=","args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"visibility":"Public","body":"@b = b"}},{"html_id":"g:UInt8-instance-method","name":"g","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"def":{"name":"g","return_type":"UInt8","visibility":"Public","body":"@g"}},{"html_id":"g=(g:UInt8)-instance-method","name":"g=","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"args_string":"(g : UInt8)","args_html":"(g : UInt8)","def":{"name":"g=","args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"visibility":"Public","body":"@g = g"}},{"html_id":"r:UInt8-instance-method","name":"r","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"def":{"name":"r","return_type":"UInt8","visibility":"Public","body":"@r"}},{"html_id":"r=(r:UInt8)-instance-method","name":"r=","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"args_string":"(r : UInt8)","args_html":"(r : UInt8)","def":{"name":"r=","args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"visibility":"Public","body":"@r = r"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":110,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"color = Color.rgb(Decimal.new(r), Decimal.new(g), Decimal.new(b))\ncolor.a = Decimal.new(a)\ncolor\n"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Decimal","path":"Novika/Decimal.html","kind":"class","full_name":"Novika::Decimal","name":"Decimal","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/decimal.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A representation for decimal numbers inside Novika.","summary":"A representation for decimal numbers inside Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":27,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"decimal\""}}],"constructors":[{"html_id":"new(val:BigDecimal)-class-method","name":"new","abstract":false,"args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"args_string":"(val : BigDecimal)","args_html":"(val : BigDecimal)","location":{"filename":"src/novika/forms/decimal.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"visibility":"Public","body":"_ = allocate\n_.initialize(val)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(object:String|Number)-class-method","name":"new","abstract":false,"args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"args_string":"(object : String | Number)","args_html":"(object : String | Number)","location":{"filename":"src/novika/forms/decimal.cr","line_number":13,"url":null},"def":{"name":"new","args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"visibility":"Public","body":"_ = allocate\n_.initialize(object)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"%(other:Decimal):Decimal-instance-method","name":"%","doc":"Returns the remainder of this and *other* decimal numbers.","summary":"Returns the remainder of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":75,"url":null},"def":{"name":"%","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val % other.val)"}},{"html_id":"&(other:Decimal):Decimal-instance-method","name":"&","doc":"Combines this and *other* decimals using bitwise and.","summary":"Combines this and other decimals using bitwise and.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":99,"url":null},"def":{"name":"&","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value & other.val.value)"}},{"html_id":"*(other:Decimal):Decimal-instance-method","name":"*","doc":"Returns the product of this and *other* decimal numbers.","summary":"Returns the product of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":65,"url":null},"def":{"name":"*","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val * other.val)"}},{"html_id":"**(other:Decimal):Decimal-instance-method","name":"**","doc":"Raises this decimal to the power of *other*.","summary":"Raises this decimal to the power of other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":80,"url":null},"def":{"name":"**","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"if val.scale.zero? && other.val.scale.zero?\n return Decimal.new(val ** other.val.to_i64)\nend\nDecimal.new(val.to_f64 ** other.to_f64)\n"}},{"html_id":"+(other:Decimal):Decimal-instance-method","name":"+","doc":"Returns the sum of this and *other* decimal numbers.","summary":"Returns the sum of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":55,"url":null},"def":{"name":"+","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val + other.val)"}},{"html_id":"-(other:Decimal):Decimal-instance-method","name":"-","doc":"Returns the difference between this and *other* decimal numbers.","summary":"Returns the difference between this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":60,"url":null},"def":{"name":"-","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val - other.val)"}},{"html_id":"/(other:Decimal):Decimal-instance-method","name":"/","doc":"Returns the quotient of this and *other* decimal numbers.","summary":"Returns the quotient of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":70,"url":null},"def":{"name":"/","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val / other.val)"}},{"html_id":"<(other:Decimal):Bool-instance-method","name":"<","doc":"Returns whether this decimal is smaller than *other*.","summary":"Returns whether this decimal is smaller than other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Bool","args_html":"(other : Decimal) : Bool","location":{"filename":"src/novika/forms/decimal.cr","line_number":94,"url":null},"def":{"name":"<","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Bool","visibility":"Public","body":"val < other.val"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
Combines this and other decimals using bitwise or.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":104,"url":null},"def":{"name":"|","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value | other.val.value)"}},{"html_id":"bitcount:Decimal-instance-method","name":"bitcount","doc":"Returns the number of bits in this decimal.","summary":"Returns the number of bits in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":161,"url":null},"def":{"name":"bitcount","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.bit_length)"}},{"html_id":"ceil:Decimal-instance-method","name":"ceil","doc":"Rounds this decimal up.","summary":"Rounds this decimal up.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":132,"url":null},"def":{"name":"ceil","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.ceil)"}},{"html_id":"chr:Char-instance-method","name":"chr","doc":"Returns the character corresponding to this decimal.","summary":"Returns the character corresponding to this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":32,"url":null},"def":{"name":"chr","return_type":"Char","visibility":"Public","body":"to_i.chr"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/decimal.cr","line_number":21,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"decimal number \"\nto_s(io)\n"}},{"html_id":"each_bit(&:Decimal->)-instance-method","name":"each_bit","doc":"Yields each bit in this decimal.","summary":"Yields each bit in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":109,"url":null},"def":{"name":"each_bit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Decimal ->)"},"visibility":"Public","body":"(val.value.to_s(2)).each_char do |char|\n if char == '-'\n next\n end\n yield Decimal.new(char == '1' ? 1 : 0)\nend"}},{"html_id":"floor:Decimal-instance-method","name":"floor","doc":"Rounds this decimal down.","summary":"Rounds this decimal down.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":127,"url":null},"def":{"name":"floor","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.floor)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns whether this decimal is in the bounds of Int64
.
Asserts this decimal is in one of ranges.
","abstract":false,"args":[{"name":"ranges","external_name":"ranges","restriction":""}],"args_string":"(*ranges) : Decimal","args_html":"(*ranges) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":166,"url":null},"def":{"name":"in","args":[{"name":"ranges","external_name":"ranges","restriction":""}],"splat_index":0,"return_type":"Decimal","visibility":"Public","body":"if ranges.any?(&.includes?(val))\n return self\nend\nmessage = String.build do |io|\n io << \"decimal out of range: expected \"\n if ranges.size > 1\n io << \"any of: \"\n end\n ranges.join(io, \", \") do |range|\n (((io << \"[\") << range.begin) << \"; \") << range.end\n io << (range.exclusive? ? \")\" : \"]\")\n end\nend\ndie(message)\n"}},{"html_id":"int:Decimal-instance-method","name":"int","doc":"Asserts this decimal is an integer. Dies if it isn't.","summary":"Asserts this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":184,"url":null},"def":{"name":"int","return_type":"Decimal","visibility":"Public","body":"if integer?\n return self\nend\ndie(\"decimal is not an integer\")\n"}},{"html_id":"integer?-instance-method","name":"integer?","doc":"Returns whether this decimal is an integer.","summary":"Returns whether this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":199,"url":null},"def":{"name":"integer?","visibility":"Public","body":"val.trunc == val"}},{"html_id":"nth_ls_bit(n:Decimal):Decimal-instance-method","name":"nth_ls_bit","doc":"Returns *n*-th least significant bit","summary":"Returns n-th least significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal","args_html":"(n : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":156,"url":null},"def":{"name":"nth_ls_bit","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.abs.bit(n.to_i))"}},{"html_id":"nth_ms_bit?(n:Decimal):Decimal|Nil-instance-method","name":"nth_ms_bit?","doc":"Returns *n*-th most significant bit","summary":"Returns n-th most significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal | Nil","args_html":"(n : Decimal) : Decimal | Nil","location":{"filename":"src/novika/forms/decimal.cr","line_number":147,"url":null},"def":{"name":"nth_ms_bit?","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal | ::Nil","visibility":"Public","body":"str = val.value.to_s(2)\nnint = n.to_i\nif nint < str.size\nelse\n return\nend\nDecimal.new(str[nint + (val.negative? ? 1 : 0)]? == '1' ? 1 : 0)\n"}},{"html_id":"posint:Decimal-instance-method","name":"posint","doc":"Asserts this decimal is a positive integer (i.e., >= 0).\nDies if it isn't.","summary":"Asserts this decimal is a positive integer (i.e., >= 0).
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":192,"url":null},"def":{"name":"posint","return_type":"Decimal","visibility":"Public","body":"if val >= 0 && integer?\n return self\nend\ndie(\"decimal is not a positive integer\")\n"}},{"html_id":"rad_cos:Decimal-instance-method","name":"rad_cos","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":137,"url":null},"def":{"name":"rad_cos","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.cos(val))"}},{"html_id":"rad_sin:Decimal-instance-method","name":"rad_sin","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":142,"url":null},"def":{"name":"rad_sin","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sin(val))"}},{"html_id":"round:Decimal-instance-method","name":"round","doc":"Rounds this decimal.","summary":"Rounds this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":117,"url":null},"def":{"name":"round","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.round)"}},{"html_id":"sqrt:Decimal-instance-method","name":"sqrt","doc":"Returns the square root of this decimal.","summary":"Returns the square root of this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":89,"url":null},"def":{"name":"sqrt","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sqrt(val))"}},{"html_id":"to_f32(*args,**options)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f32(*args, **options)"}},{"html_id":"to_f32(*args,**options,&)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f32(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_f64(*args,**options)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f64(*args, **options)"}},{"html_id":"to_f64(*args,**options,&)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f64(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_i:Int32-instance-method","name":"to_i","doc":"Downgrades this decimal into an integer (`Int32`). Dies\nif too large.","summary":"Downgrades this decimal into an integer (Int32
).
Truncates this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":122,"url":null},"def":{"name":"trunc","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.trunc)"}},{"html_id":"zero?:Bool-instance-method","name":"zero?","doc":"Returns whether this decimal is zero.","summary":"Returns whether this decimal is zero.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":42,"url":null},"def":{"name":"zero?","return_type":"Bool","visibility":"Public","body":"val.zero?"}}]},{"html_id":"novika/Novika/Dict","path":"Novika/Dict.html","kind":"class","full_name":"Novika::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":55,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Default dictionary protocol implementation: default block\ndictionary implementation. Uses a hash map for storage.\n\nNote: setting or getting with blocks as keys performs a\nlinear scan for now. The semantics for this is unstable.","summary":"Default dictionary protocol implementation: default block dictionary implementation.
","instance_methods":[{"html_id":"==(other:Dict)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Dict"}],"args_string":"(other : Dict)","args_html":"(other : Dict)","location":{"filename":"src/novika/dict.cr","line_number":155,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Dict"}],"visibility":"Public","body":"if @store == (other.@store)\nelse\n return false\nend\nif @blockstore.class == (other.@blockstore).class\nelse\n return false\nend\nif bs_l = @blockstore\nelse\n return true\nend\nbs_r = (other.@blockstore).not_nil!\nif bs_l.size == bs_r.size\nelse\n return false\nend\nbs_l.all? do |k_l, v_l|\n bs_r.any? do |k_r, v_r|\n (k_l == k_r) && (v_l == v_r)\n end\nend\n"}},{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":123,"url":null},"def":{"name":"clear","visibility":"Public","body":"@store.clear\n@blockstore.try(&.clear)\n"}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":142,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":"Dict.new(@store.dup, @blockstore.try(&.dup))"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":138,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"@store.size + (@blockstore.try(&.size) || 0)"}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":119,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":"name.is_a?(Block) ? del_block(name) : @store.delete(name)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":146,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"visibility":"Public","body":"@store.each do |k, v|\n yield k, v\nend\n@blockstore.try(&.each do |k, v|\n yield k, v\nend)\n"}},{"html_id":"get(name:Form,&):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, &) : Entry | Nil","args_html":"(name : Form, &) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":113,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"return_type":"Entry | ::Nil","visibility":"Public","body":"if name.is_a?(Block)\n return get_block(name) do\n yield name\n end\nend\n@store.fetch(name) do\n yield name\nend\n"}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":128,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Block) ? has_block?(name) : @store.has_key?(name)"}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":132,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":"donor.each do |k, v|\n if k.is_a?(Word) && k.private?\n else\n set(k, v)\n end\nend"}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":107,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":"if name.is_a?(Block)\n return set_block(name, entry)\nend\n@store[name] = entry\n"}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Executes a fetcher callback on every visited vertex in the block graph starting from an entrypoint block, until the callback returns T
, or until there are no more blocks to explore.
Executes the fetcher callback on every visited vertex in the block graph starting from an entrypoint block, and until the callback returns T
, or until exhausted all reachable vertices.
Same as #on(entrypoint : Block, ignore : Nil)
, the difference being that immediately adjacent block ignore list is taken into account.
Index of the code block in a continuation block.
"},{"id":"C_STACK_AT","name":"C_STACK_AT","value":"1","doc":"Index of the stack block in a continuation block.","summary":"Index of the stack block in a continuation block.
"},{"id":"MAX_CONTS","name":"MAX_CONTS","value":"1024","doc":"Maximum amount of scheduled continuations in `conts`. After\npassing this number, `Error` is raised to bring attention\nto such dangerous depth.","summary":"Maximum amount of scheduled continuations in #conts
.
Maximum number of engines that can be created.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"An engine object is responsible for managing a *continuations block*.\n\nContinuations block consists of *continuatio**n** blocks*.\n\nCanonical continuation blocks themselves contain two blocks\n(see `Engine.cont`):\n\n- *Code block*, more commonly known as simply the block\n (and as *active* block when its continuation is active,\n i.e., when it's being evaluated),\n\n- *Stack block*, more commonly known as simply the stack\n (and as *active* stack when its continuation is active,\n i.e., when it's being evaluated).\n\n`Engine#schedule` is used to create a continuation block\ngiven a `Schedulable` object (usually a `Form`, and in rarer\ncases an `Entry`) and a stack block. It then adds the\ncontinuation block to the continuations block -- effectively\nscheduling it for execution *on the next exhaust loop cycle*.\n\nNote that there are two other methods linked with execution\nand implemented by all forms: `on_open`, and `on_parent_open`.\nThey *perform* whatever action the form wants rather than\nsimply *scheduling* it to be performed some time in the\nfuture. Namely, `on_open` is invoked whenever the form at\nhand is itself the target of opening (aka execution, aka\nevaluation), and `on_parent_open` is invoked when a block\ncontaining the form at hand (its parent block) is the target\nof opening.\n\nAn engine's *exhaust loop* is where most of the magic happens.\nIt is organized very much like the fetch-decode-execute cycle\nin CPUs.\n\nFor *fetch*, the engine finds the top (see `Block#top`)\ncontinuation block, then finds the top form on the code\nblock, and invokes the `on_parent_open` method on it.\n\nThis method is analogous to *decoding* followed by *execution*.\nThe form is free to choose how it wants to make sense of itself,\ngiven an engine. Some forms (e.g. words) end up scheduling\nnew continuation blocks `on_parent_open`, making the engine\ngo through them first.\n\nAfter the cursor of the active block hits the end, `Engine`\ndrops (see `Block#drop`) the continuation block (thereby\n*closing* the code block).\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\nstack = Block.new\n\nengine = Engine.new(caps)\nengine.schedule(block, stack)\nengine.exhaust\n\nputs stack # [ 3 ]\n\n# Or, shorter:\n\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\n\nputs Engine.exhaust(caps, block) # [ 3 ]\n```","summary":"An engine object is responsible for managing a continuations block.
","class_methods":[{"html_id":"cont(*,block,stack)-class-method","name":"cont","doc":"Creates and returns a canonical continuation block.\n\nA continuation block must include two blocks: the first is\ncalled simply the *block* (found at `C_BLOCK_AT`), and the\nsecond is called the *stack* block (found at `C_STACK_AT`).","summary":"Creates and returns a canonical continuation block.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"args_string":"(*, block, stack)","args_html":"(*, block, stack)","location":{"filename":"src/novika/engine.cr","line_number":170,"url":null},"def":{"name":"cont","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"splat_index":0,"visibility":"Public","body":"Block.with([block, stack] of Form, leaf: false)"}},{"html_id":"current-class-method","name":"current","doc":"Returns the current engine. Raises a BUG exception if\nthere is no current engine.","summary":"Returns the current engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":109,"url":null},"def":{"name":"current","visibility":"Public","body":"@@stack.last? || (raise(\"BUG: there is no current engine\"))"}},{"html_id":"exhaust(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"exhaust!(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust!","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule!`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust!","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule!(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"pop(engine:Engine):Engine|Nil-class-method","name":"pop","doc":"Pops *engine* from the engine stack. Raises a BUG exception\n(and does not pop!) if the current engine is not *engine*\n(or if it is absent).","summary":"Pops engine from the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine | Nil","args_html":"(engine : Engine) : Engine | Nil","location":{"filename":"src/novika/engine.cr","line_number":135,"url":null},"def":{"name":"pop","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine | ::Nil","visibility":"Public","body":"if current.same?(engine)\nelse\n raise(\"BUG: lost track of the engine stack: unexpected engine on top!\")\nend\n@@stack.pop\n"}},{"html_id":"push(caps:CapabilityCollection)-class-method","name":"push","doc":"Pushes a new engine with the given capability collection *caps*.\n\nMake sure that you `pop` it yourself or that you know what\nyou're doing!","summary":"Pushes a new engine with the given capability collection caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/engine.cr","line_number":128,"url":null},"def":{"name":"push","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"push(new(caps))"}},{"html_id":"trackers-class-method","name":"trackers","doc":"Holds an array of exhaust tracker objects associated with\nall instances of `Engine`. These objects intercept forms\nbefore/after opening in `Engine#exhaust`. This e.g. allows\nfrontends to analyze/track forms and/or matching blocks.","summary":"Holds an array of exhaust tracker objects associated with all instances of Engine
.
Yields an instance of Engine
.
Pushes engine onto the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine","args_html":"(engine : Engine) : Engine","location":{"filename":"src/novika/engine.cr","line_number":114,"url":null},"def":{"name":"push","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine","visibility":"Public","body":"if @@stack.size.in?(0..MAX_ENGINES)\nelse\n raise(Error.new(\"bad engine stack depth: deep recursion in a __metaword__?\"))\nend\n@@stack << engine\nengine\n"}}],"instance_methods":[{"html_id":"block-instance-method","name":"block","doc":"Returns the block of the active continuation.","summary":"Returns the block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":204,"url":null},"def":{"name":"block","visibility":"Public","body":"(cont.at(C_BLOCK_AT)).a(Block)"}},{"html_id":"capabilities:CapabilityCollection-instance-method","name":"capabilities","doc":"Returns the capability collection used by this engine.","summary":"Returns the capability collection used by this engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":144,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"cont-instance-method","name":"cont","doc":"Returns the active continuation.","summary":"Returns the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":199,"url":null},"def":{"name":"cont","visibility":"Public","body":"conts.top.a(Block)"}},{"html_id":"conts:Novika::Block-instance-method","name":"conts","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Novika::Block)-instance-method","name":"conts=","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"args_string":"(conts : Novika::Block)","args_html":"(conts : Novika::Block)","location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"die(*args,**options)-instance-method","name":"die","doc":"See `Form#die`.","summary":"See Form#die
.
See Form#die
.
Returns the relevant death handler, or nil.
","abstract":false,"args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"args_string":"(avoid_prototype = nil)","args_html":"(avoid_prototype = nil)","location":{"filename":"src/novika/engine.cr","line_number":279,"url":null},"def":{"name":"drop_until_death_handler?","args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"visibility":"Public","body":"while !conts.tape.empty?\n entry = block.entry_for?(Hook.died)\n conts.drop\n if entry\n else\n next\n end\n handler = entry_to_death_handler_block(entry)\n if avoid_prototype && (handler.prototype.same?(avoid_prototype))\n else\n return handler\n end\nend"}},{"html_id":"each_active_block(&)-instance-method","name":"each_active_block","doc":"Yields active blocks, starting from the oldest active block\nup to the current active block.","summary":"Yields active blocks, starting from the oldest active block up to the current active block.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":215,"url":null},"def":{"name":"each_active_block","yields":1,"block_arity":1,"visibility":"Public","body":"conts.each do |cont|\n yield ((cont.a(Block)).at(C_BLOCK_AT)).a(Block)\nend"}},{"html_id":"execute(form:Form)-instance-method","name":"execute","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form)","args_html":"(form : Form)","location":{"filename":"src/novika/engine.cr","line_number":293,"url":null},"def":{"name":"execute","args":[{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"begin\n form.on_parent_open(self)\nrescue error : Error\n error.conts || (error.conts = conts.instance)\n if handler = drop_until_death_handler?(avoid_prototype: block.prototype)\n else\n raise(error)\n end\n schedule(handler, stack: conts.count.zero? ? Block.with(error) : stack.add(error))\nend"}},{"html_id":"exhaust-instance-method","name":"exhaust","doc":"Exhausts all scheduled continuations, starting from the\ntopmost (see `Block#top`) continuation in `conts`.","summary":"Exhausts all scheduled continuations, starting from the topmost (see Block#top
) continuation in #conts
.
See Schedulable#schedule
.
Main authorized point for adding continuations unsafely.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block)","args_html":"(other : Block)","location":{"filename":"src/novika/engine.cr","line_number":232,"url":null},"def":{"name":"schedule!","args":[{"name":"other","external_name":"other","restriction":"Block"}],"visibility":"Public","body":"if conts.count > MAX_CONTS\n die(\"recursion or block open is too deep (> #{MAX_CONTS})\")\nend\ntap do\n conts.add(other)\nend\n"}},{"html_id":"schedule!(*,block:Block,stack:Block)-instance-method","name":"schedule!","doc":"Schedules a continuation with the given *block* and *stack*.","summary":"Schedules a continuation with the given block and stack.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(*, block : Block, stack : Block)","args_html":"(*, block : Block, stack : Block)","location":{"filename":"src/novika/engine.cr","line_number":241,"url":null},"def":{"name":"schedule!","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"splat_index":0,"visibility":"Public","body":"schedule!(Engine.cont(block: block, stack: stack))"}},{"html_id":"stack-instance-method","name":"stack","doc":"Returns the stack block of the active continuation.","summary":"Returns the stack block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":209,"url":null},"def":{"name":"stack","visibility":"Public","body":"(cont.at(C_STACK_AT)).a(Block)"}}]},{"html_id":"novika/Novika/Entry","path":"Novika/Entry.html","kind":"class","full_name":"Novika::Entry","name":"Entry","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":172,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a dictionary entry. Dictionary entries hold the\nvalue form.","summary":"Represents a dictionary entry.
","constructors":[{"html_id":"new(form:Form,opener:Bool=false)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"args_string":"(form : Form, opener : Bool = false)","args_html":"(form : Form, opener : Bool = false)","location":{"filename":"src/novika/dict.cr","line_number":178,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(form, opener)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
See Object#hash(hasher)
Safe #schedule
.
Unsafe #schedule
.
How many trace entries to display at max.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds and accepts information about an error.\n\nErrors are raised when a certain case is undesired, unhandleable,\nor otherwise inappropriate to some form of computation.\n\nErrors can be *handled* and *unhandled*. *Unhandled* errors\ngenerate an error `report` (generally to STDERR, but this\ndepends on the frontend). They are fatal for the program\nthey occur in.\n\n*Death handlers*, or *death traps*, when set up in code blocks\nand/or their relatives, allow errors to be *handled*. For this\nreason, errors are Novika `Form`s, and can be manipulated,\nreported, and inspected from Novika.","summary":"Holds and accepts information about an error.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"error\""}}],"constructors":[{"html_id":"new(details:String,form:Novika::Form|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"args_string":"(details : String, form : Novika::Form | Nil = nil)","args_html":"(details : String, form : Novika::Form | Nil = nil)","location":{"filename":"src/novika/error.cr","line_number":32,"url":null},"def":{"name":"new","args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(details, form)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"conts:Block|Nil-instance-method","name":"conts","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts","return_type":"Block | ::Nil","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Block|Nil)-instance-method","name":"conts=","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"args_string":"(conts : Block | Nil)","args_html":"(conts : Block | Nil)","location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":35,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"error: '\") << details) << \"'\""}},{"html_id":"details:String-instance-method","name":"details","doc":"Returns a string describing the reasons of this error.","summary":"Returns a string describing the reasons of this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":23,"url":null},"def":{"name":"details","return_type":"String","visibility":"Public","body":"@details"}},{"html_id":"form:Form-instance-method","name":"form","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form","return_type":"Form","visibility":"Public","body":"if (value = @form).nil?\n ::raise(NilAssertionError.new(\"Novika::Error#form cannot be nil\"))\nelse\n value\nend"}},{"html_id":"form?:Form|Nil-instance-method","name":"form?","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form?","return_type":"Form | ::Nil","visibility":"Public","body":"@form"}},{"html_id":"report(io:IO)-instance-method","name":"report","doc":"Reports about this error to *io*.\n\nNote: Colorize is used for colors and emphasis. If you\ndo not want Colorize in *io*, you can temporarily disable\nit by setting `Colorize.enabled = false`.","summary":"Reports about this error to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":48,"url":null},"def":{"name":"report","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"if conts = self.conts\n b = Math.max(0, conts.count - MAX_TRACE)\n e = conts.count\n if b.zero?\n else\n ((io << \" │ … \") << (b - 1)) << \" continuation(s) omitted …\"\n io.puts\n end\n (b...e).each do |index|\n io << \" ╿ due to \"\n cont = (conts.at(index)).as?(Block)\n code = cont.try do |__arg0|\n (__arg0.at?(Engine::C_BLOCK_AT)).as?(Block)\n end\n if cont && code\n else\n io.puts(\"[malformed continuation]\")\n next\n end\n if top = code.top?\n ((io << \"'\") << (top || \"[nothing]\").colorize.bold) << \"', which was opened here:\"\n else\n io << \"the following block:\"\n end\n io.puts\n io << \" │ \"\n code.spot(io)\n io.puts\n end\nend\nif form?\n io.puts(\" ╿ this form is invalid, and is the cause of death:\")\n (io << \" │ \") << form\n io.puts\nend\n(io << \"Sorry: \".colorize.red.bold) << details\ncase details.byte_at?(details.bytesize - 1)\nwhen '!', '?', '.'\nelse\n io << '.'\nend\nio.puts\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/error.cr","line_number":96,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << details) << \"]\""}}]},{"html_id":"novika/Novika/False","path":"Novika/False.html","kind":"struct","full_name":"Novika::False","name":"False","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":63,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a falsey `Boolean`. `False` is the only falsey\nform in Novika.","summary":"Represents a falsey Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":64,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean false\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/boolean.cr","line_number":72,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"b"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/boolean.cr","line_number":76,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"false\""}}]},{"html_id":"novika/Novika/FFI","path":"Novika/FFI.html","kind":"module","full_name":"Novika::FFI","name":"FFI","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/FFI/Cchar","path":"Novika/FFI/Cchar.html","kind":"struct","full_name":"Novika::FFI::Cchar","name":"Cchar","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":368,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C char (a u8).\nIn Novika, char is represented by a single-character quote.","summary":"Type-side and value-side representation of C char (a u8).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":396,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":384,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"form.first_byte?.try do |byte|\n new(byte)\nend"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":388,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form.to_u8)"}},{"html_id":"matches?(value:Cchar)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"args_string":"(value : Cchar)","args_html":"(value : Cchar)","location":{"filename":"src/novika/ffi.cr","line_number":417,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":421,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.uint8"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":400,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"char\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":413,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"new((box.as(::Pointer(UInt8))).value)"}}],"constructors":[{"html_id":"new(char:UInt8)-class-method","name":"new","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"args_string":"(char : UInt8)","args_html":"(char : UInt8)","location":{"filename":"src/novika/ffi.cr","line_number":372,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"visibility":"Public","body":"_ = allocate\n_.initialize(char)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":404,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @char)).as(::Pointer(Void))"}},{"html_id":"to_crystal-instance-method","name":"to_crystal","doc":"Returns the corresponding Crystal character.","summary":"Returns the corresponding Crystal character.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":376,"url":null},"def":{"name":"to_crystal","visibility":"Public","body":"@char.chr"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":380,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":392,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"'\") << to_crystal) << \"'\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":408,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @char\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Cstr","path":"Novika/FFI/Cstr.html","kind":"struct","full_name":"Novika::FFI::Cstr","name":"Cstr","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":428,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C string (a u8 pointer).\nIn Novika, C string is represented by a quote.","summary":"Type-side and value-side representation of C string (a u8 pointer).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":456,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":460,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"new(form.string)"}},{"html_id":"matches?(value:Cstr)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"args_string":"(value : Cstr)","args_html":"(value : Cstr)","location":{"filename":"src/novika/ffi.cr","line_number":486,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":490,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":464,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"cstr\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":481,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"handle = Pointer(UInt8).new((box.as(::Pointer(UInt64))).value)\nhandle.null? ? UntypedPointer.none : new(String.new(handle))\n"}}],"constructors":[{"html_id":"new(string:String)-class-method","name":"new","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/novika/ffi.cr","line_number":432,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @string == (other.@string)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":468,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"write_to!((Pointer(UInt64).malloc(1)).as(::Pointer(Void)))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the corresponding Crystal string.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":436,"url":null},"def":{"name":"to_crystal","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":440,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":452,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"\\\"\") << to_crystal) << \"\\\"\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":472,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"bytes = Pointer(UInt8).malloc(@string.bytesize + 1)\nbytes.copy_from(@string.to_unsafe, @string.bytesize)\nbytes[@string.bytesize + 1] = 0\n(base.as(::Pointer(UInt64))).value = bytes.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/DefaultTypeParser","path":"Novika/FFI/DefaultTypeParser.html","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows all parse-able types, from ints to `nothing` to\nstructs and unions.","summary":"Allows all parse-able types, from ints to nothing
to structs and unions.
Type-side and value-side representation of Float32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/F64","path":"Novika/FFI/F64.html","kind":"struct","full_name":"Novika::FFI::F64","name":"F64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":239,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Float64`.","summary":"Type-side and value-side representation of Float64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/FixedArityFunction","path":"Novika/FFI/FixedArityFunction.html","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},"ancestors":[{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1035,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Calls a fixed-arity C function.","summary":"Calls a fixed-arity C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),argtypes:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1038,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, argtypes, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1056,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"args = Array(ForeignValue).new(@argtypes.size)\n@argtypes.reverse_each do |argtype|\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n args.unshift(arg)\nend\n(call(args)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1036,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]},{"html_id":"novika/Novika/FFI/ForeignType","path":"Novika/FFI/ForeignType.html","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":28,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for Novika FFI types.","summary":"Base type for Novika FFI types.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":30,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"from(form:Form):ForeignValue-instance-method","name":"from","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nDies if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue","args_html":"(form : Form) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":48,"url":null},"def":{"name":"from","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue","visibility":"Public","body":"(from?(form)) || (raise(Error.new(\"could not convert #{form} to foreign type #{self}\")))"}},{"html_id":"from?(form:Form):ForeignValue|Nil-instance-method","name":"from?","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nReturns nil if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue | Nil","args_html":"(form : Form) : ForeignValue | Nil","location":{"filename":"src/novika/ffi.cr","line_number":56,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue | ::Nil","visibility":"Public","body":""}},{"html_id":"matches?(value:ForeignValue):Bool-instance-method","name":"matches?","doc":"Returns whether this type corresponds to the given *value*.","summary":"Returns whether this type corresponds to the given value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(value : ForeignValue) : Bool","args_html":"(value : ForeignValue) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":60,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":40,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"(to_ffi_type.@type).value.size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":37,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Base type for Novika FFI values (both heap & stack allocated).
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":7,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"must_be_of(type:ForeignType)-instance-method","name":"must_be_of","doc":"Raises if this value is not of the given `ForeignType` *type*.","summary":"Raises if this value is not of the given ForeignType
type.
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":17,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":true,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":11,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/Function","path":"Novika/FFI/Function.html","kind":"struct","full_name":"Novika::FFI::Function","name":"Function","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1024,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/FixedArityFunction","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction"},{"html_id":"novika/Novika/FFI/VariadicFunction","kind":"struct","full_name":"Novika::FFI::VariadicFunction","name":"VariadicFunction"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for C function call interfaces.","summary":"Base type for C function call interfaces.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":true,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1031,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":1026,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/I16","path":"Novika/FFI/I16.html","kind":"struct","full_name":"Novika::FFI::I16","name":"I16","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":234,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int16`.","summary":"Type-side and value-side representation of Int16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I32","path":"Novika/FFI/I32.html","kind":"struct","full_name":"Novika::FFI::I32","name":"I32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int32`.","summary":"Type-side and value-side representation of Int32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I64","path":"Novika/FFI/I64.html","kind":"struct","full_name":"Novika::FFI::I64","name":"I64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int64`.","summary":"Type-side and value-side representation of Int64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I8","path":"Novika/FFI/I8.html","kind":"struct","full_name":"Novika::FFI::I8","name":"I8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":233,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int8`.","summary":"Type-side and value-side representation of Int8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/InlineStructType","path":"Novika/FFI/InlineStructType.html","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":785,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of an inline struct, e.g. one returned\nfrom a function or passed as an argument, aka stack-allocated\nstructs (like Crystal `struct`).","summary":"Type-side representation of an inline struct, e.g.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":790,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:InlineStructView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"args_string":"(view : InlineStructView) : Bool","args_html":"(view : InlineStructView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":806,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":786,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"padded_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":802,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.struct(@layout.map_desc_with_index do |__arg2|\n __arg2.type.to_ffi_type\nend)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":810,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":794,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"InlineStructView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/InlineStructView","path":"Novika/FFI/InlineStructView.html","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of an inline struct, aka\nstack-allocated struct. Allows to read and write fields (see\n`StructView`). Similar to the `.` operator in C.","summary":"Value-side representation of an inline struct, aka stack-allocated struct.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":974,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":984,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~⟨\"\nsuper(io)\nio << \"⟩\"\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":978,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.padded_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Nothing","path":"Novika/FFI/Nothing.html","kind":"struct","full_name":"Novika::FFI::Nothing","name":"Nothing","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":330,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of void. All value-side\nmethods raise.","summary":"Type-side and value-side representation of void.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":345,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be allocated\")"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":361,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.void"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":353,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"void\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":357,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"Nothing.new"}}],"constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":334,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be boxed\")"}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":342,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":349,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"(void)\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":338,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be written\")"}}]},{"html_id":"novika/Novika/FFI/StructFieldDesc","path":"Novika/FFI/StructFieldDesc.html","kind":"struct","full_name":"Novika::FFI::StructFieldDesc","name":"StructFieldDesc","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":500,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Holds the description of a struct field: its id (purely for\nconvenience), type (one of `ForeignType`s), and, most\nimportantly, *offset*.","summary":"Holds the description of a struct field: its id (purely for convenience), type (one of ForeignType
s), and, most importantly, offset.
offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : ForeignValue","args_html":"(base : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":507,"url":null},"def":{"name":"fetch!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"type.unbox(Pointer(Void).new(base.address + offset))"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"offset:UInt64-instance-method","name":"offset","abstract":false,"def":{"name":"offset","return_type":"UInt64","visibility":"Public","body":"@offset"}},{"html_id":"put!(base:Pointer(Void),value:ForeignValue)-instance-method","name":"put!","doc":"Writes *value* at *base* plus this field's offset, assuming\n*base* points to the start of the struct this field is a\nmember of.\n\nThe latter is not enforced; therefore, this method is considered\n**unsafe**.","summary":"Writes value at base plus this field's offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(base : Pointer(Void), value : ForeignValue)","args_html":"(base : Pointer(Void), value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":517,"url":null},"def":{"name":"put!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"value.must_be_of(type)\nvalue.write_to!(Pointer(Void).new(base.address + offset))\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":522,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"(\") << type) << \" \") << id) << \")\""}},{"html_id":"type:ForeignType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"ForeignType","visibility":"Public","body":"@type"}}]},{"html_id":"novika/Novika/FFI/StructLayout","path":"Novika/FFI/StructLayout.html","kind":"class","full_name":"Novika::FFI::StructLayout","name":"StructLayout","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":551,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows to describe structs which can then be constructed,\nretrieved, read, and written to.\n\n```\npoint_s = StructLayout.new(\"Point\")\npoint_s.add(\"x\", F64)\npoint_s.add(\"y\", F64)\n\nrect_s = StructLayout.new(\"Rect\")\nrect_s.add(\"origin\", point_s.reference)\nrect_s.add(\"corner\", point_s.inline)\n\norigin = point_s.reference.make!\norigin[\"x\"] = F64.new(123)\norigin[\"y\"] = F64.new(456)\n\ncorner = point_s.inline.make!\ncorner[\"x\"] = F64.new(234)\ncorner[\"y\"] = F64.new(567)\n\nrect = rect_s.reference.make!\nrect[\"origin\"] = origin\nrect[\"corner\"] = corner\n```","summary":"Allows to describe structs which can then be constructed, retrieved, read, and written to.
","constructors":[{"html_id":"new-class-method","name":"new","doc":"Creates an empty struct layout.","summary":"Creates an empty struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":563,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif object_id == other.object_id\nelse\n return false\nend\ntrue\n"}},{"html_id":"add(id,type:ForeignType)-instance-method","name":"add","doc":"Appends a field called *id*, of the given *type*, to this\nstruct's list of fields.\n\nSimilar to struct ids, *id* is irrelevant to FFI and is simply\n*one of* the ways to access struct fields.","summary":"Appends a field called id, of the given type, to this struct's list of fields.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(id, type : ForeignType)","args_html":"(id, type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":605,"url":null},"def":{"name":"add","args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"visibility":"Public","body":"if type.is_a?(InlineStructType)\n offset = add(type.padded_size, type.alignment)\nelse\n offset = add(type.to_ffi_type)\nend\n@fields << (StructFieldDesc.new(id, type, offset))\n"}},{"html_id":"alignment:UInt64-instance-method","name":"alignment","doc":"Returns the alignment of this struct layout.","summary":"Returns the alignment of this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":557,"url":null},"def":{"name":"alignment","return_type":"UInt64","visibility":"Public","body":"@alignment"}},{"html_id":"desc(index:Int32)-instance-method","name":"desc","doc":"Retrieves field description given the field's *index*.","summary":"Retrieves field description given the field's index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/ffi.cr","line_number":642,"url":null},"def":{"name":"desc","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"@fields[index]"}},{"html_id":"desc(id:String)-instance-method","name":"desc","doc":"Retrieves field description given the field's *id*entifier.\nRaises if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":654,"url":null},"def":{"name":"desc","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(desc?(id)) || (raise(\"BUG: no such field: #{id}\"))"}},{"html_id":"desc?(id:String)-instance-method","name":"desc?","doc":"Retrieves field description given the field's *id*entifier.\nReturns nil if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":648,"url":null},"def":{"name":"desc?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)).try do |index|\n @fields.unsafe_fetch(index)\nend"}},{"html_id":"each_desc_with_index(&)-instance-method","name":"each_desc_with_index","doc":"Yields field descriptions and their indices to the block.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":659,"url":null},"def":{"name":"each_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.each_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"field_count-instance-method","name":"field_count","doc":"Returns the amount of fields in this struct layout.","summary":"Returns the amount of fields in this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":619,"url":null},"def":{"name":"field_count","visibility":"Public","body":"@fields.size"}},{"html_id":"has_field?(id:String)-instance-method","name":"has_field?","doc":"Returns whether this layout contains a field with the\ngiven *id*entifier.","summary":"Returns whether this layout contains a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":625,"url":null},"def":{"name":"has_field?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.any? do |__arg0|\n __arg0.id == id\nend"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = object_id.hash(hasher)\nhasher\n"}},{"html_id":"index(id:String)-instance-method","name":"index","doc":"Returns the index of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the index of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":637,"url":null},"def":{"name":"index","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)) || (raise(\"BUG: no such field in struct layout: #{id}\"))"}},{"html_id":"index?(id:String)-instance-method","name":"index?","doc":"Returns the index of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the index of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":631,"url":null},"def":{"name":"index?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.index() do |__arg1|\n __arg1.id == id\nend"}},{"html_id":"inline-instance-method","name":"inline","doc":"Returns an inline struct type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.inline`\ninstead of saving it in a variable and using that variable.","summary":"Returns an inline struct type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":683,"url":null},"def":{"name":"inline","visibility":"Public","body":"InlineStructType.new(self)"}},{"html_id":"map_desc_with_index(&)-instance-method","name":"map_desc_with_index","doc":"Yields field descriptions and their indices to the block.\nReturns an array of block results.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":665,"url":null},"def":{"name":"map_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.map_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"max_field_size:UInt64-instance-method","name":"max_field_size","doc":"Returns the maximum field size in this struct.","summary":"Returns the maximum field size in this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":560,"url":null},"def":{"name":"max_field_size","return_type":"UInt64","visibility":"Public","body":"@max_field_size"}},{"html_id":"padded_size:UInt64-instance-method","name":"padded_size","doc":"Returns the padded size of this struct. Simply put, this is how\nmuch bytes you'd need to allocate for this struct layout.","summary":"Returns the padded size of this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":554,"url":null},"def":{"name":"padded_size","return_type":"UInt64","visibility":"Public","body":"@padded_size"}},{"html_id":"reference-instance-method","name":"reference","doc":"Returns a struct reference type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.reference`\ninstead of saving it in a variable and using that variable.","summary":"Returns a struct reference type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":674,"url":null},"def":{"name":"reference","visibility":"Public","body":"StructReferenceType.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":696,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive(:to_s) do\n io << \"⟪\"\n @fields.join(io, \", \") do |field, io|\n ((io << field.id) << \"=\") << field.type\n end\n io << \"⟫\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"union-instance-method","name":"union","doc":"Returns a union type layed out according to this struct layout.\nYou can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.union`\ninstead of saving it in a variable and using that variable.","summary":"Returns a union type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":692,"url":null},"def":{"name":"union","visibility":"Public","body":"UnionType.new(self)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceType","path":"Novika/FFI/StructReferenceType.html","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":750,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct (like Crystal `class`).","summary":"Type-side representation of a struct reference, aka struct pointer, aka heap-allocated struct (like Crystal class
).
Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":751,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"matches?(pointer:UntypedPointer)-instance-method","name":"matches?","abstract":false,"args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"args_string":"(pointer : UntypedPointer)","args_html":"(pointer : UntypedPointer)","location":{"filename":"src/novika/ffi.cr","line_number":772,"url":null},"def":{"name":"matches?","args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"visibility":"Public","body":"pointer.none?"}},{"html_id":"matches?(view:StructReferenceView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"args_string":"(view : StructReferenceView) : Bool","args_html":"(view : StructReferenceView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":768,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":764,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":776,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"&\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":755,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"StructReferenceView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceView","path":"Novika/FFI/StructReferenceView.html","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":922,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct. Allows to read and write\nfields (see `StructView`). Similar to the `->` operator in C.","summary":"Value-side representation of a struct reference, aka struct pointer, aka heap-allocated struct.
","instance_methods":[{"html_id":"==(other:StructReferenceView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"args_string":"(other : StructReferenceView)","args_html":"(other : StructReferenceView)","location":{"filename":"src/novika/ffi.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"visibility":"Public","body":"if @handle == (other.@handle)\n return true\nend\nif size == other.size\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive_by_handle(:==) do\n result = super(other)\nend\nexecuted && result\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":923,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @handle.address)).as(::Pointer(Void))"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":958,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive_by_handle(:to_s) do\n io << \"&⟨\"\n super(io)\n io << \"⟩\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":927,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @handle.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/StructType","path":"Novika/FFI/StructType.html","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":714,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructType","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType"},{"html_id":"novika/Novika/FFI/StructReferenceType","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType"},{"html_id":"novika/Novika/FFI/UnionType","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *type* side of structs.","summary":"Base type of the type side of structs.
","constructors":[{"html_id":"new(layout:StructLayout)-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"args_string":"(layout : StructLayout)","args_html":"(layout : StructLayout)","location":{"filename":"src/novika/ffi.cr","line_number":717,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alignment(*args,**options)-instance-method","name":"alignment","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
Constructs a struct view for this struct type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":739,"url":null},"def":{"name":"make!","return_type":"StructView","visibility":"Public","body":"view_for(Pointer(Void).malloc(@layout.padded_size))"}},{"html_id":"padded_size(*args,**options)-instance-method","name":"padded_size","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See StructLayout
.
See StructLayout
.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":true,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":725,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/StructView","path":"Novika/FFI/StructView.html","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":853,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructView","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView"},{"html_id":"novika/Novika/FFI/StructReferenceView","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView"},{"html_id":"novika/Novika/FFI/UnionView","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *value* side of structs.\n\nImplements `Indexable` and `Indexable::Mutable` over the fields in\nthe struct, allowing you to iterate, read, and change them (with\nsome casting from and to `ForeignValue` though.)","summary":"Base type of the value side of structs.
","constructors":[{"html_id":"new(layout:Novika::FFI::StructLayout,handle:Pointer(Void))-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","args_html":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","location":{"filename":"src/novika/ffi.cr","line_number":861,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, handle)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:StructView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructView"}],"args_string":"(other : StructView)","args_html":"(other : StructView)","location":{"filename":"src/novika/ffi.cr","line_number":912,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructView"}],"visibility":"Public","body":"equals?(other) do |a, b|\n a == b\nend"}},{"html_id":"[](id:String)-instance-method","name":"[]","doc":"Returns the value of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the value of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":889,"url":null},"def":{"name":"[]","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"unsafe_fetch(@layout.index(id))"}},{"html_id":"[]=(id:String,value:ForeignValue)-instance-method","name":"[]=","doc":"Assigns *value* to a field with the given *id*entifier.","summary":"Assigns value to a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(id : String, value : ForeignValue)","args_html":"(id : String, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":883,"url":null},"def":{"name":"[]=","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"unsafe_put(@layout.index(id), value)"}},{"html_id":"[]?(id:String)-instance-method","name":"[]?","doc":"Returns the value of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the value of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":895,"url":null},"def":{"name":"[]?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"if index = @layout.index?(id)\n unsafe_fetch(index)\nend"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"has_field?(*args,**options)-instance-method","name":"has_field?","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See Object#hash(hasher)
Returns this view's struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":859,"url":null},"def":{"name":"layout","return_type":"StructLayout","visibility":"Public","body":"@layout"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":870,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":901,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"StructViewForm.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":905,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@layout.each_desc_with_index do |desc, index|\n ((io << desc.id) << \"=\") << (unsafe_fetch(index))\n if index == (@layout.field_count - 1)\n else\n io << \", \"\n end\nend"}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":878,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"(@layout.desc(index)).fetch!(@handle)"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":874,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"(@layout.desc(index)).put!(@handle, value)"}}]},{"html_id":"novika/Novika/FFI/TypeParser","path":"Novika/FFI/TypeParser.html","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":67,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/DefaultTypeParser","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser"},{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"An object used to translate `Word`s (representing a foreign type)\ninto actual `ForeignType`s.","summary":"An object used to translate Word
s (representing a foreign type) into actual ForeignType
s.
Initializes a parser object from this, a block that will be asked for word definitions in case they are needed, and typename, which is the word-to-be-parsed itself.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"args_string":"(this : Block, typename : Word)","args_html":"(this : Block, typename : Word)","location":{"filename":"src/novika/ffi.cr","line_number":78,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":92,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.inline"}},{"html_id":"on_primitive(type:ForeignType):ForeignType-instance-method","name":"on_primitive","doc":"Primitive *type* middleware.","summary":"Primitive type middleware.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(type : ForeignType) : ForeignType","args_html":"(type : ForeignType) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":82,"url":null},"def":{"name":"on_primitive","args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"return_type":"ForeignType","visibility":"Public","body":"type"}},{"html_id":"on_struct_reference(form:StructLayoutForm):ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":97,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.reference"}},{"html_id":"on_union(form:StructLayoutForm):ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":87,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.union"}},{"html_id":"parse:ForeignType-instance-method","name":"parse","doc":"Performs the parsing. Returns the resulting type.","summary":"Performs the parsing.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":102,"url":null},"def":{"name":"parse","return_type":"ForeignType","visibility":"Public","body":"case @typename.id\nwhen \"u8\"\n return on_primitive(U8)\nwhen \"u16\"\n return on_primitive(U16)\nwhen \"u32\"\n return on_primitive(U32)\nwhen \"u64\"\n return on_primitive(U64)\nwhen \"i8\"\n return on_primitive(I8)\nwhen \"i16\"\n return on_primitive(I16)\nwhen \"i32\"\n return on_primitive(I32)\nwhen \"i64\"\n return on_primitive(I64)\nwhen \"f32\"\n return on_primitive(F32)\nwhen \"f64\"\n return on_primitive(F64)\nwhen \"cstr\"\n return on_primitive(Cstr)\nwhen \"char\"\n return on_primitive(Cchar)\nwhen \"pointer\"\n return on_primitive(UntypedPointer)\nwhen \"nothing\"\n return on_primitive(Nothing)\nwhen .prefixed_by?('?')\n handler = ->on_union(StructLayoutForm)\nwhen .prefixed_by?('~')\n handler = ->on_inline_struct(StructLayoutForm)\nwhen .prefixed_by?('&')\n handler = ->on_struct_reference(StructLayoutForm)\nelse\n @typename.die(\"could not recognize foreign type. Did you mean ⸢~#{@typename}⸥ (inline struct), ⸢{@typename}⸥ (reference to struct), or ⸢?#{@typename}⸥ (union)?\")\nend\nraw = Word.new(@typename.id.lchop)\nform = @this.form_for(raw)\nif form.is_a?(StructLayoutForm)\nelse\n @typename.die(\"expected struct layout to be value form, not: #{form.class.typedesc}\")\nend\nhandler.call(form)\n"}}],"types":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","path":"Novika/FFI/TypeParser/ForbidsNothing.html","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"doc":"If included, the parser would die upon encountering `nothing`.","summary":"If included, the parser would die upon encountering nothing
.
Type-side and value-side representation of UInt16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U32","path":"Novika/FFI/U32.html","kind":"struct","full_name":"Novika::FFI::U32","name":"U32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":230,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt32`.","summary":"Type-side and value-side representation of UInt32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U64","path":"Novika/FFI/U64.html","kind":"struct","full_name":"Novika::FFI::U64","name":"U64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":231,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt64`.","summary":"Type-side and value-side representation of UInt64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U8","path":"Novika/FFI/U8.html","kind":"struct","full_name":"Novika::FFI::U8","name":"U8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":228,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt8`.","summary":"Type-side and value-side representation of UInt8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UnionType","path":"Novika/FFI/UnionType.html","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a union.","summary":"Type-side representation of a union.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":822,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:UnionView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"args_string":"(view : UnionView) : Bool","args_html":"(view : UnionView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":838,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":818,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"@layout.max_field_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":834,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":842,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"⋃\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":826,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"UnionView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/UnionView","path":"Novika/FFI/UnionView.html","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":992,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a union.","summary":"Value-side representation of a union.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1008,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":993,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":1018,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"(⋃ \") << @layout) << \")\""}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":1003,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"desc = @layout.desc(index)\ndesc.type.unbox(@handle)\n"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":997,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"desc = @layout.desc(index)\nvalue.must_be_of(desc.type)\nvalue.write_to!(@handle)\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":1012,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.max_field_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UntypedPointer","path":"Novika/FFI/UntypedPointer.html","kind":"struct","full_name":"Novika::FFI::UntypedPointer","name":"UntypedPointer","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":242,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of pointers.","summary":"Type-side and value-side representation of pointers.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":264,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Hole)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Hole"}],"args_string":"(form : Hole)","args_html":"(form : Hole)","location":{"filename":"src/novika/ffi.cr","line_number":268,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Hole"}],"visibility":"Public","body":"new(form.address)"}},{"html_id":"from?(form:StructViewForm)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"args_string":"(form : StructViewForm)","args_html":"(form : StructViewForm)","location":{"filename":"src/novika/ffi.cr","line_number":272,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"visibility":"Public","body":"if view = form.view.as?(StructReferenceView)\nelse\n raise(Error.new(\"cannot implicitly take pointer of struct view that is not a reference struct view\"))\nend\nnew(view.address)\n"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":282,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form)"}},{"html_id":"matches?(value:UntypedPointer):Bool-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"args_string":"(value : UntypedPointer) : Bool","args_html":"(value : UntypedPointer) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":317,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"none-class-method","name":"none","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":252,"url":null},"def":{"name":"none","visibility":"Public","body":"new(0)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":321,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":305,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"pointer\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":309,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"if box.null?\n raise(Error.new(\"attempt to unbox none (C nullptr)\"))\nend\nUntypedPointer.new((box.as(::Pointer(UInt64))).value)\n"}}],"constructors":[{"html_id":"new(decimal)-class-method","name":"new","abstract":false,"args":[{"name":"decimal","external_name":"decimal","restriction":""}],"args_string":"(decimal)","args_html":"(decimal)","location":{"filename":"src/novika/ffi.cr","line_number":248,"url":null},"def":{"name":"new","args":[{"name":"decimal","external_name":"decimal","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(decimal)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @address == (other.@address)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":286,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @address)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":260,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(@address)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":295,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if none?\n io << \"(none)\"\nelse\n io << \"(0x\"\n @address.to_s(io, base: 16)\n io << \")\"\nend"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":290,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/ValueTypeParser","path":"Novika/FFI/ValueTypeParser.html","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"},{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":159,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Same as `DefaultTypeParser`, but forbids nothing.\n\n```\n# this : Block\n\nparser = ValueTypeParser.new(this, Word.new(\"i32\"))\nparser.parse # => I32\n\n# ...\n\nparser = ValueTypeParser.new(this, Word.new(\"nothing\"))\nparser.parse # Dies: nothing is not a value type.\n```","summary":"Same as DefaultTypeParser
, but forbids nothing.
Calls a variadic C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),fixed_arg_types:Array(ForeignType),var_arg_allowed:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1071,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, fixed_arg_types, var_arg_allowed, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1080,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"var_args_block = block.drop.a(Block)\nnargs_total = @fixed_arg_types.size + var_args_block.count\nffi_args = Array(ForeignValue).new(nargs_total)\nffi_types = Array(Crystal::FFI::Type).new(nargs_total)\n@fixed_arg_types.reverse_each do |argtype|\n ffi_types.unshift(argtype.to_ffi_type)\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n ffi_args.unshift(arg)\nend\nvar_args_block.each do |form|\n candidates = @var_arg_allowed.map do |type|\n {type, type.from?(form)}\n end.select do |_, value|\n value\n end\n if candidates.size == 1\n else\n form.die(\"unable to convert to foreign value: too many or no type candidates for form. Make sure you've specified the corresponding foreign type in the variadic function's list of allowed types, and no conflicts between types exist (e.g. both i32 and i64; this is currently unsupported)\")\n end\n candidate = candidates[0]\n candidate_type, candidate_value = candidate\n candidate_value = candidate_value.not_nil!\n ffi_types << candidate_type.to_ffi_type\n ffi_args << candidate_value\nend\nffi_args.each do |arg|\n case arg\n when U8, U16, I8, I16\n block.die(\"bad argtype in variadic call: promote to i32 first: #{arg}\")\n when F32\n block.die(\"bad argtype in variadic call: promote to f64 first: #{arg}\")\n end\nend\ncif = Crystal::FFI::CallInterface.variadic(return_type: @return_type.to_ffi_type, arg_types: ffi_types, fixed_args: @fixed_arg_types.size)\ncargs = Pointer(::Pointer(Void)).malloc(ffi_args.size) do |index|\n ffi_args[index].box\nend\ncreturn = Pointer(Void).malloc(@return_type.sizeof)\ncif.call(@handle, cargs, creturn)\n(@return_type.unbox(creturn)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1069,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]}]},{"html_id":"novika/Novika/ForeignFunction","path":"Novika/ForeignFunction.html","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::Function`.","summary":"A thin wrapper around FFI::Function
.
Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":12,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"stack = engine.stack\nvalue = @function.call(stack)\nvalue.try(&.onto(stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":29,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign function: \") << @function.id) << \"]\""}}]},{"html_id":"novika/Novika/Form","path":"Novika/Form.html","kind":"module","full_name":"Novika::Form","name":"Form","abstract":false,"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":98,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Builtin","kind":"struct","full_name":"Novika::Builtin","name":"Builtin"},{"html_id":"novika/Novika/Byteslice","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice"},{"html_id":"novika/Novika/Color","kind":"struct","full_name":"Novika::Color","name":"Color"},{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"},{"html_id":"novika/Novika/Error","kind":"class","full_name":"Novika::Error","name":"Error"},{"html_id":"novika/Novika/ForeignFunction","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction"},{"html_id":"novika/Novika/Hole","kind":"struct","full_name":"Novika::Hole","name":"Hole"},{"html_id":"novika/Novika/Library","kind":"class","full_name":"Novika::Library","name":"Library"},{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/QuotedWord","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord"},{"html_id":"novika/Novika/StructLayoutForm","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"},{"html_id":"novika/Novika/Word","kind":"struct","full_name":"Novika::Word","name":"Word"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Form is an umbrella for words and blocks. Since some words\n(like numbers, quotes) are just too different from words as\nwe know them, they have their own types directly subordinate\nto Form.\n\nMake sure to override `self.typedesc` to avoid weird unrelated\nCrystal errors. Crystal breaks at class-level inheritance.","summary":"Form is an umbrella for words and blocks.
","instance_methods":[{"html_id":"a(type:T.class):TforallT-instance-method","name":"a","doc":"Asserts that this form is of the given *type*. Dies if\nit's not.","summary":"Asserts that this form is of the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : T forall T","args_html":"(type : T.class) : T forall T","location":{"filename":"src/novika/forms/form.cr","line_number":146,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"self.is_a?(T) ? self : afail(T)"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/form.cr","line_number":114,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"a form\""}},{"html_id":"desc:String-instance-method","name":"desc","doc":"Returns a string description of this form.","summary":"Returns a string description of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":119,"url":null},"def":{"name":"desc","return_type":"String","visibility":"Public","body":"String.build do |io|\n desc(io)\nend"}},{"html_id":"die(details:String)-instance-method","name":"die","doc":"Raises an `Error` providing *details*.","summary":"Raises an Error
providing details.
Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/form.cr","line_number":162,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"effect-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":167,"url":null},"def":{"name":"effect","visibility":"Public","body":"String.build do |io|\n effect(io)\nend"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":130,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"on_parent_open(engine)"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":135,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"onto(engine.stack)"}},{"html_id":"onto(block:Block):self-instance-method","name":"onto","doc":"Adds this form to *block*.","summary":"Adds this form to block.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : self","args_html":"(block : Block) : self","location":{"filename":"src/novika/forms/form.cr","line_number":140,"url":null},"def":{"name":"onto","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"tap do\n block.add(self)\nend"}},{"html_id":"sel(a,b)-instance-method","name":"sel","doc":"Selects either *a* or *b*. Novika defines `False` to be the\nonly form selecting *b*. All other forms select *a*.","summary":"Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/form.cr","line_number":125,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"a"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":151,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"Quote.new(to_s)"}}]},{"html_id":"novika/Novika/Frontend","path":"Novika/Frontend.html","kind":"module","full_name":"Novika::Frontend","name":"Frontend","abstract":false,"locations":[{"filename":"src/common.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"err(message,io=STDERR)-instance-method","name":"err","doc":"Appends a \"sorry\" *message* to *io*","summary":"Appends a "sorry" message to io
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"args_string":"(message, io = STDERR)","args_html":"(message, io = STDERR)","location":{"filename":"src/common.cr","line_number":10,"url":null},"def":{"name":"err","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Sorry\".colorize.red.bold) << \": \") << message"}},{"html_id":"errln(message,io=STDERR)-instance-method","name":"errln","doc":"Calls `err`, and appends a newline, both using\nwith *io*.","summary":"Calls #err
, and appends a newline, both using with io.
Appends a "note" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":20,"url":null},"def":{"name":"note","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Note\".colorize.blue.bold) << \": \") << message"}},{"html_id":"noteln(message,io=STDOUT)-instance-method","name":"noteln","doc":"Calls `note`, and appends a newline, both using\nwith *io*.","summary":"Calls #note
, and appends a newline, both using with io.
Appends an "ok" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":15,"url":null},"def":{"name":"ok","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Ok\".colorize.green.bold) << \": \") << message"}},{"html_id":"okln(message,io=STDOUT)-instance-method","name":"okln","doc":"Calls `ok`, and appends a newline, both using\nwith *io*.","summary":"Calls #ok
, and appends a newline, both using with io.
Appends a "wait" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":5,"url":null},"def":{"name":"wait","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Wait\".colorize.bold) << \": \") << message"}},{"html_id":"wait(msg,*,okokmsg,&)-instance-method","name":"wait","doc":"Issues a `wait` message *msg*, yields, then follows with\nan OK message *okmsg*.","summary":"Issues a #wait
message msg, yields, then follows with an OK message okmsg.
Calls #wait
, and appends a newline, both using with io.
Novika command-line frontend entry point.
","abstract":false,"args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"args_string":"(args = ARGV, cwd = Path[ENV[\"NOVIKA_CWD\"]? || Dir.current])","args_html":"(args = ARGV, cwd = Path[ENV["NOVIKA_CWD"]? || Dir.current])","location":{"filename":"src/cli.cr","line_number":408,"url":null},"def":{"name":"start","args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"visibility":"Public","body":"begin\n args = args.dup\n Colorize.enabled = Novika.colorful?\n if args.any?(/^\\-{1,2}:?(?:h(?:elp)?|\\?)$/)\n help(STDOUT)\n exit(0)\n end\n profiler = nil\n dry_list = false\n dry_list_sm = false\n dry_tree = false\n help_mode = false\n abort_on_permission_request = false\n args.reject! do |arg|\n case arg\n when /^\\-:profile(?::([1-9]\\d*))?$/\n profiler = Profiler.new($~[1]?.try(&.to_u64) || 16_u64)\n when /^\\-:dry-list$/\n dry_list = true\n when /^\\-:dry-tree$/\n dry_tree = true\n when /^\\+:dry-list-sm$/\n dry_list_sm = true\n when /^\\-:abort-on-permission-request$/\n abort_on_permission_request = true\n when /^help$/\n help_mode = true\n else\n next false\n end\n true\n end\n profiler.try do |prof|\n Engine.trackers << prof\n end\n resolver = RunnableResolver.new(cwd, args)\n resolver.on_permissions_gets do |string|\n if abort_on_permission_request\n abort\n end\n print(string, \" \")\n gets\n end\n resolver.on_permissions_print do |string|\n print(string)\n end\n resolver.after_container_rewritten do |container|\n if dry_tree\n else\n next\n end\n puts(container)\n end\n resolver.after_response do |hook|\n if dry_tree\n exit(0)\n end\n hook.response.each_ignored_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.note(\"this runnable is not allowed here, and will be ignored: #{runnable}\", io)\n end\n end\n if help_mode\n else\n next\n end\n first = true\n hook.each_queried_for_preamble_with_group do |preamble, group|\n if first\n first = false\n else\n print(\"\\n\\n\")\n end\n puts(preamble)\n end\n if first\n help(STDOUT)\n end\n exit(0)\n end\n resolver.after_program do |hook|\n if dry_list\n else\n next\n end\n if dry_list_sm\n else\n puts(\"--> Showing environment designations (which environment is going to run which file).\\n--> Order matters, and is exactly the execution order.\")\n puts\n end\n hook.each_designation do |designation|\n designation.to_s(STDOUT, sm: dry_list_sm)\n puts\n end\n exit(0)\n end\n resolver.after_permissions do |hook|\n begin\n hook.run\n ensure\n profiler.try do |prof|\n puts(prof.to_table)\n end\n end\n end\n if resolver.resolve?\n else\n help(STDOUT)\n exit(0)\n end\nrescue e : Resolver::RunnableError\n e.runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n exit(1)\nrescue e : Resolver::ResponseRejectedError\n e.response.each_rejected_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n end\n exit(1)\nrescue e : Resolver::MoreThanOneAppError\n e.apps.each do |app|\n app.backtrace(STDERR, indent: 2) do |io|\n Frontend.noteln(\"could not run this app because it's not the only one\", io)\n end\n end\n Frontend.errln(e.message)\n exit(1)\nrescue e : Resolver::ResolverError\n Frontend.errln(e.message)\nrescue e : Error\n e.report(STDERR)\n exit(1)\nend"}}],"types":[{"html_id":"novika/Novika/Frontend/CLI/Profiler","path":"Novika/Frontend/CLI/Profiler.html","kind":"class","full_name":"Novika::Frontend::CLI::Profiler","name":"Profiler","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cli.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"}],"namespace":{"html_id":"novika/Novika/Frontend/CLI","kind":"module","full_name":"Novika::Frontend::CLI","name":"CLI"},"doc":"A crude sample-based profiler which is triggered on every\nform the engine tries to execute.\n\nCounts the amount of times a form was attempted to be open\nby the engine.\n\nYou can use `to_table` to convert a snapshot of data to a\n`Tablo::Table` table.","summary":"A crude sample-based profiler which is triggered on every form the engine tries to execute.
","constructors":[{"html_id":"new(period:UInt64=32_u64)-class-method","name":"new","doc":"Initializes this profiler.\n\n*period* is the period between samples, in Engine loop\nticks. The less the value, the more samples are taken\nand the more precise the results are (but the program\nmay run slower).","summary":"Initializes this profiler.
","abstract":false,"args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"args_string":"(period : UInt64 = 32_u64)","args_html":"(period : UInt64 = 32_u64)","location":{"filename":"src/cli.cr","line_number":48,"url":null},"def":{"name":"new","args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(period)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_form_begin(engine:Engine,form:Form)-instance-method","name":"on_form_begin","doc":"Invoked before *engine* opens the given *form*.","summary":"Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/cli.cr","line_number":64,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if (@ticks - @start) >= @period\nelse\n @ticks = @ticks + 1\n return\nend\nengine.each_active_block do |block|\n profile = @profiles[repr = encode(block)]\n profile.sample\n @profiles[repr] = profile\nend\n@start = @ticks\n@ticks = @ticks + 1\n"}},{"html_id":"to_table(cutoff=0.01)-instance-method","name":"to_table","doc":"Assembles and returns the data from this profiler as\na `Tablo::Table`.\n\n*cutoff* specifies the ratio [0-1] below which profiles\nshould be rejected (i.e., too insignificant).","summary":"Assembles and returns the data from this profiler as a Tablo::Table
.
Represents a profile entry.
","constructors":[{"html_id":"new(str:String)-class-method","name":"new","abstract":false,"args":[{"name":"str","external_name":"str","restriction":"String"}],"args_string":"(str : String)","args_html":"(str : String)","location":{"filename":"src/cli.cr","line_number":21,"url":null},"def":{"name":"new","args":[{"name":"str","external_name":"str","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(str)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<=>(other:Profile)-instance-method","name":"<=>","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Profile"}],"args_string":"(other : Profile)","args_html":"(other : Profile)","location":{"filename":"src/cli.cr","line_number":25,"url":null},"def":{"name":"<=>","args":[{"name":"other","external_name":"other","restriction":"Profile"}],"visibility":"Public","body":"@samples <=> (other.@samples)"}},{"html_id":"ratio(whole:Float64)-instance-method","name":"ratio","abstract":false,"args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"args_string":"(whole : Float64)","args_html":"(whole : Float64)","location":{"filename":"src/cli.cr","line_number":33,"url":null},"def":{"name":"ratio","args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"visibility":"Public","body":"@samples / whole"}},{"html_id":"sample-instance-method","name":"sample","abstract":false,"location":{"filename":"src/cli.cr","line_number":29,"url":null},"def":{"name":"sample","visibility":"Public","body":"@samples = @samples + 1"}},{"html_id":"to_row?(nperiods)-instance-method","name":"to_row?","abstract":false,"args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"args_string":"(nperiods)","args_html":"(nperiods)","location":{"filename":"src/cli.cr","line_number":37,"url":null},"def":{"name":"to_row?","args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"visibility":"Public","body":"[@str, @samples]"}}]}]}]},{"html_id":"novika/Novika/Frontend/Nkas","path":"Novika/Frontend/Nkas.html","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas","abstract":false,"locations":[{"filename":"src/nkas.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend/Nkas","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas"}],"namespace":{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"},"instance_methods":[{"html_id":"help(io)-instance-method","name":"help","doc":"Appends information about the tool to *io*.","summary":"Appends information about the tool to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/nkas.cr","line_number":8,"url":null},"def":{"name":"help","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"nkas - Novika image assembler for Novika #{Novika::VERSION}\\n\\nSyntax:\\n\\n nkas [switches] [queries]Holds all information about a block.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock]","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 2, cls: Novika::FrozenBlock, onlyif: nil, verify: nil}, {type: \"basic\", name: id, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: \"group\", name: tape, cls: Tape, onlyif: -> do\n has_tape\nend, verify: nil, value: nil}, {type: \"group\", name: dict, cls: Dict, onlyif: -> do\n has_dict\nend, verify: nil, value: nil}, {type: \"group\", name: friends, cls: Friends, onlyif: -> do\n has_friends\nend, verify: nil, value: nil}, {type: \"basic\", name: parent, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n has_parent\nend, verify: nil, value: nil}, {type: \"basic\", name: prototype, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n is_instance\nend, verify: nil, value: nil}, {type: \"string\", name: comment, cls: String, onlyif: -> do\n has_comment\nend, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(id,tape,dict,friends,parent,prototype,comment)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"args_string":"(id, tape, dict, friends, parent, prototype, comment)","args_html":"(id, tape, dict, friends, parent, prototype, comment)","location":{"filename":"src/novika/image.cr","line_number":487,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"visibility":"Public","body":"frozen = new\nfrozen.id = id\nfrozen.has_tape = !(!tape)\nif tape\n frozen.tape.cursor = tape.cursor.to_u32\n frozen.tape.substrate = [] of TypedSnapshot\n tape.each do |form|\n if ts = TypedSnapshot.new(form)\n frozen.tape.substrate << ts\n end\n end\nend\nfrozen.has_dict = !(!dict)\nif dict\n frozen.dict.entries = [] of FrozenEntry\n dict.each do |key, entry|\n frozen.dict.entries << (FrozenEntry.new(key, entry))\n end\nend\nfrozen.has_friends = !(!friends)\nif friends\n frozen.friends.refs = [] of BlockRefSnapshot\n friends.each do |friend|\n friend = friend.as(Block)\n frozen.friends.refs << (BlockRefSnapshot.new(friend.object_id))\n end\nend\nfrozen.has_parent = !(!parent)\nif parent\n frozen.parent = BlockRefSnapshot.new(parent.object_id)\nend\nfrozen.is_instance = !(!prototype)\nif prototype\n frozen.prototype = BlockRefSnapshot.new(prototype.object_id)\nend\nfrozen.has_comment = !(!comment)\nif comment\n frozen.comment = comment\nend\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":422,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"comment:String-instance-method","name":"comment","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"def":{"name":"comment","return_type":"String","visibility":"Public","body":"@comment"}},{"html_id":"comment=(comment:String)-instance-method","name":"comment=","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"}],"args_string":"(comment : String)","args_html":"(comment : String)","def":{"name":"comment=","args":[{"name":"comment","external_name":"comment","restriction":"String"}],"visibility":"Public","body":"@comment = comment"}},{"html_id":"dict:Novika::FrozenBlock::Dict-instance-method","name":"dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"dict","visibility":"Public","body":"@dict"}},{"html_id":"dict=(dict:Novika::FrozenBlock::Dict)-instance-method","name":"dict=","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"args_string":"(dict : Novika::FrozenBlock::Dict)","args_html":"(dict : Novika::FrozenBlock::Dict)","def":{"name":"dict=","args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"visibility":"Public","body":"@dict = dict"}},{"html_id":"friends:Novika::FrozenBlock::Friends-instance-method","name":"friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"friends","visibility":"Public","body":"@friends"}},{"html_id":"friends=(friends:Novika::FrozenBlock::Friends)-instance-method","name":"friends=","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"args_string":"(friends : Novika::FrozenBlock::Friends)","args_html":"(friends : Novika::FrozenBlock::Friends)","def":{"name":"friends=","args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"visibility":"Public","body":"@friends = friends"}},{"html_id":"has_comment:Bool-instance-method","name":"has_comment","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment","return_type":"Bool","visibility":"Public","body":"@has_comment == 1"}},{"html_id":"has_comment=(has_comment:UInt8)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"args_string":"(has_comment : UInt8)","args_html":"(has_comment : UInt8)","def":{"name":"has_comment=","args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"visibility":"Public","body":"@has_comment = has_comment"}},{"html_id":"has_comment=(value:Bool)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_comment = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_dict:Bool-instance-method","name":"has_dict","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict","return_type":"Bool","visibility":"Public","body":"@has_dict == 1"}},{"html_id":"has_dict=(has_dict:UInt8)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"args_string":"(has_dict : UInt8)","args_html":"(has_dict : UInt8)","def":{"name":"has_dict=","args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"visibility":"Public","body":"@has_dict = has_dict"}},{"html_id":"has_dict=(value:Bool)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_dict = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_friends:Bool-instance-method","name":"has_friends","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends","return_type":"Bool","visibility":"Public","body":"@has_friends == 1"}},{"html_id":"has_friends=(has_friends:UInt8)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"args_string":"(has_friends : UInt8)","args_html":"(has_friends : UInt8)","def":{"name":"has_friends=","args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"visibility":"Public","body":"@has_friends = has_friends"}},{"html_id":"has_friends=(value:Bool)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_friends = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_parent:Bool-instance-method","name":"has_parent","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent","return_type":"Bool","visibility":"Public","body":"@has_parent == 1"}},{"html_id":"has_parent=(has_parent:UInt8)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"args_string":"(has_parent : UInt8)","args_html":"(has_parent : UInt8)","def":{"name":"has_parent=","args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"visibility":"Public","body":"@has_parent = has_parent"}},{"html_id":"has_parent=(value:Bool)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_parent = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_tape:Bool-instance-method","name":"has_tape","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape","return_type":"Bool","visibility":"Public","body":"@has_tape == 1"}},{"html_id":"has_tape=(has_tape:UInt8)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"args_string":"(has_tape : UInt8)","args_html":"(has_tape : UInt8)","def":{"name":"has_tape=","args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"visibility":"Public","body":"@has_tape = has_tape"}},{"html_id":"has_tape=(value:Bool)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_tape = UInt8.new(value ? 1 : 0)"}},{"html_id":"id:UInt64-instance-method","name":"id","doc":"Block identifier (`BlockRefSnapshot`s will refer to\nthis frozen block by this identifier).","summary":"Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Whether this block is an instance (its prototype is other than itself).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance","return_type":"Bool","visibility":"Public","body":"@is_instance == 1"}},{"html_id":"is_instance=(is_instance:UInt8)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"args_string":"(is_instance : UInt8)","args_html":"(is_instance : UInt8)","def":{"name":"is_instance=","args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"visibility":"Public","body":"@is_instance = is_instance"}},{"html_id":"is_instance=(value:Bool)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@is_instance = UInt8.new(value ? 1 : 0)"}},{"html_id":"parent:BlockRefSnapshot|Nil-instance-method","name":"parent","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"def":{"name":"parent","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"parent=(parent:BlockRefSnapshot|Nil)-instance-method","name":"parent=","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(parent : BlockRefSnapshot | Nil)","args_html":"(parent : BlockRefSnapshot | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"prototype:BlockRefSnapshot|Nil-instance-method","name":"prototype","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"def":{"name":"prototype","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"prototype=(prototype:BlockRefSnapshot|Nil)-instance-method","name":"prototype=","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(prototype : BlockRefSnapshot | Nil)","args_html":"(prototype : BlockRefSnapshot | Nil)","def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"tape:Novika::FrozenBlock::Tape-instance-method","name":"tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"tape","visibility":"Public","body":"@tape"}},{"html_id":"tape=(tape:Novika::FrozenBlock::Tape)-instance-method","name":"tape=","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"args_string":"(tape : Novika::FrozenBlock::Tape)","args_html":"(tape : Novika::FrozenBlock::Tape)","def":{"name":"tape=","args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"visibility":"Public","body":"@tape = tape"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}],"types":[{"html_id":"novika/Novika/FrozenBlock/Dict","path":"Novika/FrozenBlock/Dict.html","kind":"class","full_name":"Novika::FrozenBlock::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":459,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Dict]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n entries.size\nend}, {type: \"array\", name: entries, cls: FrozenEntry, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"entries:Array(FrozenEntry)-instance-method","name":"entries","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"def":{"name":"entries","return_type":"Array(FrozenEntry)","visibility":"Public","body":"@entries"}},{"html_id":"entries=(entries:Array(FrozenEntry))-instance-method","name":"entries=","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"args_string":"(entries : Array(FrozenEntry))","args_html":"(entries : Array(FrozenEntry))","def":{"name":"entries=","args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"visibility":"Public","body":"@entries = entries"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":459,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Friends","path":"Novika/FrozenBlock/Friends.html","kind":"class","full_name":"Novika::FrozenBlock::Friends","name":"Friends","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":469,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Friends]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n refs.size\nend}, {type: \"array\", name: refs, cls: BlockRefSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":469,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"refs:Array(BlockRefSnapshot)-instance-method","name":"refs","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"def":{"name":"refs","return_type":"Array(BlockRefSnapshot)","visibility":"Public","body":"@refs"}},{"html_id":"refs=(refs:Array(BlockRefSnapshot))-instance-method","name":"refs=","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"args_string":"(refs : Array(BlockRefSnapshot))","args_html":"(refs : Array(BlockRefSnapshot))","def":{"name":"refs=","args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"visibility":"Public","body":"@refs = refs"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Tape","path":"Novika/FrozenBlock/Tape.html","kind":"class","full_name":"Novika::FrozenBlock::Tape","name":"Tape","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":448,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Tape]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: cursor, cls: UInt32, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n substrate.size\nend}, {type: \"array\", name: substrate, cls: TypedSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"cursor:UInt32-instance-method","name":"cursor","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"def":{"name":"cursor","return_type":"UInt32","visibility":"Public","body":"@cursor"}},{"html_id":"cursor=(cursor:UInt32)-instance-method","name":"cursor=","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"args_string":"(cursor : UInt32)","args_html":"(cursor : UInt32)","def":{"name":"cursor=","args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"visibility":"Public","body":"@cursor = cursor"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":448,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"substrate:Array(TypedSnapshot)-instance-method","name":"substrate","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"def":{"name":"substrate","return_type":"Array(TypedSnapshot)","visibility":"Public","body":"@substrate"}},{"html_id":"substrate=(substrate:Array(TypedSnapshot))-instance-method","name":"substrate=","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"args_string":"(substrate : Array(TypedSnapshot))","args_html":"(substrate : Array(TypedSnapshot))","def":{"name":"substrate=","args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"visibility":"Public","body":"@substrate = substrate"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/FrozenEntry","path":"Novika/FrozenEntry.html","kind":"class","full_name":"Novika::FrozenEntry","name":"FrozenEntry","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":389,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenEntry]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 1, cls: Novika::FrozenEntry, onlyif: nil, verify: nil}, {type: \"basic\", name: key, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: value, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(key:Form,entry:Entry)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(key : Form, entry : Entry)","args_html":"(key : Form, entry : Entry)","location":{"filename":"src/novika/image.cr","line_number":411,"url":null},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"visibility":"Public","body":"frozen = new\nfrozen.key = TypedSnapshot.new(key)\nfrozen.value = TypedSnapshot.new(entry.form)\nfrozen.opens = entry.opener?\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":390,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"key:TypedSnapshot|Nil-instance-method","name":"key","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"def":{"name":"key","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@key"}},{"html_id":"key=(key:TypedSnapshot|Nil)-instance-method","name":"key=","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(key : TypedSnapshot | Nil)","args_html":"(key : TypedSnapshot | Nil)","def":{"name":"key=","args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@key = key"}},{"html_id":"melt(assembler,block)-instance-method","name":"melt","doc":"Defines the corresponding entry in *block*.","summary":"Defines the corresponding entry in block.
","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"args_string":"(assembler, block)","args_html":"(assembler, block)","location":{"filename":"src/novika/image.cr","line_number":405,"url":null},"def":{"name":"melt","args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"visibility":"Public","body":"k = key.not_nil!.to_form(assembler)\nv = value.not_nil!.to_form(assembler)\nblock.at(k, Entry.new(v, opens))\n"}},{"html_id":"opens:Bool-instance-method","name":"opens","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens","return_type":"Bool","visibility":"Public","body":"@opens == 1"}},{"html_id":"opens=(opens:UInt8)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"args_string":"(opens : UInt8)","args_html":"(opens : UInt8)","def":{"name":"opens=","args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"visibility":"Public","body":"@opens = opens"}},{"html_id":"opens=(value:Bool)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@opens = UInt8.new(value ? 1 : 0)"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"value:TypedSnapshot|Nil-instance-method","name":"value","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"def":{"name":"value","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@value"}},{"html_id":"value=(value:TypedSnapshot|Nil)-instance-method","name":"value=","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(value : TypedSnapshot | Nil)","args_html":"(value : TypedSnapshot | Nil)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Hole","path":"Novika/Hole.html","kind":"struct","full_name":"Novika::Hole","name":"Hole","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":39,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holes are similar to Crystal's `uninitialized` or `out`, in that\nthey allow you to allocate memory for a type, pass a pointer to\nthat memory to e.g. a C function, and let that C function write\ninto the memory. The written value can then be retrieved by\nopening the hole.","summary":"Holes are similar to Crystal's uninitialized
or out
, in that they allow you to allocate memory for a type, pass a pointer to that memory to e.g.
Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of this hole's content in memory.","summary":"Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":69,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"handle:Pointer(Void)-instance-method","name":"handle","doc":"Returns a pointer to this hole's content.","summary":"Returns a pointer to this hole's content.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":44,"url":null},"def":{"name":"handle","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":58,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"form = (@type.unbox(@handle)).to_form?\nform.try(&.onto(engine.stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":73,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << @type) << \" hole: 0x\"\naddress.to_s(io, base: 16)\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Hook","path":"Novika/Hook.html","kind":"module","full_name":"Novika::Hook","name":"Hook","abstract":false,"locations":[{"filename":"src/novika/hook.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Hook","kind":"module","full_name":"Novika::Hook","name":"Hook"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"as_boolean-instance-method","name":"as_boolean","doc":"Returns the block-to-boolean hook name.","summary":"Returns the block-to-boolean hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":70,"url":null},"def":{"name":"as_boolean","visibility":"Public","body":"Word.new(\"__boolean__\")"}},{"html_id":"as_byteslice-instance-method","name":"as_byteslice","doc":"Returns the block-to-byteslice hook name.","summary":"Returns the block-to-byteslice hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":80,"url":null},"def":{"name":"as_byteslice","visibility":"Public","body":"Word.new(\"__byteslice__\")"}},{"html_id":"as_color-instance-method","name":"as_color","doc":"Returns the block-to-color hook name.","summary":"Returns the block-to-color hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":55,"url":null},"def":{"name":"as_color","visibility":"Public","body":"Word.new(\"__color__\")"}},{"html_id":"as_decimal-instance-method","name":"as_decimal","doc":"Returns the block-to-decimal hook name.","summary":"Returns the block-to-decimal hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":65,"url":null},"def":{"name":"as_decimal","visibility":"Public","body":"Word.new(\"__decimal__\")"}},{"html_id":"as_quote-instance-method","name":"as_quote","doc":"Returns the block-to-quote hook name.","summary":"Returns the block-to-quote hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":60,"url":null},"def":{"name":"as_quote","visibility":"Public","body":"Word.new(\"__quote__\")"}},{"html_id":"as_quoted_word-instance-method","name":"as_quoted_word","doc":"Returns the block-to-quoted word hook name.","summary":"Returns the block-to-quoted word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":75,"url":null},"def":{"name":"as_quoted_word","visibility":"Public","body":"Word.new(\"__quotedWord__\")"}},{"html_id":"as_word-instance-method","name":"as_word","doc":"Returns the block-to-word hook name.","summary":"Returns the block-to-word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":50,"url":null},"def":{"name":"as_word","visibility":"Public","body":"Word.new(\"__word__\")"}},{"html_id":"died:Word-instance-method","name":"died","doc":"Returns the death hook name.\n\nDeath hooks are used to catch deaths (known as exceptions\nin other languages) in current block or in blocks below the\ncurrent block (nested blocks).\n\nBy defining a death hook, you are basically wrapping the\ncontents of your block in an uncontrained (catch-all)\n`try ... catch` or `begin ... rescue`.\n\n```novika\n[ getErrorDetails echo ] @: __died__\n\n1 0 / \"STDOUT: division by zero⏎\"\n```","summary":"Returns the death hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":19,"url":null},"def":{"name":"died","return_type":"Word","visibility":"Public","body":"Word.new(\"__died__\")"}},{"html_id":"on_cherry-instance-method","name":"on_cherry","doc":"Returns the on-cherry hook name.\n\nOn-cherry hooks trigger when the user tries to *cherry*\na form out of a block. This doesn't necessarily mean using\nthe word `cherry`, since e.g. the word `drop` and its\nimplicit counterpart *pop* is defined in terms of `cherry`.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and dropped/\npopped from, and how it behaves when it is `cherry`d.\n\nOn-shove hook is complemented by `on_shove` hook. See it\nto learn more.\n\nThe \"Hello, World\" of on-shove/on-cherry is defining a\n*controlled stack*.\n\n```novika\n[\n [ ] $: _controlledStack\n\n [ drop _controlledStack swap bi: ['Shove ' swap ~ echo] shove ] @: __shove__\n [ drop _controlledStack cherry dup 'Cherry ' swap ~ echo ] @: __cherry__\n\n [ _controlledStack echo ] @: print\n] obj $: master\n\nmaster [ 1 2 + ] there\nmaster.print\n\"STDOUT: Shove 1⏎\"\n\"STDOUT: Shove 2⏎\"\n\"STDOUT: Cherry 2⏎\"\n\"STDOUT: Cherry 1⏎\"\n\"STDOUT: Shove 3⏎\"\n\"STDOUT: [ 3 ]⏎\"\n```","summary":"Returns the on-cherry hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":142,"url":null},"def":{"name":"on_cherry","visibility":"Public","body":"Word.new(\"__cherry__\")"}},{"html_id":"on_shove-instance-method","name":"on_shove","doc":"Returns the on-shove hook name.\n\nOn-shove hooks trigger when the user tries to `shove` a\nform into the block the hook is attached to. Note that\nthis doesn't necessarily mean literally using `shove`.\n\nFor instance, simply typing `1 2 3` will shove 1, 2, 3\nconsequtively onto the stack. The latter is known as\n*pushing*, since *shoving* is defined for a block-and-a-\nform pair, while *pushing* is defined for a stack-and-a-\nform-pair, where the stack is implicit.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and pushed\nto, and how it behaves when it is shoved into.\n\nOn-shove hook is complemented by `on_cherry`. See it to\nlearn more.","summary":"Returns the on-shove hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":102,"url":null},"def":{"name":"on_shove","visibility":"Public","body":"Word.new(\"__shove__\")"}},{"html_id":"trap-instance-method","name":"trap","doc":"Returns the word trap hook name.\n\nWord traps catch undefined words. Note that during word\nresolution, word traps run *last*. That is, all parents\nand friends of the block you're trying to resolve a word\nin are searched, and only then traps are triggered in the\nappropriate order.\n\nTraps can be nested: if one trap fails to resolve a word,\nthen an outer trap is triggered.\n\nThe words *outer*, *inner*, *nested* etc. refer to the block\nparent hierarchy. Initially, this means the hierarchy is\nAST-like, but for reparented blocks (or blocks whose parent\nhierarchy is changed otherwise), different traps will be\ntriggered in case of an undefined word.\n\n```novika\n[ 'The following word is undefined: ' swap ~ echo ] @: __trap__\n\n1 2 + frobnicate \"STDOUT: The following word is undefined: frobnicate⏎\"\n```","summary":"Returns the word trap hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":45,"url":null},"def":{"name":"trap","visibility":"Public","body":"Word.new(\"__trap__\")"}}]},{"html_id":"novika/Novika/ICapability","path":"Novika/ICapability.html","kind":"module","full_name":"Novika::ICapability","name":"ICapability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Instance-side (`include`) interface to a Novika capability.\nAll capability instances must be compatible with this module.","summary":"Instance-side (include
) interface to a Novika capability.
Returns the collection this capability is a part of.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":19,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":true,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capability.cr","line_number":25,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ICapabilityClass","path":"Novika/ICapabilityClass.html","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Class-side (`extend`) interface to a Novika capability. All\ncapability classes must be compatible with this module.","summary":"Class-side (extend
) interface to a Novika capability.
Returns the frontend identifier of this capability class.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":6,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"on_by_default?:Bool-instance-method","name":"on_by_default?","doc":"Returns whether this capability class should be enabled automatically.","summary":"Returns whether this capability class should be enabled automatically.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":12,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"purpose:String-instance-method","name":"purpose","doc":"Returns a short description on what this capability class provides.","summary":"Returns a short description on what this capability class provides.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/IDict","path":"Novika/IDict.html","kind":"module","full_name":"Novika::IDict","name":"IDict","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Dict","kind":"class","full_name":"Novika::Dict","name":"Dict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Novika dictionary protocol. Objects or values that want\nto be Block dictionaries can implement this protocol to\nmake that possible.","summary":"Novika dictionary protocol.
","instance_methods":[{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":19,"url":null},"def":{"name":"clear","visibility":"Public","body":""}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":35,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":32,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":16,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"each(&:Form,Form->)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":38,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"block_arg":{"name":"","external_name":"","restriction":"(Form, Form ->)"},"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this dictionary currently stores no entries.","summary":"Returns whether this dictionary currently stores no entries.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":45,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"count.zero?"}},{"html_id":"get(name:Form,&:Form->Entry|Nil):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","args_html":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":12,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Form -> Entry | ::Nil)"},"return_type":"Entry | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":23,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":true,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":29,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":""}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":7,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":""}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":4,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"on_form_end(engine:Engine,form:Form)-instance-method","name":"on_form_end","doc":"Invoked after *engine* opened the given *form*.","summary":"Invoked after engine opened the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":8,"url":null},"def":{"name":"on_form_end","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Image","path":"Novika/Image.html","kind":"class","full_name":"Novika::Image","name":"Image","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":893,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
Returns the Image
formed with this block as the pivot block.
Holds compression method used to compress the payload.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression","return_type":"CompressionType","visibility":"Public","body":"CompressionType.new(@compression.to_i)"}},{"html_id":"compression=(compression:UInt8)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"args_string":"(compression : UInt8)","args_html":"(compression : UInt8)","def":{"name":"compression=","args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"visibility":"Public","body":"@compression = compression"}},{"html_id":"compression=(value:CompressionType)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"args_string":"(value : CompressionType)","args_html":"(value : CompressionType)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression=","args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"visibility":"Public","body":"@compression = (@compression.class.new(0)) | value.to_i"}},{"html_id":"payload:Bytes-instance-method","name":"payload","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"def":{"name":"payload","return_type":"Bytes","visibility":"Public","body":"@payload"}},{"html_id":"payload=(payload:Bytes)-instance-method","name":"payload=","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"args_string":"(payload : Bytes)","args_html":"(payload : Bytes)","def":{"name":"payload=","args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"visibility":"Public","body":"@payload = payload"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"signature:String-instance-method","name":"signature","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"def":{"name":"signature","return_type":"String","visibility":"Public","body":"@signature"}},{"html_id":"signature=(signature:String)-instance-method","name":"signature=","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"args":[{"name":"signature","external_name":"signature","restriction":"String"}],"args_string":"(signature : String)","args_html":"(signature : String)","def":{"name":"signature=","args":[{"name":"signature","external_name":"signature","restriction":"String"}],"visibility":"Public","body":"@signature = signature"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs the pivot block and its hierarchy from this\nimage. Returns the resulting block.\n\nCapability collection *caps* is required to make sure all\nrequired capabilities are enabled/available.","summary":"Reconstructs the pivot block and its hierarchy from this image.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":936,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"buffer = IO::Memory.new(payload)\nreader = case compression\nin .none?\n buffer\nin .gzip_fast?, .gzip_best?\n Compress::Gzip::Reader.new(buffer)\nin .brotli_fast?, .brotli_best?\n Compress::Brotli::Reader.new(buffer)\nend\npayload = reader.read_bytes(ImagePayload)\nreader.close\npayload.to_block(caps)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
No compression.
"},{"id":"GzipFast","name":"GzipFast","value":"1","doc":"Use(s) fast but not best Gzip compression.","summary":"Use(s) fast but not best Gzip compression.
"},{"id":"GzipBest","name":"GzipBest","value":"2","doc":"Use(s) best but not fast Gzip compression.","summary":"Use(s) best but not fast Gzip compression.
"},{"id":"BrotliFast","name":"BrotliFast","value":"3","doc":"Use(s) fast but not best Brotli compression.\nGenerally slower than `GzipFast`, but almost\ncertainly will yield better results.","summary":"Use(s) fast but not best Brotli compression.
"},{"id":"BrotliBest","name":"BrotliBest","value":"4","doc":"Use(s) best but not fast Brotli compression.\nGenerally slower than `GzipBest`, but almost\ncertainly will yield better results.","summary":"Use(s) best but not fast Brotli compression.
"}],"namespace":{"html_id":"novika/Novika/Image","kind":"class","full_name":"Novika::Image","name":"Image"},"doc":"Lists all available payload compression types.","summary":"Lists all available payload compression types.
","instance_methods":[{"html_id":"brotli_best?-instance-method","name":"brotli_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":915,"url":null},"def":{"name":"brotli_best?","visibility":"Public","body":"self == BrotliBest"}},{"html_id":"brotli_fast?-instance-method","name":"brotli_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":910,"url":null},"def":{"name":"brotli_fast?","visibility":"Public","body":"self == BrotliFast"}},{"html_id":"gzip_best?-instance-method","name":"gzip_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":905,"url":null},"def":{"name":"gzip_best?","visibility":"Public","body":"self == GzipBest"}},{"html_id":"gzip_fast?-instance-method","name":"gzip_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":902,"url":null},"def":{"name":"gzip_fast?","visibility":"Public","body":"self == GzipFast"}},{"html_id":"none?-instance-method","name":"none?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":899,"url":null},"def":{"name":"none?","visibility":"Public","body":"self == None"}}]}]},{"html_id":"novika/Novika/ImagePayload","path":"Novika/ImagePayload.html","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":800,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Monthly increment of the current Novika version.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"group\", name: ver, cls: Ver, onlyif: nil, verify: -> do\n (ver.rev == 10) && ({ver.subrev, ver.yearly, ver.monthly} == {SUBREV, YEARLY, MONTHLY})\nend, value: nil}, {type: \"group\", name: capabilities, cls: Capabilities, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: pool, cls: BlockPool | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Subrevision (release) of the current Novika version.
"},{"id":"VERSION_MATCH","name":"VERSION_MATCH","value":"((/(\\d+)\\.(\\d+)\\.(\\d+)/).match(Novika::VERSION)).not_nil!"},{"id":"YEARLY","name":"YEARLY","value":"VERSION_MATCH[2].to_u8","doc":"Yearly increment of the current Novika version.","summary":"Yearly increment of the current Novika version.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"capabilities","visibility":"Public","body":"@capabilities"}},{"html_id":"capabilities=(capabilities:Novika::ImagePayload::Capabilities)-instance-method","name":"capabilities=","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"args_string":"(capabilities : Novika::ImagePayload::Capabilities)","args_html":"(capabilities : Novika::ImagePayload::Capabilities)","def":{"name":"capabilities=","args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"visibility":"Public","body":"@capabilities = capabilities"}},{"html_id":"pool:BlockPool|Nil-instance-method","name":"pool","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"def":{"name":"pool","return_type":"BlockPool | ::Nil","visibility":"Public","body":"@pool"}},{"html_id":"pool=(pool:BlockPool|Nil)-instance-method","name":"pool=","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"args_string":"(pool : BlockPool | Nil)","args_html":"(pool : BlockPool | Nil)","def":{"name":"pool=","args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"visibility":"Public","body":"@pool = pool"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Converts this image payload to a block, aided by *caps*.\n\nSee `Image#to_block`.","summary":"Converts this image payload to a block, aided by caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":865,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"capabilities.required.each do |fid|\n if caps.has_capability?(fid.id)\n else\n raise(Novika::Error.new(\"image requires capability '#{fid.id}', but it isn't available\"))\n end\n caps.enable(fid.id)\nend\npool.not_nil!.to_block(caps)\n"}},{"html_id":"ver:Novika::ImagePayload::Ver-instance-method","name":"ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"ver","visibility":"Public","body":"@ver"}},{"html_id":"ver=(ver:Novika::ImagePayload::Ver)-instance-method","name":"ver=","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"args_string":"(ver : Novika::ImagePayload::Ver)","args_html":"(ver : Novika::ImagePayload::Ver)","def":{"name":"ver=","args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"visibility":"Public","body":"@ver = ver"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Capabilities]","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n required.size\nend}, {type: \"array\", name: required, cls: CapabilityId, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":852,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"required:Array(CapabilityId)-instance-method","name":"required","doc":"Holds IDs of required capabilities (namely `ICapabilityClass.id`).","summary":"Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capabilities(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capabilities","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capabilities","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Capabilities = Novika::ImagePayload::Capabilities.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ImagePayload/Ver","path":"Novika/ImagePayload/Ver.html","kind":"class","full_name":"Novika::ImagePayload::Ver","name":"Ver","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Ver]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: rev, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: subrev, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n SUBREV\nend}, {type: \"basic\", name: yearly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n YEARLY\nend}, {type: \"basic\", name: monthly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n MONTHLY\nend}] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"monthly:UInt8-instance-method","name":"monthly","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"def":{"name":"monthly","return_type":"UInt8","visibility":"Public","body":"@monthly"}},{"html_id":"monthly=(monthly:UInt8)-instance-method","name":"monthly=","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"args_string":"(monthly : UInt8)","args_html":"(monthly : UInt8)","def":{"name":"monthly=","args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"visibility":"Public","body":"@monthly = monthly"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":827,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"rev:UInt8-instance-method","name":"rev","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"def":{"name":"rev","return_type":"UInt8","visibility":"Public","body":"@rev"}},{"html_id":"rev=(rev:UInt8)-instance-method","name":"rev=","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"args_string":"(rev : UInt8)","args_html":"(rev : UInt8)","def":{"name":"rev=","args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"visibility":"Public","body":"@rev = rev"}},{"html_id":"subrev:UInt8-instance-method","name":"subrev","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"def":{"name":"subrev","return_type":"UInt8","visibility":"Public","body":"@subrev"}},{"html_id":"subrev=(subrev:UInt8)-instance-method","name":"subrev=","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"args_string":"(subrev : UInt8)","args_html":"(subrev : UInt8)","def":{"name":"subrev=","args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"visibility":"Public","body":"@subrev = subrev"}},{"html_id":"yearly:UInt8-instance-method","name":"yearly","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"def":{"name":"yearly","return_type":"UInt8","visibility":"Public","body":"@yearly"}},{"html_id":"yearly=(yearly:UInt8)-instance-method","name":"yearly=","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"args_string":"(yearly : UInt8)","args_html":"(yearly : UInt8)","def":{"name":"yearly=","args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"visibility":"Public","body":"@yearly = yearly"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/IReadableStore","path":"Novika/IReadableStore.html","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":208,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors act like a form-to-form mapping where entry\nkind (opens/pushes) is ignored (basically, a read-only,\nrestricted subset of block methods for dictionary access).\n\nImplementors can be targets of `entry:fetch`, `entry:fetch?`,\n`entry:exists?`, `entry:opener?`.","summary":"Implementors act like a form-to-form mapping where entry kind (opens/pushes) is ignored (basically, a read-only, restricted subset of block methods for dictionary access).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":209,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"readable store\""}}],"instance_methods":[{"html_id":"form_for(name:Form):Form-instance-method","name":"form_for","doc":"Returns the value form for an entry with the given *name*, or\ndies if no such entry exists.","summary":"Returns the value form for an entry with the given name, or dies if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form","args_html":"(name : Form) : Form","location":{"filename":"src/novika/dict.cr","line_number":230,"url":null},"def":{"name":"form_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form","visibility":"Public","body":"(form_for?(name)) || (name.die(\"no value form for '#{name}'\"))"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/dict.cr","line_number":218,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":214,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":222,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":226,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ISubmittableStore","path":"Novika/ISubmittableStore.html","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors can be targets of `entry:submit`.","summary":"Implementors can be targets of entry:submit
.
Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":247,"url":null},"def":{"name":"submit","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(submit?(name, form)) || (name.die(\"no entry to submit to\"))"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":243,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/LargeDecimalSnapshot","path":"Novika/LargeDecimalSnapshot.html","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":151,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::LargeDecimalSnapshot]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: repr, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":161,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.repr = form.to_s\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":152,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"repr:String-instance-method","name":"repr","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"def":{"name":"repr","return_type":"String","visibility":"Public","body":"@repr"}},{"html_id":"repr=(repr:String)-instance-method","name":"repr=","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"args":[{"name":"repr","external_name":"repr","restriction":"String"}],"args_string":"(repr : String)","args_html":"(repr : String)","def":{"name":"repr=","args":[{"name":"repr","external_name":"repr","restriction":"String"}],"visibility":"Public","body":"@repr = repr"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":157,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(repr)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Library","path":"Novika/Library.html","kind":"class","full_name":"Novika::Library","name":"Library","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":310,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A library is a collection of foreign functions.\n\nA library form can be opened with a block of *function declarations*\nto be exposed. Each function declaration consists of the function's\nname and type signature. Exposed functions are then defined in the\nopener block.\n\nFor more details, see Novika's `ffi:getLibrary`.\n\nInternally, library objects are created by the frontend and fed\nto the capability collection `caps`. When needed, they are\nretrieved from this capability collection.","summary":"A library is a collection of foreign functions.
","class_methods":[{"html_id":"new?(id:String,cwd:Path,env:Resolver::RunnableEnvironment):Library|Nil-class-method","name":"new?","doc":"Tries to find the library with the given *id* in the system-\nspecific library directories, current working directory *cwd*,\nand in the runnable environment *env*.\n\nReturns nil if the library could not be found or loaded.","summary":"Tries to find the library with the given id in the system- specific library directories, current working directory cwd, and in the runnable environment env.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"args_string":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","args_html":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":329,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"return_type":"Library | ::Nil","visibility":"Public","body":"candidates = [] of String\n{% if flag?(:windows) %}\n candidates << \"#{id}.dll\"\n candidates << \"lib#{id}.dll\"\n {% else %}{% if flag?(:darwin) %}\n candidates << \"#{id}.dylib\"\n candidates << \"lib#{id}.dylib\"\n {% else %}{% if flag?(:unix) %}\n candidates << \"#{id}.so\"\n candidates << \"lib#{id}.so\"\n {% else %}\n return\n {% end %}{% end %}{% end %}\nCrystal::Loader.default_search_paths.each do |search_path|\n candidates.each do |candidate|\n if library = Library.new?(id, Path[search_path] / candidate)\n else\n next\n end\n return library\n end\nend\ncandidates.each do |candidate|\n if path = (env.expand?(Path[candidate])) || (cwd.expand(Path[candidate]))\n else\n next\n end\n if library = Library.new?(id, path)\n else\n next\n end\n return library\nend\n"}},{"html_id":"new?(id:String,path:Path):Library|Nil-class-method","name":"new?","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (it may be chosen arbitrarily).\n\nReturns nil if the library could not be loaded.","summary":"Initializes a library for the dynamic library at path, with the given identifier (it may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library | Nil","args_html":"(id : String, path : Path) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":369,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library | ::Nil","visibility":"Public","body":"if handle = LibDl.dlopen(path.to_s, LibDl::RTLD_NOW)\nelse\n return\nend\nnew(id, path, handle)\n"}},{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":532,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"foreign library\""}}],"constructors":[{"html_id":"new(id:String,path:Path):Library-class-method","name":"new","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (may be chosen arbitrarily).\n\nMay die if LibDL fails to load the library.","summary":"Initializes a library for the dynamic library at path, with the given identifier (may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library","args_html":"(id : String, path : Path) : Library","location":{"filename":"src/novika/forms/foreign.cr","line_number":379,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library","visibility":"Public","body":"(new?(id, path)) || (raise(Error.new(String.new(LibDl.dlerror))))"}}],"instance_methods":[{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":536,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"finalize-instance-method","name":"finalize","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":320,"url":null},"def":{"name":"finalize","visibility":"Public","body":"LibDl.dlclose(@handle)"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this library.","summary":"Returns the identifier of this library.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":315,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":521,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"this = engine.block\nfdecls = engine.stack.drop.a(Block)\nfdecls.each do |fdecl|\n parse_fdecl(this, fdecl.a(Block))\nend\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":540,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign library: \") << id) << \"]\""}}]},{"html_id":"novika/Novika/ObjectPool","path":"Novika/ObjectPool.html","kind":"struct","full_name":"Novika::ObjectPool(T)","name":"ObjectPool","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/object_pool.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A naïve object pool, inspired by:\n\nhttps://gist.github.com/floere/3121579","summary":"A naïve object pool, inspired by:
","constructors":[{"html_id":"new(create:->T,clear:T->T)-class-method","name":"new","abstract":false,"args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"args_string":"(create : -> T, clear : T -> T)","args_html":"(create : -> T, clear : T -> T)","location":{"filename":"src/novika/object_pool.cr","line_number":8,"url":null},"def":{"name":"new","args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"visibility":"Public","body":"_ = ObjectPool(T).allocate\n_.initialize(create, clear)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"acquire:T-instance-method","name":"acquire","doc":"Returns a free/new instance of the object.","summary":"Returns a free/new instance of the object.
","abstract":false,"location":{"filename":"src/novika/object_pool.cr","line_number":18,"url":null},"def":{"name":"acquire","return_type":"T","visibility":"Public","body":"if kv = @free.shift?\nelse\n obj = @create.call\n kv = {id(obj), obj}\nend\n@used[] = *kv\n"}},{"html_id":"release(obj:T)-instance-method","name":"release","doc":"Clears the given *instance* of the object, and releases\nit so that it can be acquired by someone else.","summary":"Clears the given instance of the object, and releases it so that it can be acquired by someone else.
","abstract":false,"args":[{"name":"obj","external_name":"obj","restriction":"T"}],"args_string":"(obj : T)","args_html":"(obj : T)","location":{"filename":"src/novika/object_pool.cr","line_number":28,"url":null},"def":{"name":"release","args":[{"name":"obj","external_name":"obj","restriction":"T"}],"visibility":"Public","body":"@clear.call(obj)\nid = id(obj)\n@free[id] = obj\n@used.delete(id)\n"}}]},{"html_id":"novika/Novika/Quote","path":"Novika/Quote.html","kind":"module","full_name":"Novika::Quote","name":"Quote","abstract":false,"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":18,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EFFECT_BOUND_TAKE","name":"EFFECT_BOUND_TAKE","value":"12","doc":"Specifies how many characters to take from the left and right\nboundaries of the quote for a shorter representation in `effect`.","summary":"Specifies how many characters to take from the left and right boundaries of the quote for a shorter representation in #effect
.
Specifies the maximum amount of characters to display before the quote gets cut off in #effect
(see Form#effect
).
The empty quote.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"including_types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote"},{"html_id":"novika/Novika/Quote/StringQuote","kind":"struct","full_name":"Novika::Quote::StringQuote","name":"StringQuote"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are Novika quotes, which are known as strings\nin most other programming languages.\n\nQuotes are optimized for the ASCII-only case. Also, they\ntreat single `String::Grapheme`s separately from strings\nof those, and cache grapheme counts here and there.\n\nThe slowest operations on quotes are `slice_at` and `at`\nover *non- ASCII* quotes. Both are currently O(N) in terms\nof iterations only; they do a lot of other work besides\niteration as well.\n\nWhen you are slow, being even slower doesn't matter that much\nanymore. This is the case with Novika.\n\nAnd yes, quotes do rely on the experimental grapheme API.","summary":"Includers are Novika quotes, which are known as strings in most other programming languages.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":50,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,count=string.grapheme_size,ascii=string.ascii_only?)-class-method","name":"new","doc":"Creates a quote from *string*.\n\n*count* can be provided if the amount of graphemes in\n*string* is known.","summary":"Creates a quote from string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"args_string":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","args_html":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":28,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"visibility":"Public","body":"if count == 1\n string.each_grapheme do |it|\n return GraphemeQuote.new(it)\n end\nend\nStringQuote.new(string, count, ascii)\n"}},{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","doc":"Creates a quote from *grapheme*.","summary":"Creates a quote from grapheme.
","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":37,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"GraphemeQuote.new(grapheme)"}},{"html_id":"new(char:Char)-class-method","name":"new","doc":"Creates a quote from *char*.","summary":"Creates a quote from char.
","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","args_html":"(char : Char)","location":{"filename":"src/novika/forms/quote.cr","line_number":42,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"Char"}],"visibility":"Public","body":"new(String::Grapheme.new(char))"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":69,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":true,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":65,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"at(index:Int32):GraphemeQuote-instance-method","name":"at","doc":"Returns the grapheme at *index* as `Quote`, or dies.","summary":"Returns the grapheme at index as Quote
, or dies.
Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":76,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":72,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/quote.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quote '\") << string) << \"'\""}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* in this quote.","summary":"Yields occurrences of the given pattern in this quote.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":177,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":188,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"nchars = count\nif nchars <= EFFECT_MAX_CHARS\n return super(io)\nend\nl = at(0, EFFECT_BOUND_TAKE)\nr = at((nchars - EFFECT_BOUND_TAKE) - 1, nchars - 1)\nio << \"'\"\nl.string.dump_unquoted(io)\nio << \"…\"\nr.string.dump_unquoted(io)\nio << \"'\"\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":79,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"first_byte?:UInt8|Nil-instance-method","name":"first_byte?","doc":"Returns the first byte (or nil) in this quote.","summary":"Returns the first byte (or nil) in this quote.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":112,"url":null},"def":{"name":"first_byte?","return_type":"UInt8 | ::Nil","visibility":"Public","body":"string.byte_at?(0)"}},{"html_id":"fit(total:Int,ellipsis:_):Quote-instance-method","name":"fit","doc":"Ensures this quote is of *total* characters or less. In case of\noverflow, truncates with *ellipsis*. If even *ellipsis* cannot\nfit, truncates ellipsis so that it is of *total* characters.\nReturns the resulting quote.","summary":"Ensures this quote is of total characters or less.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"args_string":"(total : Int, ellipsis : _) : Quote","args_html":"(total : Int, ellipsis : _) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":94,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"ord?:Int32|Nil-instance-method","name":"ord?","doc":"Returns the Unicode codepoint for the first character in\nthis quote, or nil if this quote is empty.","summary":"Returns the Unicode codepoint for the first character in this quote, or nil if this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":118,"url":null},"def":{"name":"ord?","return_type":"Int32 | ::Nil","visibility":"Public","body":"if empty?\nelse\n string[0].ord\nend"}},{"html_id":"pad(total:Int,padder:_,side:PadSide):Quote-instance-method","name":"pad","doc":"Pads this quote with *padder* until it becomes *total* perceived\ncharacters long. The side where the padding should apply is specified\nby *side*. Returns the resulting quote.","summary":"Pads this quote with padder until it becomes total perceived characters long.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : _, side : PadSide) : Quote","args_html":"(total : Int, padder : _, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":88,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":true,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":83,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"slice_at(slicept:Int32):Tuple(Quote,Quote)-instance-method","name":"slice_at","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Dies if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote)","args_html":"(slicept : Int32) : Tuple(Quote, Quote)","location":{"filename":"src/novika/forms/quote.cr","line_number":145,"url":null},"def":{"name":"slice_at","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote)","visibility":"Public","body":"(slice_at?(slicept)) || (die(\"slicepoint is out of bounds: #{slicept}\"))"}},{"html_id":"slice_at?(slicept:Int32):Tuple(Quote,Quote)|Nil-instance-method","name":"slice_at?","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Returns nil if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","args_html":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","location":{"filename":"src/novika/forms/quote.cr","line_number":152,"url":null},"def":{"name":"slice_at?","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote) | ::Nil","visibility":"Public","body":"size = count\nif size.zero?\n return\nend\nif slicept.in?(0..size)\nelse\n return\nend\nif slicept.zero?\n {EMPTY, self}\nelse\n if slicept == size\n {self, EMPTY}\n else\n slice_at!(slicept, size)\n end\nend\n"}},{"html_id":"stitch(other:Quote):Quote-instance-method","name":"stitch","doc":"Stitches (concatenates) this and *other* quote variants,\nand returns the resulting quote.","summary":"Stitches (concatenates) this and other quote variants, and returns the resulting quote.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Quote","args_html":"(other : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":124,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if empty?\n return other\nend\nif other.empty?\n return self\nend\na = cached_count?\nb = other.cached_count?\nif a && b\n StringQuote.new(string + other.string, count: a + b)\nelse\n StringQuote.new(res = string + other.string, count: res.grapheme_size)\nend\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Returns an immutable Byteslice
representation of this quote.
Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":172,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"self"}}],"types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","path":"Novika/Quote/GraphemeQuote.html","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":496,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Quote type for a single grapheme (perceived character).","summary":"Quote type for a single grapheme (perceived character).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":505,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":502,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"_ = allocate\n_.initialize(grapheme)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":552,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(GraphemeQuote) && (other.grapheme == grapheme)"}},{"html_id":"as_byte?-instance-method","name":"as_byte?","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":509,"url":null},"def":{"name":"as_byte?","visibility":"Public","body":"if char = (grapheme.@cluster).as?(Char)\nelse\n return\nend\nif char.ascii?\nelse\n return\nend\nchar.ord\n"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":527,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b == e ? self : EMPTY"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":541,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"1"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.\n\nGrapheme quotes always return 1.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":534,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"1"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":606,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"if grapheme == pattern.grapheme\n yield 0\nend"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":612,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.\n\nGrapheme quotes always return false.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":548,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":600,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nself\n"}},{"html_id":"grapheme:String::Grapheme-instance-method","name":"grapheme","doc":"Returns the grapheme.","summary":"Returns the grapheme.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":500,"url":null},"def":{"name":"grapheme","return_type":"String::Grapheme","visibility":"Public","body":"@grapheme"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":556,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total <= 1\n return self\nend\nif total == 2\n padding = padder\nelse\n string = String.build do |io|\n last = padder.grapheme\n (total - 1).times do\n io << last\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":575,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total <= 1\n return self\nend\nif total == 2\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - 1\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":624,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"self == pattern ? repl : self"}},{"html_id":"stitch(other:StringQuote):Quote-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote) : Quote","args_html":"(other : StringQuote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":519,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"return_type":"Quote","visibility":"Public","body":"other.empty? ? self : super(other)"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Apply padding to the left of the quote.
"},{"id":"Right","name":"Right","value":"1","doc":"Apply padding to the right of the quote.","summary":"Apply padding to the right of the quote.
"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Represents the side where padding should apply.\n\nSee `Quote#pad`.","summary":"Represents the side where padding should apply.
","instance_methods":[{"html_id":"apply(quote:Quote,padding:Quote)-instance-method","name":"apply","doc":"Applies padding to the side specified by `self`.","summary":"Applies padding to the side specified by self
.
Quote type for multiple (two or more), or no graphemes.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":241,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,countcached_count:Int32|Nil=nil,ascii_only:Bool=string.ascii_only?)-class-method","name":"new","doc":"Creates a string quote from the given *string*.","summary":"Creates a string quote from the given string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"args_string":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","args_html":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":237,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string, cached_count, ascii_only)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":350,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(StringQuote) && (string == other.string)"}},{"html_id":"ascii_only?:Bool-instance-method","name":"ascii_only?","doc":"Returns whether this string quote consists of ASCII\ncharacters only.","summary":"Returns whether this string quote consists of ASCII characters only.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":234,"url":null},"def":{"name":"ascii_only?","return_type":"Bool","visibility":"Public","body":"@ascii_only"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":298,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nif (b == 0) && (e == (count - 1))\n return self\nend\nif b == e\n return (at?(b)).not_nil!\nend\nif ascii_only?\n StringQuote.new((b..e).join do |index|\n byte = (string.byte_at?(index)).not_nil!\n byte < 128 ? byte.unsafe_chr : Char::REPLACEMENT\n end, count: e - b, ascii_only: true)\nelse\n StringQuote.new(String.build do |io|\n index = 0\n string.each_grapheme do |grapheme|\n if index < b\n index = index + 1\n next\n end\n if index > e\n break\n end\n io << grapheme\n index = index + 1\n end\n end, count: e - b, ascii_only: false)\nend\n"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached perceived character count in this string quote, or nil.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":230,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"@cached_count"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":342,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"cached_count? || string.grapheme_size"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":431,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"kmp(string, pattern.string, ascii: ascii_only? && pattern.ascii_only?) do |index|\n yield index\nend"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":409,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\nif ascii_only? && (pattern_byte = pattern.as_byte?)\n string.each_byte do |byte|\n if byte == pattern_byte\n yield index\n end\n index = index + 1\n end\nelse\n string.each_grapheme do |grapheme|\n if grapheme == pattern.grapheme\n yield index\n end\n index = index + 1\n end\nend\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":346,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"string.empty?"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":397,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nif count <= total\n return self\nend\nnvisible = total - ellipsis.count\nif nvisible <= 0\n return ellipsis.at(0, total - 1)\nend\n(at(0, nvisible - 1)).stitch(ellipsis)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":372,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - count\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":354,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder\nelse\n string = String.build(total) do |io|\n (total - count).times do\n io << padder.grapheme\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":486,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(string.gsub(pattern.string, repl.string))"}},{"html_id":"stitch(other:StringQuote)-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote)","args_html":"(other : StringQuote)","location":{"filename":"src/novika/forms/quote.cr","line_number":333,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"visibility":"Public","body":"if ascii_only? && other.ascii_only?\nelse\n return super(other)\nend\nStringQuote.new(res = string + other.string, count: res.bytesize, ascii_only: true)\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Returns the underlying string.","summary":"Returns the underlying string.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":226,"url":null},"def":{"name":"string","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":490,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"'\"\nstring.dump_unquoted(io)\nio << \"'\"\n"}}]}]},{"html_id":"novika/Novika/QuotedWord","path":"Novika/QuotedWord.html","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":79,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Quoted words are words prefixed by '#': e.g., `#foo`. It\nlets you 'coat' a word: `#foo open` is the same as `foo`,\n`##foo open` is the same as `#foo`, etc. Levels of coating\nare peeled off like in an onion.","summary":"Quoted words are words prefixed by '#': e.g., #foo
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":89,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quoted word '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":84,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine):self-instance-method","name":"on_parent_open","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : self","args_html":"(engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":118,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"self","visibility":"Public","body":"tap do\n peel.onto(engine.stack)\nend"}},{"html_id":"peel-instance-method","name":"peel","doc":"\"Peels\" off a layer of quoting.\n\n```\nQuotedWord.new(\"#foo\").peel # Word.new(\"foo\")\nQuotedWord.new(\"##foo\").peel # QuotedWord.new(\"#foo\")\nQuotedWord.new(\"###foo\").peel # QuotedWord.new(\"##foo\")\n```","summary":""Peels" off a layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":109,"url":null},"def":{"name":"peel","visibility":"Public","body":"id.prefixed_by?('#') ? QuotedWord.new(id.lchop) : Word.new(id)"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds another layer of quoting. Opposite of `peel`.","summary":"Adds another layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":98,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(\"##{@id}\")"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":122,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << '#') << id"}},{"html_id":"to_word:Word-instance-method","name":"to_word","doc":"Converts this quoted word to `Word`.","summary":"Converts this quoted word to Word
.
Snapshot of a quoted word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuotedWordSnapshot]","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:QuotedWord)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"args_string":"(form : QuotedWord)","args_html":"(form : QuotedWord)","location":{"filename":"src/novika/image.cr","line_number":226,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"visibility":"Public","body":"qword = new\nqword.id = form.id\nqword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":217,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":222,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"QuotedWord.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/QuoteSnapshot","path":"Novika/QuoteSnapshot.html","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":173,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuoteSnapshot]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: bytesize, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.bytesize\nend}, {type: \"string\", name: content, cls: String, onlyif: nil, verify: nil, length: -> do\n bytesize\nend, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Quote)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/image.cr","line_number":186,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"quote = new\nquote.content = form.string\nquote\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":174,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"bytesize:UInt64-instance-method","name":"bytesize","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"def":{"name":"bytesize","return_type":"UInt64","visibility":"Public","body":"@bytesize"}},{"html_id":"bytesize=(bytesize:UInt64)-instance-method","name":"bytesize=","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"args_string":"(bytesize : UInt64)","args_html":"(bytesize : UInt64)","def":{"name":"bytesize=","args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"visibility":"Public","body":"@bytesize = bytesize"}},{"html_id":"content:String-instance-method","name":"content","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"def":{"name":"content","return_type":"String","visibility":"Public","body":"@content"}},{"html_id":"content=(content:String)-instance-method","name":"content=","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String)","args_html":"(content : String)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"String"}],"visibility":"Public","body":"@content = content"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":182,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Quote.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Resolver","path":"Novika/Resolver.html","kind":"module","full_name":"Novika::Resolver","name":"Resolver","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENV_GLOBAL_DIRNAME","name":"ENV_GLOBAL_DIRNAME","value":"\".novika\"","doc":"Specifies the name of the global environment directory.","summary":"Specifies the name of the global environment directory.
"},{"id":"ENV_LOCAL_DIRNAME","name":"ENV_LOCAL_DIRNAME","value":"\"env\"","doc":"Specifies the name of the local environment directory.","summary":"Specifies the name of the local environment directory.
"},{"id":"ENV_LOCAL_PROOF_FILENAME","name":"ENV_LOCAL_PROOF_FILENAME","value":"\".nk.env\"","doc":"Specifies the name of the file that is going to be used as the\nproof that the directory at hand is not simply called 'env',\nbut is actually intended as a Novika environment directory.","summary":"Specifies the name of the file that is going to be used as the proof that the directory at hand is not simply called 'env', but is actually intended as a Novika environment directory.
"},{"id":"PERMISSIONS_FILENAME","name":"PERMISSIONS_FILENAME","value":"\"permissions\"","doc":"Specifies the name of the file that will contain saved permissions.","summary":"Specifies the name of the file that will contain saved permissions.
"},{"id":"PREAMBLES_ENTRY_NAME","name":"PREAMBLES_ENTRY_NAME","value":"Word.new(\"__preambles__\")","doc":"Specifies the name of the entry that holds the preambles.","summary":"Specifies the name of the entry that holds the preambles.
"},{"id":"RESOLVER_RECURSION_LIMIT","name":"RESOLVER_RECURSION_LIMIT","value":"64","doc":"Recursion limit for the resolver. Doesn't have to be big, it's\nbasically file system depth which isn't too big most of the time.","summary":"Recursion limit for the resolver.
"}],"including_types":[{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Resolver/ChildSlot","path":"Novika/Resolver/ChildSlot.html","kind":"class","full_name":"Novika::Resolver::ChildSlot","name":"ChildSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1423,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"runnables of whomever\ninherits me\".","summary":"Slot (placeholder) that stands for "runnables of whomever inherits me".
","instance_methods":[{"html_id":"replace(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present,population:RunnableContainer,container:RunnableContainer):RunnableContainer-instance-method","name":"replace","doc":"Replaces any occurences of this slot in *container* with a\ncontainer holding the runnables this slot stands for.\n\n*manifest* is the manifest that contains this slot.\n\n*group* is the `RunnableGroup` of the manifest that contains\nthis slot.\n\nReturns the next population container.","summary":"Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1424,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"content = population.child(transparent: false, ancestor: self)\ncontainer.replace(self, content)\ncontent\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1442,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[<>]\""}}]},{"html_id":"novika/Novika/Resolver/Designation","path":"Novika/Resolver/Designation.html","kind":"struct","full_name":"Novika::Resolver::Designation","name":"Designation","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":768,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Designation objects encapsulate a runnable environment and a set\nof resolutions that should be run within that environment.\n\nThe preferred way to create designations is via `RunnableEnvironment#designate`.\n\nAfter obtaining a designation, you can `run` it as many times as\nyou want.","summary":"Designation objects encapsulate a runnable environment and a set of resolutions that should be run within that environment.
","constructors":[{"html_id":"new(root:RunnableRoot,env:RunnableEnvironment,set:ResolutionSet,caps:CapabilityCollection)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","args_html":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":772,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, env, set, caps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"caps:Novika::CapabilityCollection-instance-method","name":"caps","doc":"Returns this designation's own capability collection.","summary":"Returns this designation's own capability collection.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":770,"url":null},"def":{"name":"caps","visibility":"Public","body":"@caps"}},{"html_id":"label:String-instance-method","name":"label","doc":"Returns the label of this designation. It is formed from the\nbasename of this designation's runnable environment.","summary":"Returns the label of this designation.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":837,"url":null},"def":{"name":"label","return_type":"String","visibility":"Public","body":"if envpath = @env.abspath?\nelse\n return \"unknown\"\nend\nenvpath.basename\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the designated resolutions under a new common toplevel block.","summary":"Runs the designated resolutions under a new common toplevel block.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":861,"url":null},"def":{"name":"run","visibility":"Public","body":"preambles = Block.new\nfill_preambles_block(preambles)\ntoplevel = Block.new(@caps.block)\ntoplevel.at(Word.new(\"__runtime__\"), Quote.new(\"novika\"))\ntoplevel.at(PREAMBLES_ENTRY_NAME, preambles)\nengine = Engine.push(@caps)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(toplevel)).slurp(source)\n instance = resolution.run(engine, script_block: script)\n toplevel.import!(from: instance)\nend\nEngine.pop(engine)\n"}},{"html_id":"slurp(target:Block)-instance-method","name":"slurp","doc":"Parses the designated resolutions and appends the parsed forms to\n*target*. Their order is kept, and matches that of the designated\nresolutions.","summary":"Parses the designated resolutions and appends the parsed forms to target.
","abstract":false,"args":[{"name":"target","external_name":"target","restriction":"Block"}],"args_string":"(target : Block)","args_html":"(target : Block)","location":{"filename":"src/novika/resolver.cr","line_number":846,"url":null},"def":{"name":"slurp","args":[{"name":"target","external_name":"target","restriction":"Block"}],"visibility":"Public","body":"preambles = (target.form_for?(PREAMBLES_ENTRY_NAME)).as?(Block)\npreambles || (preambles = Block.new)\nfill_preambles_block(preambles)\ntarget.at(PREAMBLES_ENTRY_NAME, preambles)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(target)).slurp(source)\n target.paste(script)\nend\n"}},{"html_id":"to_s(io,sm=false)-instance-method","name":"to_s","doc":"Appends the string representation of this designation to *io*.\n\n*sm*, if set to true, enables SMall output mode. In this mode,\nonly relative paths of the designated resolutions are appended\nto *io*, separated by newlines.","summary":"Appends the string representation of this designation to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"args_string":"(io, sm = false)","args_html":"(io, sm = false)","location":{"filename":"src/novika/resolver.cr","line_number":889,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"visibility":"Public","body":"envpath = @env.abspath?\nif sm && envpath\n @set.each do |resolution|\n io.puts((resolution.abspath.relative_to?(envpath)) || resolution.abspath)\n end\n return\nend\nenvpath || (envpath = \"unknown\")\n(io << envpath) << \": [\\n\"\n@set.each do |resolution|\n ((io << \" \") << resolution.abspath) << \",\\n\"\nend\nio << \"]\\n\"\n"}}]},{"html_id":"novika/Novika/Resolver/Disk","path":"Novika/Resolver/Disk.html","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":131,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"InfoAbsent","name":"InfoAbsent","value":"InfoAbsence.new","doc":"Singleton instance of `InfoAbsence`.","summary":"Singleton instance of InfoAbsence
.
A caching, resolver-specific file system access abstraction on top of Crystal's Dir
and File
.
If path (symlink or not) points to a directory, returns the real path to that directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":224,"url":null},"def":{"name":"dir?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.directory?\nelse\n return\nend\npresence.path\n"}},{"html_id":"env?(origin:Path):Path|Nil-instance-method","name":"env?","doc":"Determines and returns the path to the environment directory,\nif any. Otherwise, returns nil.\n\nClimbs up from *origin* until encountering:\n\n- A file named '.nk.env'\n- A directory named 'env' containing a file named '.nk.env'\n- A directory named '.novika'\n\nThe result is cached, recursively, so you can call this method\nas many times as you'd like; your disk won't explode.","summary":"Determines and returns the path to the environment directory, if any.
","abstract":false,"args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"args_string":"(origin : Path) : Path | Nil","args_html":"(origin : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":327,"url":null},"def":{"name":"env?","args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"env : Path | ::Nil\nif env = @envs[origin]?\n return env\nend\nif file?(origin / ENV_LOCAL_PROOF_FILENAME)\n return @envs[origin] = origin\nend\nif env = dir?(origin / ENV_GLOBAL_DIRNAME)\n return @envs[origin] = env\nend\nif (env = dir?(origin / ENV_LOCAL_DIRNAME)) && (file?(env / ENV_LOCAL_PROOF_FILENAME))\n return @envs[origin] = env\nend\nif (origin == origin.root) && (env = dir?(Path.home / ENV_GLOBAL_DIRNAME))\n return @envs[origin] = env\nend\nif origin == origin.anchor\n return\nend\nif env = env?(origin.parent)\nelse\n return\nend\n@envs[origin] = env\n"}},{"html_id":"file?(path:Path):Path|Nil-instance-method","name":"file?","doc":"If *path* (symlink or not) points to a file, returns the real\npath to that file. Otherwise, returns nil.","summary":"If path (symlink or not) points to a file, returns the real path to that file.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":215,"url":null},"def":{"name":"file?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.file?\nelse\n return\nend\npresence.path\n"}},{"html_id":"glob(origin:Path,selector:GlobSelector,&fn:Path->)-instance-method","name":"glob","doc":"A simpler, Novika- and `Disk`-specific globbing mechanism.\n\nCalls *fn* with paths in *origin* directory that match the\ngiven *selector*.","summary":"A simpler, Novika- and Disk
-specific globbing mechanism.
Reads, caches, and returns the InfoPresence
object for the given path.
Returns the content of the file that path points to.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : String | Nil","args_html":"(path : Path) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":234,"url":null},"def":{"name":"read","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"String | ::Nil","visibility":"Public","body":"@content.put_if_absent(path) do\n File.read(path)\nend"}},{"html_id":"write(path:Path,&:IO->)-instance-method","name":"write","doc":"Yields writable `IO` for the file that *path* points to. The\nfile is created if it does not exist; its content is cleared\nif it does.","summary":"Yields writable IO
for the file that path points to.
Represents the absence of the requested file system entry.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/Disk/InfoPresence","path":"Novika/Resolver/Disk/InfoPresence.html","kind":"struct","full_name":"Novika::Resolver::Disk::InfoPresence","name":"InfoPresence","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":137,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Disk","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk"},"doc":"Represents the presence of the requested file system entry\n(directory, file, or symlink) at `path`. Also holds its\n`File::Info` object, `info`.\n\nSee `info?`.","summary":"Represents the presence of the requested file system entry (directory, file, or symlink) at #path
.
Asks signal receivers to load whatever data they can (and should) from disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/DoDiskSave","path":"Novika/Resolver/DoDiskSave.html","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Asks signal receivers to save whatever data they can\n(and should) to disk.","summary":"Asks signal receivers to save whatever data they can (and should) to disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/GlobSelector","path":"Novika/Resolver/GlobSelector.html","kind":"enum","full_name":"Novika::Resolver::GlobSelector","name":"GlobSelector","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Scripts","name":"Scripts","value":"0","doc":"Match all Novika scripts (glob '*.nk')","summary":"Match all Novika scripts (glob '*.nk')
"},{"id":"Directories","name":"Directories","value":"1","doc":"Match all subdirectories (glob '*/')","summary":"Match all subdirectories (glob '*/')
"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selector for `Disk#glob`.","summary":"Selector for Disk#glob
.
Includers are manifests in RunnableGroup
s.
Creates and returns a manifest object if path contains a manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil) : Manifest","args_html":"(disk : Disk, path : Path, ancestor = nil) : Manifest","location":{"filename":"src/novika/resolver.cr","line_number":1560,"url":null},"def":{"name":"find","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"return_type":"Manifest","visibility":"Public","body":"((Lib.find?(disk, path, ancestor)) || (App.find?(disk, path, ancestor))) || Absent.new"}}],"instance_methods":[{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1570,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\n"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","doc":"Populates *container* with runnables from *origin* according\nto the content of the manifest.\n\n* If there is no explicit `*` or `**`, `**` is automatically\n inserted at the very beginning of the manifest regardless\n of whether it is an application manifest or a library manifest.\n\n* A directory with no manifest is laid out directly using `layout`,\n since there is no \"manifest content\" to speak of.","summary":"Populates container with runnables from origin according to the content of the manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1587,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: true, ancestor: origin)\npopulation.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.append(population)\nroot.assign(origin, container: population)\nlayout(population, origin)\n"}}],"types":[{"html_id":"novika/Novika/Resolver/Manifest/Absent","path":"Novika/Resolver/Manifest/Absent.html","kind":"struct","full_name":"Novika::Resolver::Manifest::Absent","name":"Absent","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the absence of a manifest.","summary":"Represents the absence of a manifest.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Manifest/App","path":"Novika/Resolver/Manifest/App.html","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1760,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.app\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents an application manifest.","summary":"Represents an application manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an application manifest object if\n*path* contains an application manifest. Otherwise,\nreturns nil.","summary":"Creates and returns an application manifest object if path contains an application manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1777,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new application manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new application manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1771,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1766,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1783,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","path":"Novika/Resolver/Manifest/CommentPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1520,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off comments from manifest content.","summary":"Strips off comments from manifest content.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1525,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"FlagPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1521,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/^\\s*#[^\\n]*/m, \"\")"}}]},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","path":"Novika/Resolver/Manifest/FlagPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1532,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Expands expressions such as `[windows, ... => dll, so]`, if found\nin manifest content: substitutes each with the appropriate value.","summary":"Expands expressions such as `[windows, ...
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1554,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":""}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1533,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/\\[([^\\]]+)\\]/) do |exp|\n case $~[1]\n when /^\\s*((?:\\w|\\.\\.\\.)+(?:\\s*,\\s*(?:\\w|\\.\\.\\.)+)*)\\s*\\|\\s*(\\w+(?:\\s*,\\s*\\w+)*)$/\n flags = $~[1].split(/\\s*,\\s*/, remove_empty: true)\n blocks = $~[2].split(/\\s*,\\s*/, remove_empty: true)\n if flags.size == blocks.size\n else\n next exp\n end\n branches = Hash.zip(flags, blocks)\n branch = branches[\"...\"]?\n @root.each_set_flag do |flag|\n if block = branches[flag]?\n else\n next\n end\n break branch = block\n end\n branch || \"\"\n end\nend"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Lib","path":"Novika/Resolver/Manifest/Lib.html","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1793,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.lib\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents a library manifest.","summary":"Represents a library manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an library manifest object if *path*\ncontains a library manifest, returns nil.","summary":"Creates and returns an library manifest object if path contains a library manifest, returns nil.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1809,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new library manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new library manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1804,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1799,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}}]},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","path":"Novika/Resolver/Manifest/PreamblePreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1491,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off manifest preamble and makes the manifest acknowledge it.","summary":"Strips off manifest preamble and makes the manifest acknowledge it.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1514,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"CommentPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1492,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"open = content.match(/^\\s*---\\s*$/m)\nif open\nelse\n return content\nend\nclose = content.match(/^\\s*---\\s*$/m, pos: open.end)\nrange_outer = open.begin...(close ? close.end : content.size)\nrange_inner = open.end...(close ? close.begin : content.size)\npreamble = content[range_inner].strip\n@manifest.on_preamble(@root, @group, preamble)\ncontent.sub(range_outer, \"\")\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","path":"Novika/Resolver/Manifest/Preprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1468,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Base class for several *subtractive preprocessors* for\nmanifest content.\n\nThey are *subtractive* because they *discard* stuff, at\nleast from the original content's point of view.\n\nAlso, one might say *subtractive preprocessors* match \"edges\"\nrather than by \"structure\". If done repeatedly and so to speak\nrecursively, one might finally arrive at \"grains\" coarse enough\nfor \"real\" content analysis. In this sense subtractive\npreprocessors are \"noise-friendly\" -- and that's just what we\nwant. Moreover, they may consider each other \"noise\", too.\n\nPreprocessors can be chained, and can programmaticaly select\nthe next preprocessor (or become the terminal one) in `next?`.","summary":"Base class for several subtractive preprocessors for manifest content.
","constructors":[{"html_id":"new(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","location":{"filename":"src/novika/resolver.cr","line_number":1469,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, group, manifest)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1485,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"PreamblePreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1479,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Present","path":"Novika/Resolver/Manifest/Present.html","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present","abstract":false,"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1599,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DIRECTIVES","name":"DIRECTIVES","value":"Set {\"noinherit\", \"nolayout\"}","doc":"A set of allowed manifest directives.","summary":"A set of allowed manifest directives.
"}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/App","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App"},{"html_id":"novika/Novika/Resolver/Manifest/Lib","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the presence of a manifest.","summary":"Represents the presence of a manifest.
","instance_methods":[{"html_id":"directory-instance-method","name":"directory","doc":"Returns a path that points to the directory where this\nmanifest is located.","summary":"Returns a path that points to the directory where this manifest is located.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1607,"url":null},"def":{"name":"directory","visibility":"Public","body":"@path.parent"}},{"html_id":"on_preamble(root:RunnableRoot,group:RunnableGroup,preamble:String)-instance-method","name":"on_preamble","doc":"Invoked when a preamble is found in this manifest. *preamble*\nis the inner content of the preamble (i.e. without `---`s).","summary":"Invoked when a preamble is found in this manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","args_html":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":1613,"url":null},"def":{"name":"on_preamble","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"visibility":"Public","body":"root.assign(group, preamble: preamble)"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1726,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: false, ancestor: self)\ncontainer.append(population)\nroot.assign(origin, container: population)\nmanifests = [] of ::Tuple(Manifest::Present, RunnableGroup, Array(String), Array(String), Bool)\nclimb(root, origin) do |manifest, group, isself|\n directives, fragments = ((manifest.preprocessed_content(root, group)).split(/\\s+/, remove_empty: true)).partition(&.in?(DIRECTIVES))\n manifests << {manifest, group, directives, fragments, !isself}\n if directives.includes?(\"noinherit\")\n break\n end\nend\nmanifests.reverse_each do |manifest, group, directives, fragments, inherited|\n population = manifest.process(root, group, population, directives, fragments, inherited)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1754,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Manifest[\") << @path) << \"]\""}}]}]},{"html_id":"novika/Novika/Resolver/MoreThanOneAppError","path":"Novika/Resolver/MoreThanOneAppError.html","kind":"class","full_name":"Novika::Resolver::MoreThanOneAppError","name":"MoreThanOneAppError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":119,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when the user tries to run more than one app.","summary":"Raised when the user tries to run more than one app.
","constructors":[{"html_id":"new(apps:Array(RunnableGroup))-class-method","name":"new","abstract":false,"args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"args_string":"(apps : Array(RunnableGroup))","args_html":"(apps : Array(RunnableGroup))","location":{"filename":"src/novika/resolver.cr","line_number":124,"url":null},"def":{"name":"new","args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(apps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"apps:Array(Novika::Resolver::RunnableGroup)-instance-method","name":"apps","doc":"Returns the array of apps in the response; more than of\nthem there.","summary":"Returns the array of apps in the response; more than of them there.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":122,"url":null},"def":{"name":"apps","visibility":"Public","body":"@apps"}}]},{"html_id":"novika/Novika/Resolver/Permission","path":"Novika/Resolver/Permission.html","kind":"enum","full_name":"Novika::Resolver::Permission","name":"Permission","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":50,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Undecided","name":"Undecided","value":"0"},{"id":"Allowed","name":"Allowed","value":"1"},{"id":"Denied","name":"Denied","value":"2"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents the permission state of a dependency.","summary":"Represents the permission state of a dependency.
","instance_methods":[{"html_id":"allowed?-instance-method","name":"allowed?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":52,"url":null},"def":{"name":"allowed?","visibility":"Public","body":"self == Allowed"}},{"html_id":"denied?-instance-method","name":"denied?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":53,"url":null},"def":{"name":"denied?","visibility":"Public","body":"self == Denied"}},{"html_id":"undecided?-instance-method","name":"undecided?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":51,"url":null},"def":{"name":"undecided?","visibility":"Public","body":"self == Undecided"}}]},{"html_id":"novika/Novika/Resolver/PermissionServer","path":"Novika/Resolver/PermissionServer.html","kind":"class","full_name":"Novika::Resolver::PermissionServer","name":"PermissionServer","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2715,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Permission server allows to prompt the user for permissions, and\nsave the user's choices in the *permissions file*.","summary":"Permission server allows to prompt the user for permissions, and save the user's choices in the permissions file.
","constructors":[{"html_id":"new(env:RunnableEnvironment,explicit:Array(RunnableQuery))-class-method","name":"new","doc":"Creates a new permission server.\n\n*resolver* is the resolver with which this server will talk about\nresolver-related things.\n\n*explicit* is a list of explicit runnable queries. An explicit\nquery is that query which was specified manually, e.g. via the\narguments. In other words, the user had to *type it* here and\nnow rather than \"acquire\" it from somewhere unknowingly. This\nlist is mainly used to be less annoying when it comes to asking\nfor permissions.","summary":"Creates a new permission server.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"args_string":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","args_html":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","location":{"filename":"src/novika/resolver.cr","line_number":2729,"url":null},"def":{"name":"new","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(env, explicit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"answer(answer:String)-instance-method","name":"answer","doc":"Prints *answer* so that it can be seen by the user.","summary":"Prints answer so that it can be seen by the user.
","abstract":false,"args":[{"name":"answer","external_name":"answer","restriction":"String"}],"args_string":"(answer : String)","args_html":"(answer : String)","location":{"filename":"src/novika/resolver.cr","line_number":2797,"url":null},"def":{"name":"answer","args":[{"name":"answer","external_name":"answer","restriction":"String"}],"visibility":"Public","body":"@answer.call(answer)"}},{"html_id":"ask?(question:String):String|Nil-instance-method","name":"ask?","doc":"Asks user a *question*, and returns the answer or an empty\nstring in case EOF was received.","summary":"Asks user a question, and returns the answer or an empty string in case EOF was received.
","abstract":false,"args":[{"name":"question","external_name":"question","restriction":"String"}],"args_string":"(question : String) : String | Nil","args_html":"(question : String) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2792,"url":null},"def":{"name":"ask?","args":[{"name":"question","external_name":"question","restriction":"String"}],"return_type":"String | ::Nil","visibility":"Public","body":"@ask.call(question)"}},{"html_id":"brief(dependency:RunnableCapability):String-instance-method","name":"brief","doc":"Returns a brief description of *dependency*.","summary":"Returns a brief description of dependency.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"args_string":"(dependency : RunnableCapability) : String","args_html":"(dependency : RunnableCapability) : String","location":{"filename":"src/novika/resolver.cr","line_number":2786,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"return_type":"String","visibility":"Public","body":"@env.brief(dependency)"}},{"html_id":"explicit?(dependency:Resolution::Dependency):Bool-instance-method","name":"explicit?","doc":"Returns whether *dependency* is explicit.\n\nThis is done by checking whether the *first* `RunnableQuery`\nancestor of *dependency* is in the explicit list. See `new`\nto learn what \"explicitness\" means.","summary":"Returns whether dependency is explicit.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency) : Bool","args_html":"(dependency : Resolution::Dependency) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":2806,"url":null},"def":{"name":"explicit?","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"return_type":"Bool","visibility":"Public","body":"dependency.each_ancestor do |ancestor|\n if ancestor.is_a?(RunnableQuery)\n else\n next\n end\n return @explicit.any?(&.same?(ancestor))\nend\nfalse\n"}},{"html_id":"load-instance-method","name":"load","doc":"Fills the permissions hash with saved permissions.","summary":"Fills the permissions hash with saved permissions.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2746,"url":null},"def":{"name":"load","visibility":"Public","body":"if permissions = @env.permissions?\nelse\n return\nend\ncontent, path = permissions\nbegin\n CSV.each_row(content.strip) do |__temp_70|\n dependent, dependency, state = __temp_70\n if id = state.to_i?\n else\n next\n end\n if permission = Permission.from_value?(id)\n else\n next\n end\n @permissions[{dependent, dependency}] = permission\n end\nrescue IndexError\n raise(ResolverError.new(\"malformed 'permissions' file: #{path}\"))\nend\n"}},{"html_id":"query_permission?(container:RunnableContainer,dependency:Resolution::Dependency)-instance-method","name":"query_permission?","doc":"Queries (possibly prompts) and returns the permission state of\n*dependency* for the given *container*.","summary":"Queries (possibly prompts) and returns the permission state of dependency for the given container.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(container : RunnableContainer, dependency : Resolution::Dependency)","args_html":"(container : RunnableContainer, dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":2817,"url":null},"def":{"name":"query_permission?","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"@permissions.put_if_absent(dependency.signature(container)) do\n dependency.prompt?(self, for: container)\nend"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Flushes the internal permissions store to disk.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2768,"url":null},"def":{"name":"save","visibility":"Public","body":"if @permissions.values.any?(&.allowed?)\nelse\n return\nend\n@env.permissions do |io|\n CSV.build(io) do |builder|\n @permissions.each do |__temp_71, permission|\n dependent, dependency = __temp_71\n if permission.undecided? || permission.denied?\n next\n end\n builder.row(dependent, dependency, permission.to_i)\n end\n end\nend\n"}}]},{"html_id":"novika/Novika/Resolver/Query","path":"Novika/Resolver/Query.html","kind":"alias","full_name":"Novika::Resolver::Query","name":"Query","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":1047,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"(Path | String)","aliased_html":"Path | String","const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}},{"html_id":"novika/Novika/Resolver/Resolution","path":"Novika/Resolver/Resolution.html","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":356,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Obtaining a set of resolution objects from an initial list of\nqueries is the central goal of the resolver.\n\nA resolution object points to a script and lists its dependencies.\nFurthermore, a resolution object also stores its so-called\nrunnable *sources*, which are `RunnableScript` objects that it\nwas derived from.","summary":"Obtaining a set of resolution objects from an initial list of queries is the central goal of the resolver.
","constructors":[{"html_id":"new(script:RunnableScript,deps:Set(Dependency))-class-method","name":"new","doc":"Initializes a runnable resolution for the given runnable *script* and a\nset of resolution dependency objects *deps*.","summary":"Initializes a runnable resolution for the given runnable script and a set of resolution dependency objects deps.
","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"args_string":"(script : RunnableScript, deps : Set(Dependency))","args_html":"(script : RunnableScript, deps : Set(Dependency))","location":{"filename":"src/novika/resolver.cr","line_number":362,"url":null},"def":{"name":"new","args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(script, deps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two resolutions are considered equal when they point to the\nsame script on the disk.","summary":"Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath:Path-instance-method","name":"abspath","doc":"Returns the absolute path to this resolution.","summary":"Returns the absolute path to this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":358,"url":null},"def":{"name":"abspath","return_type":"Path","visibility":"Public","body":"@abspath"}},{"html_id":"dump!(deps:Set(Dependency)|Nil=nil,sources:Array(RunnableScript)|Nil=nil)-instance-method","name":"dump!","doc":"Appends the dependencies of this resolution to *deps*, source scripts\nof this resolution to *sources*.","summary":"Appends the dependencies of this resolution to deps, source scripts of this resolution to sources.
","abstract":false,"args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"args_string":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","args_html":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":369,"url":null},"def":{"name":"dump!","args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"visibility":"Public","body":"deps.try(&.concat(@deps))\nsources.try(&.concat(@sources))\n"}},{"html_id":"each_dependency(&:Dependency->)-instance-method","name":"each_dependency","doc":"Yields dependencies of this resolution.","summary":"Yields dependencies of this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":382,"url":null},"def":{"name":"each_dependency","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Dependency ->)"},"visibility":"Public","body":"@deps.each do |dep|\n yield dep\nend"}},{"html_id":"each_source_group(&:RunnableGroup->)-instance-method","name":"each_source_group","doc":"Yields all `RunnableGroup`s from the ancestry of source scripts of\nthis resolution. Does not yield the same group twice (sameness is\ndetermined with `==`/hash).","summary":"Yields all RunnableGroup
s from the ancestry of source scripts of this resolution.
Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"merge!(other:Resolution):self-instance-method","name":"merge!","doc":"Mutably merges this and *other* resolutions.","summary":"Mutably merges this and other resolutions.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"args_string":"(other : Resolution) : self","args_html":"(other : Resolution) : self","location":{"filename":"src/novika/resolver.cr","line_number":375,"url":null},"def":{"name":"merge!","args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"return_type":"self","visibility":"Public","body":"other.dump!(@deps, @sources)\nself\n"}},{"html_id":"run(engine:Engine,script_block:Block):Block-instance-method","name":"run","doc":"Opens an instance of *script block* (aka *file block*) with *engine*.\n\nExtends *script block* itself with `__path__`, `__file__`; therefore,\nmutates *script block*.\n\nReturns the script block instance after evaluation.","summary":"Opens an instance of script block (aka file block) with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"args_string":"(engine : Engine, script_block : Block) : Block","args_html":"(engine : Engine, script_block : Block) : Block","location":{"filename":"src/novika/resolver.cr","line_number":408,"url":null},"def":{"name":"run","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"return_type":"Block","visibility":"Public","body":"script_block.at(Word.new(\"__path__\"), Quote.new(@abspath.parent.to_s))\nscript_block.at(Word.new(\"__file__\"), Quote.new(@abspath.to_s))\ninstance = script_block.instance\ninstance.schedule!(engine, stack: Block.new)\nengine.exhaust\ninstance\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":420,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(((((io << @abspath) << \" (\") << (@deps.join(\", \"))) << \") ← [\") << (@sources.join(\" | \"))) << \"]\""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","path":"Novika/Resolver/Resolution/Dependency.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":430,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution"},"doc":"Includers can be listed as dependencies in a `Resolution`.","summary":"Includers can be listed as dependencies in a Resolution
.
Sets the permission state of this dependency to "allowed".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":459,"url":null},"def":{"name":"allow","visibility":"Public","body":"@permission = Permission::Allowed"}},{"html_id":"allowed?:Bool-instance-method","name":"allowed?","doc":"Returns whether this dependency is allowed. Depends on the permission\nstate of this dependency, which is normally set by `PermissionServer`.","summary":"Returns whether this dependency is allowed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":454,"url":null},"def":{"name":"allowed?","return_type":"Bool","visibility":"Public","body":"@permission.allowed?"}},{"html_id":"deny-instance-method","name":"deny","doc":"Sets the permission state of this dependency to \"denied\".","summary":"Sets the permission state of this dependency to "denied".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":464,"url":null},"def":{"name":"deny","visibility":"Public","body":"@permission = Permission::Denied"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is #allowed?
, enables it in the given capability collection caps.
Promps the user for whether the use of this dependency should be allowed in container's RunnableEnvironment
.
Communicates with the given permission server in order to determine whether the use of this dependency should be allowed or denied to container.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer)","args_html":"(server : PermissionServer, *, for container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":471,"url":null},"def":{"name":"request","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"visibility":"Public","body":"if @permission.undecided?\nelse\n return\nend\nif server.explicit?(self)\n @permission = Permission::Allowed\n return\nend\n@permission = server.query_permission?(container, self)\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":439,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","path":"Novika/Resolver/Resolution/Dependency/DefaultPrompt.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":488,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},"doc":"Provides the includer with an implementation of `Dependency#prompt?`\nin turn requiring it to simply specify a `label`.","summary":"Provides the includer with an implementation of Dependency#prompt?
in turn requiring it to simply specify a #label
.
Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":513,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":""}},{"html_id":"envelope(container:RunnableContainer)-instance-method","name":"envelope","doc":"Returns the string representation of this dependency's envelope\n(its container so to speak). The runtime (not specialize-time!)\n*container* is provided as a fallback option (albeit a *very bad one*).","summary":"Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":501,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":true,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":496,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":""}},{"html_id":"prompt?(server:PermissionServer,*,forcontainer:RunnableContainer):Permission-instance-method","name":"prompt?","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","args_html":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","location":{"filename":"src/novika/resolver.cr","line_number":516,"url":null},"def":{"name":"prompt?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"return_type":"Permission","visibility":"Public","body":"label = label(server)\nprompt = String.build do |io|\n (((io << \"Allow \") << (envelope(container))) << \" to load \") << label\n if description = description?(server)\n (io << \", which \") << description\n end\n ((((io << \"? [\") << \"y\".colorize.underline) << \" yes | \") << \"?\".colorize.underline) << \" help |Represents the signature of a dependency.
"}]}]},{"html_id":"novika/Novika/Resolver/ResolutionSet","path":"Novika/Resolver/ResolutionSet.html","kind":"struct","full_name":"Novika::Resolver::ResolutionSet","name":"ResolutionSet","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":553,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents an ordered set of `Resolution` objects.","summary":"Represents an ordered set of Resolution
objects.
Returns whether all resolutions from this set come from the same RunnableGroup
.
Returns whether all resolutions in this set come from the same application RunnableGroup
.
Appends a resolution to this set.
","abstract":false,"args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"args_string":"(resolution : Resolution)","args_html":"(resolution : Resolution)","location":{"filename":"src/novika/resolver.cr","line_number":571,"url":null},"def":{"name":"append","args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"visibility":"Public","body":"if index = @resolutions.index(resolution)\n @resolutions[index] = @resolutions[index].merge!(resolution)\n return\nend\n@resolutions << resolution\n"}},{"html_id":"append(set:ResolutionSet)-instance-method","name":"append","doc":"Appends an entire resolution *set* at once. Essentially the same\nas appending each `Resolution` from *set*.","summary":"Appends an entire resolution set at once.
","abstract":false,"args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"args_string":"(set : ResolutionSet)","args_html":"(set : ResolutionSet)","location":{"filename":"src/novika/resolver.cr","line_number":582,"url":null},"def":{"name":"append","args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"visibility":"Public","body":"set.each do |resolution|\n append(resolution)\nend"}},{"html_id":"each(&:Resolution->)-instance-method","name":"each","doc":"Yields resolutions in this resolution set.","summary":"Yields resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":587,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Resolution ->)"},"visibility":"Public","body":"@resolutions.each do |resolution|\n yield resolution\nend"}},{"html_id":"each_designation(root:RunnableRoot,&:Designation->)-instance-method","name":"each_designation","doc":"Yields environment designations for the given runnable *root*.\n\n*Environment designations* are resolution sets coupled to an\nenvironment. That is, an environment designation is a \"token\"\nstating *this* environment should handle resolutions out of\n*that* resolution set.","summary":"Yields environment designations for the given runnable root.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"args_string":"(root : RunnableRoot, & : Designation -> )","args_html":"(root : RunnableRoot, & : Designation -> )","location":{"filename":"src/novika/resolver.cr","line_number":713,"url":null},"def":{"name":"each_designation","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"visited = Set(Resolution).new\ndesignations = {} of RunnableEnvironment => ResolutionSet\neach_group do |group, resolution|\n if resolution.in?(visited)\n next\n end\n if container = root.containerof?(group)\n else\n return\n end\n set = designations.put_if_absent(container.env) do\n ResolutionSet.new\n end\n set.append(resolution)\n visited << resolution\nend\ndefault = designations.put_if_absent(root.default_env) do\n ResolutionSet.new\nend\neach do |resolution|\n if resolution.in?(visited)\n next\n end\n default.append(resolution)\nend\ndesignations.each do |env, set|\n yield env.designate(set)\nend\n"}},{"html_id":"each_group(&:RunnableGroup,Resolution->)-instance-method","name":"each_group","doc":"Yields all `RunnableGroup` objects that have contributed to this\nresolution set. The yielded groups can repeat.","summary":"Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields preambles of unique application and library RunnableGroup
s that have contributed to this resolution set, as well as the groups themselves.
Yields unique application RunnableGroup
s that have contributed to this resolution set.
Yields all unique Resolution::Dependency
objects in this resolution set.
Yields each unique Resolution::Dependency
object followed by a ResolutionSet
of its dependents.
Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields unique library RunnableGroup
s that have contributed to this resolution set.
Returns whether there are no resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":564,"url":null},"def":{"name":"empty?","visibility":"Public","body":"size.zero?"}},{"html_id":"groups:Array(RunnableGroup)-instance-method","name":"groups","doc":"Returns an array of `RunnableGroup` objects that have contributed\nto this resolution set. Objects in the array can repeat.","summary":"Returns an array of RunnableGroup
objects that have contributed to this resolution set.
Returns whether all resolutions in this set come from the same library RunnableGroup
.
Returns the amount of resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":559,"url":null},"def":{"name":"size","visibility":"Public","body":"@resolutions.size"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":751,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(\"ResolutionSet\")\neach do |resolution|\n (io << \" | \") << resolution\n io.puts\nend\n"}},{"html_id":"unique_apps:Array(RunnableGroup)-instance-method","name":"unique_apps","doc":"Returns an array of unique application `RunnableGroup`s that have\ncontributed to this resolution set.","summary":"Returns an array of unique application RunnableGroup
s that have contributed to this resolution set.
Base class for resolver and resolver-related exceptions.
"},{"html_id":"novika/Novika/Resolver/Response","path":"Novika/Resolver/Response.html","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A mutable response object which is tightly coupled to `Session`,\ndesigned for reuse throughout multiple (rounds of) queries to\nthe latter.","summary":"A mutable response object which is tightly coupled to Session
, designed for reuse throughout multiple (rounds of) queries to the latter.
Joins all accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2874,"url":null},"def":{"name":"accepted_set","return_type":"ResolutionSet","visibility":"Public","body":"accepted_set = ResolutionSet.new\n@accepted.each do |__temp_72|\n _, set = __temp_72\n accepted_set.append(set)\nend\naccepted_set\n"}},{"html_id":"drop_wish(&:RunnableQuery->)-instance-method","name":"drop_wish","doc":"Yields wishes from this response's wishlist, then clears\nthe wishlist (so that this response can perhaps be reused).","summary":"Yields wishes from this response's wishlist, then clears the wishlist (so that this response can perhaps be reused).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2908,"url":null},"def":{"name":"drop_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishlist.each do |wish|\n yield wish\nend\n@wishlist.clear\n"}},{"html_id":"each_ignored_runnable(&:Runnable->)-instance-method","name":"each_ignored_runnable","doc":"Yields runnables that were ignored.","summary":"Yields runnables that were ignored.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2902,"url":null},"def":{"name":"each_ignored_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@ignored.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_rejected_runnable(&:Runnable->)-instance-method","name":"each_rejected_runnable","doc":"Yields runnables that were rejected.","summary":"Yields runnables that were rejected.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2897,"url":null},"def":{"name":"each_rejected_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@rejected.each do |runnable|\n yield runnable\nend"}},{"html_id":"queried_for_set:ResolutionSet-instance-method","name":"queried_for_set","doc":"Joins all *queried-for* accepted resolution sets of this response\ninto one large resolution set, and returns it.\n\nSee `AcceptionRoute` to learn about the difference between\n*queried-for* and *wished* routes of set acception.","summary":"Joins all queried-for accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2887,"url":null},"def":{"name":"queried_for_set","return_type":"ResolutionSet","visibility":"Public","body":"queried_for_set = ResolutionSet.new\n@accepted.each do |__temp_73|\n route, set = __temp_73\n if route.query?\n else\n next\n end\n queried_for_set.append(set)\nend\nqueried_for_set\n"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Returns whether this response is successful, in that it has no rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2864,"url":null},"def":{"name":"successful?","return_type":"Bool","visibility":"Public","body":"@rejected.empty?"}},{"html_id":"wishless?:Bool-instance-method","name":"wishless?","doc":"Returns `true` if this response does not \"wish\" to make any more\nqueries before its accepted sets can be inspected.","summary":"Returns true
if this response does not "wish" to make any more queries before its accepted sets can be inspected.
The resolution set was accepted due to a wish: some runnable out there "wished" that runnables from the set were there, and here they are.
"},{"id":"Query","name":"Query","value":"1","doc":"The resolution set was explicitly mentioned by the user\nsomewhere (queried for).","summary":"The resolution set was explicitly mentioned by the user somewhere (queried for).
"}],"namespace":{"html_id":"novika/Novika/Resolver/Response","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response"},"doc":"Represents the way a resolution set was accepted.","summary":"Represents the way a resolution set was accepted.
","instance_methods":[{"html_id":"query?-instance-method","name":"query?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2839,"url":null},"def":{"name":"query?","visibility":"Public","body":"self == Query"}},{"html_id":"wish?-instance-method","name":"wish?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2835,"url":null},"def":{"name":"wish?","visibility":"Public","body":"self == Wish"}}]}]},{"html_id":"novika/Novika/Resolver/ResponseRejectedError","path":"Novika/Resolver/ResponseRejectedError.html","kind":"class","full_name":"Novika::Resolver::ResponseRejectedError","name":"ResponseRejectedError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":109,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when there are rejected runnables in a response.","summary":"Raised when there are rejected runnables in a response.
","constructors":[{"html_id":"new(response:Response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Response"}],"args_string":"(response : Response)","args_html":"(response : Response)","location":{"filename":"src/novika/resolver.cr","line_number":113,"url":null},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Response"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"response:Novika::Resolver::Response-instance-method","name":"response","doc":"Returns the response which contains some rejected runnables.","summary":"Returns the response which contains some rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":111,"url":null},"def":{"name":"response","visibility":"Public","body":"@response"}}]},{"html_id":"novika/Novika/Resolver/Runnable","path":"Novika/Resolver/Runnable.html","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":919,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"subclasses":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableContainer","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of all runnables.\n\nThe main basic property of all runnables is that they can be\n*rewritten* into other runnables, oftentimes of a more specific\nkind. Additionally, runnable objects are the head of their history\nlinked list, allowing clients to observe how the runnable of\ninterest came to be.","summary":"Base class of all runnables.
","constructors":[{"html_id":"new(ancestor:Ancestor|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"args_string":"(ancestor : Ancestor | Nil = nil)","args_html":"(ancestor : Ancestor | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":959,"url":null},"def":{"name":"new","args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this runnable, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this runnable, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":957,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"ancestors:Array(Ancestor)-instance-method","name":"ancestors","doc":"Returns an array of ancestors of this runnable, starting from\nthe most recent ancestor and ending with the oldest one.","summary":"Returns an array of ancestors of this runnable, starting from the most recent ancestor and ending with the oldest one.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":976,"url":null},"def":{"name":"ancestors","return_type":"Array(Ancestor)","visibility":"Public","body":"ancestors = [] of Ancestor\neach_ancestor do |ancestor|\n ancestors << ancestor\nend\nancestors\n"}},{"html_id":"backtrace(io:IO,indent:Int32=0,annex:String|Nil=nil)-instance-method","name":"backtrace","doc":"Appends ancestors of this runnable (its \"history\") to *io*.\n\n*indent* can be used to specify the amount of whitespace\npreceding each line.\n\n*annex* is the additional bit of text displayed below the\nbacktrace. For instance, in case of an error, it can contain\nthe error message.","summary":"Appends ancestors of this runnable (its "history") to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"args_string":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","args_html":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":992,"url":null},"def":{"name":"backtrace","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"visibility":"Public","body":"backtrace = ancestors.reverse\nbacktrace << self\nio << \" ┬\\n\"\nws = \" \" * indent\nbacktrace.each do |runnable|\n (io << ws) << \"╿ in \"\n if runnable.is_a?(RunnableContainer)\n content = String.build do |inner|\n runnable.to_s(inner, lead: 0, indent: indent + 2)\n end\n skip = true\n content.each_line(chomp: true) do |line|\n if skip\n io.puts(line)\n skip = false\n next\n end\n ((io << \" │\") << line) << '\\n'\n end\n else\n (io << runnable) << '\\n'\n end\nend\nif annex\nelse\n return\nend\n((io << \" │\\n ╰┴─ \") << annex) << '\\n'\n"}},{"html_id":"backtrace(*args,**kwargs,&:IO->)-instance-method","name":"backtrace","doc":"Yields an `IO` where you can write the *annex*, otherwise the\nsame as `backtrace`.","summary":"Yields an IO
where you can write the annex, otherwise the same as #backtrace
.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1033,"url":null},"def":{"name":"constituents","return_type":"Array(Runnable)","visibility":"Public","body":"[self] of Runnable"}},{"html_id":"each_ancestor(&:Ancestor->)-instance-method","name":"each_ancestor","doc":"Yields ancestors of this runnable.\n\nBy tracing the ancestry of `self`, you are effectively exploring\nhow it came to be.","summary":"Yields ancestors of this runnable.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":966,"url":null},"def":{"name":"each_ancestor","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Ancestor ->)"},"visibility":"Public","body":"runnable = @ancestor\nwhile runnable\n yield runnable\n runnable = runnable.ancestor?\nend\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1044,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","path":"Novika/Resolver/Runnable/Ancestor.html","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":921,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a `Runnable` ancestor.","summary":"Represents a Runnable
ancestor.
Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":true,"location":{"filename":"src/novika/resolver.cr","line_number":924,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","path":"Novika/Resolver/Runnable/HasDatum.html","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum(T)","name":"HasDatum","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":944,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a runnable with datum of type *T*. This module assigns\nno intrinsic meaning to the word \"datum\" or to its value; includers\nare free to choose that, as well as the type *T*.\n\nThe only real consequence of including this module is that equality\nand hash methods will be defined. These methods will delegate\ncomparison/hashing to the datum(s) at hand.","summary":"Represents a runnable with datum of type T.
","instance_methods":[{"html_id":"==(other:T)-instance-method","name":"==","doc":"Returns whether the datum of this runnable is equal to *other*.","summary":"Returns whether the datum of this runnable is equal to other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"T"}],"args_string":"(other : T)","args_html":"(other : T)","location":{"filename":"src/novika/resolver.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"T"}],"visibility":"Public","body":"@datum == other"}},{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @datum == (other.@datum)\nelse\n return false\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @datum.hash(hasher)\nhasher\n"}}]},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","path":"Novika/Resolver/Runnable/Terminal.html","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":931,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a terminal (as in *terminate*) runnable, that is,\na runnable that cannot be rewritten any further.","summary":"Represents a terminal (as in terminate) runnable, that is, a runnable that cannot be rewritten any further.
","instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":932,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.append(self)"}}]}]},{"html_id":"novika/Novika/Resolver/RunnableCapability","path":"Novika/Resolver/RunnableCapability.html","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1116,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Capabilities represent the requirements of a Novika script, library,\nor application, regarding language features that are needed in order\nfor that script, library, or application to properly work.","summary":"Capabilities represent the requirements of a Novika script, library, or application, regarding language features that are needed in order for that script, library, or application to properly work.
","constructors":[{"html_id":"new(datum:String,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : String, ancestor = nil)","args_html":"(datum : String, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1122,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"description?(server:PermissionServer):String|Nil-instance-method","name":"description?","doc":"Returns a user-friendly description of this dependency, or nil\nif none can be given. The returned description should be suitable\nfor displaying to the user in a prompt, and should read well after\n\"which\", as in \"which [exposes this and that]\", \"which [allows\nthis and that]\", etc., where words in brackets are those of\nthe description.\n\n*server* is the server that will then use the description in\none way or another, in case it is present. You may also choose\nto derive the description with *server*'s help.","summary":"Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1144,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":"server.brief(self)"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1126,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1140,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"capability #{@datum.colorize.bold}\""}},{"html_id":"purpose(*,incaps:CapabilityCollection)-instance-method","name":"purpose","doc":"Returns the purpose of this capability in the given capability\ncollection *caps*.","summary":"Returns the purpose of this capability in the given capability collection caps.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"args_string":"(*, in caps : CapabilityCollection)","args_html":"(*, in caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":1150,"url":null},"def":{"name":"purpose","args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"splat_index":0,"visibility":"Public","body":"if cls = caps.get_capability_class?(@datum)\nelse\n raise(\"BUG: capability runnable for which there is no capability class\")\nend\ncls.purpose\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1132,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted capability\")\nend\n{envelope.abspath.to_s, @datum}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1165,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1171,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Capability[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableContainer","path":"Novika/Resolver/RunnableContainer.html","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2017,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable container is an *ordered*, arbitrarily *filtered*\ncollection of runnables - and a runnable itself. It holds and\nadvances (through rewriting) a *generation* of runnables.","summary":"A runnable container is an ordered, arbitrarily filtered collection of runnables - and a runnable itself.
","constructors":[{"html_id":"new(root:RunnableRoot,dir:Path,env:RunnableEnvironment,parent:RunnableContainer|Nil=nil,transparent:Bool=false,ancestor=nil)-class-method","name":"new","doc":"Initializes a new runnable container for the given *dir*ectory.\n\n*parent* is the parent runnable container. You don't normally need\nto specify it. Prefer to call `child` on the parent instead.\n\n*transparent* specifies whether the container is transparent,\nsee `transparent?`.","summary":"Initializes a new runnable container for the given directory.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","args_html":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":2049,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, dir, env, parent, transparent, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path of the directory of this container.","summary":"Returns the absolute path of the directory of this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2165,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @dir.absolute?\nelse\n raise(\"BUG: container dir path is not an absolute path\")\nend\n@dir\n"}},{"html_id":"allow?(warn=false,&filter:Runnable->Bool)-instance-method","name":"allow?","doc":"Introduces a *filter* for the constituent runnables of this\ncontainer. *filter* should decide whether to accept (true)\nor reject (false) a runnable.\n\n*warn* specifies whether the `RunnableIgnored` signal should be\nsent if *filter* rejects a runnable.","summary":"Introduces a filter for the constituent runnables of this container.
","abstract":false,"args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"args_string":"(warn = false, &filter : Runnable -> Bool)","args_html":"(warn = false, &filter : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2150,"url":null},"def":{"name":"allow?","args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"yields":1,"block_arity":1,"block_arg":{"name":"filter","external_name":"filter","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"push_filter(Filter.new(filter, warn))"}},{"html_id":"append(runnable:Runnable)-instance-method","name":"append","doc":"Inserts *runnable* after all other runnables in this container.","summary":"Inserts runnable after all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2108,"url":null},"def":{"name":"append","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables << runnable"}},{"html_id":"append(runnables:Array(Runnable))-instance-method","name":"append","doc":"Inserts the entire array of *runnables* after all other runnables\nin this container.","summary":"Inserts the entire array of runnables after all other runnables in this container.
","abstract":false,"args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"args_string":"(runnables : Array(Runnable))","args_html":"(runnables : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2114,"url":null},"def":{"name":"append","args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"visibility":"Public","body":"@runnables.concat(runnables)"}},{"html_id":"can_contain?(runnable:Runnable)-instance-method","name":"can_contain?","doc":"Returns whether this container's filters allow it to contain\nthe given *runnable*.","summary":"Returns whether this container's filters allow it to contain the given runnable.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2156,"url":null},"def":{"name":"can_contain?","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"each_filter do |filter|\n if filter.call(runnable)\n else\n return false\n end\nend\ntrue\n"}},{"html_id":"child(dir=@dir,ancestor=self,*,transparent:Bool)-instance-method","name":"child","doc":"Builds and returns a child of this container.\n\nOptionally, the *dir*ectory of the child can be provided.\nOtherwise, the directory of this container will be used.\n\nAdditionally, you can specify whether the child should be\n*transparent* (see `transparent?`).","summary":"Builds and returns a child of this container.
","abstract":false,"args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"args_string":"(dir = @dir, ancestor = self, *, transparent : Bool)","args_html":"(dir = @dir, ancestor = self, *, transparent : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2379,"url":null},"def":{"name":"child","args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"splat_index":2,"visibility":"Public","body":"RunnableContainer.new(@root, dir, env: @root.defenv(@root.disk.env?(dir)), parent: self, ancestor: ancestor, transparent: transparent)"}},{"html_id":"classify?(datum:Path,ancestor:Ancestor|Nil):Runnable|Nil-instance-method","name":"classify?","doc":"Creates a `RunnableDir`, `RunnableScript`, or `RunnableSharedObject`\ndepending on what *datum* points to and on its extension.\n\n*ancestor* is set as the ancestor of the created runnable.\n\nReturns nil if *datum* does not exist, or if there is no\nappropriate classification.","summary":"Creates a RunnableDir
, RunnableScript
, or RunnableSharedObject
depending on what datum points to and on its extension.
If datum is a capability, creates and returns an appropriate RunnableCapability
object.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2103,"url":null},"def":{"name":"constituents","visibility":"Public","body":"transparent? ? @runnables : super()"}},{"html_id":"each(&:Runnable->)-instance-method","name":"each","doc":"Yields constituent runnables.","summary":"Yields constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2135,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@runnables.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_path(fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"args_string":"(fn : Path -> )","args_html":"(fn : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2238,"url":null},"def":{"name":"each_path","args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"visibility":"Public","body":"@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n fn.call(runnable.abspath)\n runnable.each_path(fn)\n else\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableGroup)\n fn.call(runnable.abspath)\n end\n end\nend"}},{"html_id":"each_path(&fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2250,"url":null},"def":{"name":"each_path","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Path ->)"},"visibility":"Public","body":"each_path(fn)"}},{"html_id":"each_sorted_path(selector:GlobSelector,&:Path->)-instance-method","name":"each_sorted_path","doc":"Yields all paths matching *selector* in lexicographic order.\nThe paths are initially taken from the directory of this\ncontainer. See `Disk#glob` for details.","summary":"Yields all paths matching selector in lexicographic order.
","abstract":false,"args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"args_string":"(selector : GlobSelector, & : Path -> )","args_html":"(selector : GlobSelector, & : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2265,"url":null},"def":{"name":"each_sorted_path","args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Path ->)"},"visibility":"Public","body":"paths = [] of Path\n@root.disk.glob(@dir, selector) do |path|\n paths << path\nend\npaths.unstable_sort! do |a, b|\n a.to_s.compare(b.to_s, case_insensitive: true)\nend\npaths.each do |path|\n yield path\nend\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this container is empty, i.e., holds\nhas no constituent runnables.","summary":"Returns whether this container is empty, i.e., holds has no constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2125,"url":null},"def":{"name":"empty?","visibility":"Public","body":"@runnables.empty?"}},{"html_id":"env:Novika::Resolver::RunnableEnvironment-instance-method","name":"env","doc":"Returns the `RunnableEnvironment` assigned to this container.","summary":"Returns the RunnableEnvironment
assigned to this container.
Recursively replaces each runnable in this container with its #constituents
.
Returns whether env is this container's environment.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"args_string":"(env : RunnableEnvironment)","args_html":"(env : RunnableEnvironment)","location":{"filename":"src/novika/resolver.cr","line_number":2172,"url":null},"def":{"name":"from?","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"visibility":"Public","body":"@env == env"}},{"html_id":"includes?(other)-instance-method","name":"includes?","doc":"Returns whether this container includes the given *runnable*.","summary":"Returns whether this container includes the given runnable.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/resolver.cr","line_number":2130,"url":null},"def":{"name":"includes?","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"@runnables.includes?(other)"}},{"html_id":"paths-instance-method","name":"paths","doc":"Returns a set of *all* paths (file, directory, etc. paths) in\nthis container, including those in nested containers.","summary":"Returns a set of all paths (file, directory, etc.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2256,"url":null},"def":{"name":"paths","visibility":"Public","body":"paths = Set(Path).new\neach_path do |path|\n paths << path\nend\npaths\n"}},{"html_id":"prepend(runnable:Runnable)-instance-method","name":"prepend","doc":"Inserts *runnable* before all other runnables in this container.","summary":"Inserts runnable before all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2119,"url":null},"def":{"name":"prepend","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables.unshift(runnable)"}},{"html_id":"recursive_nonterminal_each(fn:Runnable,RunnableContainer->)-instance-method","name":"recursive_nonterminal_each","doc":"Calls *fn* with each nonterminal and the container it's from,\nrecurses into nested `RunnableContainer`s.","summary":"Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"args_string":"(fn : Runnable -> Bool)","args_html":"(fn : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2307,"url":null},"def":{"name":"recursive_select!","args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"visibility":"Public","body":"@runnables.select! do |runnable|\n fn.call(runnable)\nend\n@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n else\n next\n end\n runnable.recursive_select!(fn)\nend\n"}},{"html_id":"recursive_select!(&fn:Runnable->Bool)-instance-method","name":"recursive_select!","doc":"Accepts only those runnable in this container and in all nested\ncontainers for which *fn* returns true.\n\nRunnables for which *fn* returned false are mutably deleted.","summary":"Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2316,"url":null},"def":{"name":"recursive_select!","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"recursive_select!(fn)"}},{"html_id":"replace(pattern:Runnable,replacement:Runnable)-instance-method","name":"replace","doc":"Replaces *pattern* runnable with the *replacement* runnable\nin this container only (i.e., does not recurse).","summary":"Replaces pattern runnable with the replacement runnable in this container only (i.e., does not recurse).
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"args_string":"(pattern : Runnable, replacement : Runnable)","args_html":"(pattern : Runnable, replacement : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2281,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"visibility":"Public","body":"if can_contain?(replacement)\nelse\n return\nend\n@runnables.map! do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"replace(pattern:Runnable,replacement:Array(Runnable))-instance-method","name":"replace","doc":"Replaces *pattern* runnable with multiple *replacement* runnables\nin this container only (i.e. does not recurse). Their order will\nbe the same as that in *replacement*.\n\nRunnables from *replacement* that this container cannot contain\nare left out.","summary":"Replaces pattern runnable with multiple replacement runnables in this container only (i.e.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"args_string":"(pattern : Runnable, replacement : Array(Runnable))","args_html":"(pattern : Runnable, replacement : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2295,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"visibility":"Public","body":"replacement = replacement.select do |runnable|\n can_contain?(runnable)\nend\n@runnables = @runnables.flat_map do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"request(dependency:Resolution::Dependency)-instance-method","name":"request","doc":"Communicates with this container's environment permission\nserver in order to determine whether the use *dependency*\nshould be allowed to `self`.","summary":"Communicates with this container's environment permission server in order to determine whether the use dependency should be allowed to self
.
Rewrites this container until there is no point in doing so.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2430,"url":null},"def":{"name":"rewrite","visibility":"Public","body":"begin\n @root.down(caller: (@ancestor.as?(Runnable)) || self)\n loop do\n previous = @runnables\n @runnables = [] of Runnable\n previous.each(&.specialize(@root, container: self))\n apply_filters!\n if previous == @runnables\n break\n end\n end\nensure\n @root.up\nend"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":2478,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if empty?\n return\nend\nrewrite\ncontainer.append(self)\n"}},{"html_id":"thorough_rewrite-instance-method","name":"thorough_rewrite","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2454,"url":null},"def":{"name":"thorough_rewrite","visibility":"Public","body":"@dir_rewrite = true\nrewrite\n@dir_rewrite = false\nif abspath = @env.abspath?\nelse\n return\nend\nrecursive_nonterminal_map! do |nonterminal, container|\n if container.from?(@env)\n else\n next nonterminal\n end\n child = container.child(abspath, transparent: true)\n child.append(nonterminal)\n child.rewrite\n child\nend\nrewrite\n"}},{"html_id":"to_resolution_set(*,deps=Set(Resolution::Dependency).new,set=ResolutionSet.new)-instance-method","name":"to_resolution_set","doc":"Builds and returns a `ResolutionSet` with resolutions from\nthis container and all nested containers.\n\nYou must call this after `flatten!`. Otherwise, the resulting\n`ResolutionSet` will be underpopulated with dependencies due\nto transparent containers standing in the way.\n\n*deps* is a set of dependencies that *all* resolutions in the\nresulting set should have, regardless of nesting. *Beware that\nit is mutated.*","summary":"Builds and returns a ResolutionSet
with resolutions from this container and all nested containers.
Returns whether this container is transparent.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2037,"url":null},"def":{"name":"transparent?","return_type":"Bool","visibility":"Public","body":"@transparent"}}]},{"html_id":"novika/Novika/Resolver/RunnableDir","path":"Novika/Resolver/RunnableDir.html","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1279,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a directory in the file system. At this point it is still\nunknown whether the directory is a Novika library, application, or\nsimply that - a directory.\n\nRunnable directories get rewritten to `RunnableGroup`s, which are\naware of the presence or absence of manifest(s); and therefore,\nit is `RunnableGroup`s that know whether they are an app, lib,\nor simply a directory.","summary":"Represents a directory in the file system.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1282,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1286,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"group = RunnableGroup.allocate\nmanifest = Manifest.find(root.disk, @datum, ancestor: group)\ngroup.initialize(@datum, manifest, ancestor: @ancestor)\ncontainer.append(group)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1293,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Dir[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableEnvironment","path":"Novika/Resolver/RunnableEnvironment.html","kind":"class","full_name":"Novika::Resolver::RunnableEnvironment","name":"RunnableEnvironment","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1903,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika environment.","summary":"Represents a Novika environment.
","constructors":[{"html_id":"new(root:RunnableRoot,abspath:Path|Nil)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"args_string":"(root : RunnableRoot, abspath : Path | Nil)","args_html":"(root : RunnableRoot, abspath : Path | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1919,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, abspath)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(path:Path)-instance-method","name":"==","doc":"Returns whether *path* points to this environment's directory.","summary":"Returns whether path points to this environment's directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path)","args_html":"(path : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2006,"url":null},"def":{"name":"==","args":[{"name":"path","external_name":"path","restriction":"Path"}],"visibility":"Public","body":"@abspath == path"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if (value = @abspath).nil?\n ::raise(NilAssertionError.new(\"Novika::Resolver::RunnableEnvironment#abspath cannot be nil\"))\nelse\n value\nend"}},{"html_id":"abspath?:Path?-instance-method","name":"abspath?","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath?","visibility":"Public","body":"@abspath"}},{"html_id":"brief(dependency:Resolution::Dependency)-instance-method","name":"brief","doc":"Returns a brief description of *dependency* as per this environment.","summary":"Returns a brief description of dependency as per this environment.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency)","args_html":"(dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":1988,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"dependency.purpose(in: capabilities)"}},{"html_id":"capability?(datum:String):Bool-instance-method","name":"capability?","doc":"Returns whether *datum* is a capability in this environment's\ncapability collection.","summary":"Returns whether datum is a capability in this environment's capability collection.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"String"}],"args_string":"(datum : String) : Bool","args_html":"(datum : String) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1950,"url":null},"def":{"name":"capability?","args":[{"name":"datum","external_name":"datum","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"capabilities.has_capability?(datum)"}},{"html_id":"designate(set:ResolutionSet):Designation-instance-method","name":"designate","doc":"Creates and returns a `Designation` for this environment to\nhandle the given resolution *set*.","summary":"Creates and returns a Designation
for this environment to handle the given resolution set.
Expands datum in this environment's directory.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"args_string":"(datum : Path) : Path | Nil","args_html":"(datum : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1941,"url":null},"def":{"name":"expand?","args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif info = @root.disk.info?(abspath.expand(datum))\nelse\n return\nend\ninfo.path\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"includes?(path:Path):Bool-instance-method","name":"includes?","doc":"Returns whether *path* is part of this environment's subtree,\ni.e. is this environment directory's direct or indirect child.","summary":"Returns whether path is part of this environment's subtree, i.e.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Bool","args_html":"(path : Path) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1994,"url":null},"def":{"name":"includes?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Bool","visibility":"Public","body":"if abspath = @abspath\nelse\n return false\nend\nif abspath == path\n return true\nend\npath.each_parent do |parent|\n if parent == abspath\n return true\n end\nend\nfalse\n"}},{"html_id":"permissions(&:IO->)-instance-method","name":"permissions","doc":"Yields writable `IO` for the content of this environment's\npermissions file. Creates the latter if necessary. Previous\ncontent of the permissions file is cleared.","summary":"Yields writable IO
for the content of this environment's permissions file.
Returns the content of the permissions file of this environment followed by the file's path; or nil if the permissions file does not exist.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1963,"url":null},"def":{"name":"permissions?","return_type":"::Tuple(String, Path) | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif path = @root.disk.file?(abspath / PERMISSIONS_FILENAME)\nelse\n return\nend\n{@root.disk.read(path), path}\n"}},{"html_id":"request(dependency:Resolution::Dependency,forcontainer:RunnableContainer)-instance-method","name":"request","doc":"Emits a dependency request (see `Resolution::Dependency#request`)\nto the permission server of this environment.","summary":"Emits a dependency request (see Resolution::Dependency#request
) to the permission server of this environment.
Raised when there is an error during runnable resolution.
","constructors":[{"html_id":"new(message,runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(message, runnable : Runnable)","args_html":"(message, runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":104,"url":null},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message, runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"runnable:Novika::Resolver::Runnable-instance-method","name":"runnable","doc":"Returns the runnable which is assumed to be the source of\nthis error.","summary":"Returns the runnable which is assumed to be the source of this error.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":102,"url":null},"def":{"name":"runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableGroup","path":"Novika/Resolver/RunnableGroup.html","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1835,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable group is a directory with or without a manifest: that is,\na directory with awareness of whether it is an application, library,\nor simply that - a directory.\n\nRunnable groups, through manifests, are directories with a specific\nrunnable *layout*.\n\nRunnable groups are rewritten to properly ordered (laid out)\n`RunnableContainer`s.\n\nNow to the important bit: since there is never a guaranteed\nlink between a runnable group and the container it was/will\nbe rewritten to, you should manually register it with\n`RunnableRoot#assign` if you ever want the container to *run*.","summary":"A runnable group is a directory with or without a manifest: that is, a directory with awareness of whether it is an application, library, or simply that - a directory.
","constructors":[{"html_id":"new(datum:Path,manifest:Manifest,ancestor=nil)-class-method","name":"new","doc":"Creates a new runnable group.\n\n*manifest* is the manifest of this group. Manifests control\nthe order of runnables in this group.\n\n*datum* is a *normalized* path to the group (a directory).","summary":"Creates a new runnable group.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, manifest : Manifest, ancestor = nil)","args_html":"(datum : Path, manifest : Manifest, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1844,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, manifest, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns an absolute path to this group.","summary":"Returns an absolute path to this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1874,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: group datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"app?:Bool-instance-method","name":"app?","doc":"Returns whether this group represents an app (is laid out\naccording to a '.nk.app' manifest).","summary":"Returns whether this group represents an app (is laid out according to a '.nk.app' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1850,"url":null},"def":{"name":"app?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::App)"}},{"html_id":"entry_name:String-instance-method","name":"entry_name","doc":"Constructs and returns entry filename for this group.\n\nFor instance, if this group's directory is '/path/to/foo', then\nits entry filename will be 'foo.nk'.","summary":"Constructs and returns entry filename for this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1869,"url":null},"def":{"name":"entry_name","return_type":"String","visibility":"Public","body":"\"#{name}.nk\""}},{"html_id":"lib?:Bool-instance-method","name":"lib?","doc":"Returns whether this group represents a lib (is laid out\naccording to a '.nk.lib' manifest).","summary":"Returns whether this group represents a lib (is laid out according to a '.nk.lib' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1856,"url":null},"def":{"name":"lib?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::Lib)"}},{"html_id":"name:String-instance-method","name":"name","doc":"Returns the name of this group.","summary":"Returns the name of this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1861,"url":null},"def":{"name":"name","return_type":"String","visibility":"Public","body":"@datum.stem"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1880,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"child = container.child(@datum, transparent: true, ancestor: self)\ncontainer.append(child)\n@manifest.populate(root, child, origin: self)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1890,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"case\nwhen app?\n io << \"App\"\nwhen lib?\n io << \"Lib\"\nelse\n io << \"Group\"\nend\n((io << \"[\") << @datum) << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableIgnored","path":"Novika/Resolver/RunnableIgnored.html","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Lets signal receivers acknowledge that a runnable was ignored.","summary":"Lets signal receivers acknowledge that a runnable was ignored.
","constructors":[{"html_id":"new(runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"new","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@runnable.clone)"}},{"html_id":"copy_with(runnable_runnable=@runnable)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"args_string":"(runnable _runnable = @runnable)","args_html":"(runnable _runnable = @runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"copy_with","args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"visibility":"Public","body":"self.class.new(_runnable)"}},{"html_id":"runnable:Runnable-instance-method","name":"runnable","abstract":false,"def":{"name":"runnable","return_type":"Runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableQuery","path":"Novika/Resolver/RunnableQuery.html","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1051,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable queries are one of the most generic kinds of runnables.\nThey specialize themselves through `RunnableContainer#classify?`.","summary":"Runnable queries are one of the most generic kinds of runnables.
","constructors":[{"html_id":"new(datum:Path|String,ancestor=nil,else:Runnable|Nil=self)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"args_string":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","args_html":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","location":{"filename":"src/novika/resolver.cr","line_number":1054,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor, else)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1058,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if runnable = container.classify?(@datum, ancestor: self)\n container.append(runnable)\n return\nend\nif alt = @else\nelse\n return\nend\ncontainer.append(alt)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1069,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Query[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableRoot","path":"Novika/Resolver/RunnableRoot.html","kind":"class","full_name":"Novika::Resolver::RunnableRoot","name":"RunnableRoot","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2516,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable root is available to all containers, and therefore allows\nany runnable to escape deep nesting if need be.\n\nRunnable root stores a pointer to the `Disk` object, used throughout\nthe resolver to cache file system requests (the resolver is quite\nample in making them). It also stores the set of flags, which help\nmaking OS-specific decisions using flag conditions in manifests.\n\nAdditionally, runnable root allows runnables to `wish` queries\nto be resolved later, as requirements, and to talk to each other\nvia `Signal`s and the `SignalReceiver` interface (see `send`).\n\nThere's a lot more, but that's the gist.","summary":"Runnable root is available to all containers, and therefore allows any runnable to escape deep nesting if need be.
","constructors":[{"html_id":"new(disk:Disk,cwd:Path)-class-method","name":"new","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"args_string":"(disk : Disk, cwd : Path)","args_html":"(disk : Disk, cwd : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2525,"url":null},"def":{"name":"new","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"visibility":"Public","body":"_ = allocate\n_.initialize(disk, cwd)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"assign(group:RunnableGroup,*,container:RunnableContainer,overwrite=true):RunnableContainer-instance-method","name":"assign","doc":"Assigns *container* to the given *group*.\n\nThis is the only way someone from the outside can (reliably)\nget the container of a group.\n\n*overwrite* specifies whether the existing container for *group*\nshould be overwritten with *container*.\n\nReturns the container that was assigned to *group*.","summary":"Assigns container to the given group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"args_string":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","args_html":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2606,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"splat_index":1,"return_type":"RunnableContainer","visibility":"Public","body":"if overwrite\n @containers[group] = container\nelse\n @containers.put_if_absent(group, container)\nend"}},{"html_id":"assign(group:RunnableGroup,*,preamble:String)-instance-method","name":"assign","doc":"Assigns *preamble* to the given runnable *group*.","summary":"Assigns preamble to the given runnable group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(group : RunnableGroup, *, preamble : String)","args_html":"(group : RunnableGroup, *, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":2615,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"@preambles[group] = preamble"}},{"html_id":"containerof(group:RunnableGroup):RunnableContainer-instance-method","name":"containerof","doc":"Returns the container assigned to *group*.\n\nRaises if *group* is neither an application nor a library.","summary":"Returns the container assigned to group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer","args_html":"(group : RunnableGroup) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2622,"url":null},"def":{"name":"containerof","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer","visibility":"Public","body":"(containerof?(group)) || (raise(\"BUG: container was not assigned to #{group}\"))"}},{"html_id":"containerof?(group:RunnableGroup):RunnableContainer|Nil-instance-method","name":"containerof?","doc":"Returns the container of an application or library *group*, or\nnil if *group* is neither an application nor a library.","summary":"Returns the container of an application or library group, or nil if group is neither an application nor a library.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer | Nil","args_html":"(group : RunnableGroup) : RunnableContainer | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2628,"url":null},"def":{"name":"containerof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer | ::Nil","visibility":"Public","body":"@containers[group]?"}},{"html_id":"cwd:Path-instance-method","name":"cwd","doc":"Returns the user's current working directory. It is also\nsometimes referred to as the \"primary origin\", \"origin\" as\nin \"primary origin (source) of files\".","summary":"Returns the user's current working directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2523,"url":null},"def":{"name":"cwd","visibility":"Public","body":"@cwd"}},{"html_id":"default_env:RunnableEnvironment-instance-method","name":"default_env","doc":"Returns the default runnable environment.\n\nCurrently, current working directory environment is used as the\ndefault runnable environment.\n\nNote that if the current working directory does not have an\nenvironment, a \"virtual\", pathless environment is returned\n(see `defenv`).","summary":"Returns the default runnable environment.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2590,"url":null},"def":{"name":"default_env","return_type":"RunnableEnvironment","visibility":"Public","body":"@envs[nil]"}},{"html_id":"defenv(path:Path|Nil)-instance-method","name":"defenv","doc":"Returns the `RunnableEnvironment` for *path*, creating one if\nit does not exist.\n\nNote that *path* can be nil, which means the created/returned\nenvironment will be so to speak \"virtual\". The only difference\nbeing the \"virtual\" environment's response to disk-related\nquestions. Namely it'll answer does-not-exist (or something\nlike that) to any disk-related question.\n\nNote also, that only one pathless environment can ever created;\nas a consequence, all runnable containers that have no environments\nwill share one pathless runnable environment.","summary":"Returns the RunnableEnvironment
for path, creating one if it does not exist.
Marks query as explicit ("hand-written") within this runnable root.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2558,"url":null},"def":{"name":"defexplicit","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@explicit)\n return\nend\n@explicit << query\n"}},{"html_id":"disk:Novika::Resolver::Disk-instance-method","name":"disk","doc":"Returns the disk used by this runnable root.","summary":"Returns the disk used by this runnable root.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2518,"url":null},"def":{"name":"disk","visibility":"Public","body":"@disk"}},{"html_id":"each_set_flag(&:String->)-instance-method","name":"each_set_flag","doc":"Yields all set (true) flags.","summary":"Yields all set (true) flags.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2708,"url":null},"def":{"name":"each_set_flag","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(String ->)"},"visibility":"Public","body":"@flags.each do |flag|\n yield flag\nend"}},{"html_id":"each_wish(&:RunnableQuery->)-instance-method","name":"each_wish","doc":"Yields queries from this runnable root's wishlist of queries.\n\nSee `wish`.","summary":"Yields queries from this runnable root's wishlist of queries.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2550,"url":null},"def":{"name":"each_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishes.each do |wish|\n yield wish\nend"}},{"html_id":"new_primary_container:RunnableContainer-instance-method","name":"new_primary_container","doc":"Creates and returns a new primary `RunnableContainer`.","summary":"Creates and returns a new primary RunnableContainer
.
Returns the preamble of group, or nil if it has none.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : String | Nil","args_html":"(group : RunnableGroup) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2633,"url":null},"def":{"name":"preambleof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"String | ::Nil","visibility":"Public","body":"@preambles[group]?"}},{"html_id":"send(signal:Signal)-instance-method","name":"send","doc":"Sends *signal* to all `SignalReceiver`s subscribed to this\nrunnable root.","summary":"Sends signal to all SignalReceiver
s subscribed to this runnable root.
Creates and returns a permission server in the given runnable environment env and capability collection caps.
","abstract":false,"args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"args_string":"(to env : RunnableEnvironment) : PermissionServer","args_html":"(to env : RunnableEnvironment) : PermissionServer","location":{"filename":"src/novika/resolver.cr","line_number":2662,"url":null},"def":{"name":"serve_permissions","args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"return_type":"PermissionServer","visibility":"Public","body":"(PermissionServer.new(env, @explicit)).tap do |server|\n subscribe(server)\nend"}},{"html_id":"set_flag(name:String,state:Bool)-instance-method","name":"set_flag","doc":"Assigns *state* to a boolean flag with the given *name*.\n\nNote that by design, an unset flag is a false flag, and\nvice versa: if *state* is false, the flag is either not\ncreated, or removed.\n\n```\nroot.set_flag(\"happy\", true)\nroot.set_flag(\"sad\", false)\n```","summary":"Assigns state to a boolean flag with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"args_string":"(name : String, state : Bool)","args_html":"(name : String, state : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2694,"url":null},"def":{"name":"set_flag","args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"visibility":"Public","body":"if state\n @flags << name\n return\nend\nif name.in?(@flags)\n @flags.delete(name)\nend\n"}},{"html_id":"subscribe(receiver:SignalReceiver)-instance-method","name":"subscribe","doc":"Subscribes *receiver* to this runnable root.","summary":"Subscribes receiver to this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2640,"url":null},"def":{"name":"subscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers << receiver"}},{"html_id":"unsubscribe(receiver:SignalReceiver)-instance-method","name":"unsubscribe","doc":"Unsubscribes *receiver* from this runnable root.","summary":"Unsubscribes receiver from this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2645,"url":null},"def":{"name":"unsubscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers.delete(receiver)"}},{"html_id":"wish(query:RunnableQuery)-instance-method","name":"wish","doc":"Appends *query* to the wishlist of this runnable root (the\nwishlist is like \"outbound queries\" or \"preload requests\").\n\nWishes are picked up from the wishlist by outer infrastructure\nand loaded distinctly. The only guarantee is that they will\nindeed be *pre*loaded relative to the query that made the wish,\nmeaning loaded some time before it.\n\nDoes nothing if *query* is already in the wishlist.","summary":"Appends query to the wishlist of this runnable root (the wishlist is like "outbound queries" or "preload requests").
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2541,"url":null},"def":{"name":"wish","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@wishes)\n return\nend\n@wishes << query\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableScript","path":"Novika/Resolver/RunnableScript.html","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".nk\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika script, specifically a '.nk' file.","summary":"Represents a Novika script, specifically a '.nk' file.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1251,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path to this script.","summary":"Returns the absolute path to this script.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1256,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: script datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1262,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << \"Script[\") << @datum\neach_ancestor do |ancestor|\n (io << \" ← \") << ancestor\nend\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableSelector","path":"Novika/Resolver/RunnableSelector.html","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1076,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selectors match, and are rewritten to, file system entries in the\ndirectory of the container that is doing the rewriting.","summary":"Selectors match, and are rewritten to, file system entries in the directory of the container that is doing the rewriting.
","constructors":[{"html_id":"new(datum:Novika::Resolver::GlobSelector,reject:Set(String)=Set(String).new,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","args_html":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1079,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, reject, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1083,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.each_sorted_path(@datum) do |path|\n basename = path.basename\n if basename.in?(@reject)\n next\n end\n if basename.starts_with?('_')\n next\n end\n case @datum\n in .scripts?\n if path.extension == RunnableScript::EXTENSION\n else\n next\n end\n runnable = RunnableScript.new(path, ancestor: self)\n in .directories?\n runnable = RunnableDir.new(path, ancestor: self)\n if basename == \"core\"\n container.prepend(runnable)\n next\n end\n end\n container.append(runnable)\nend"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1108,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"Forall[\") << @datum) << \" ∉ {\") << (@reject.join(','))) << \"}]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","path":"Novika/Resolver/RunnableSharedObject.html","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1178,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".so\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable representation of a shared object. Shared objects are\naccessed via FFI Novika-side.","summary":"Runnable representation of a shared object.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1194,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1208,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"id-instance-method","name":"id","doc":"Returns the id of this shared object.\n\nThe id is made by taking the stem of the path to the object and\nstripping it of the lib prefix, if it has one. For example, given\n`/lib/libmath.so` or `/lib/math.so`, the id would be `math` in\nboth cases.","summary":"Returns the id of this shared object.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1204,"url":null},"def":{"name":"id","visibility":"Public","body":"@datum.stem.lchop(\"lib\")"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1222,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"shared object #{@datum.colorize.bold}\""}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1214,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted shared object\")\nend\n{envelope.abspath.to_s, @datum.to_s}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1233,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"SharedObject[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/ScriptsSlot","path":"Novika/Resolver/ScriptsSlot.html","kind":"class","full_name":"Novika::Resolver::ScriptsSlot","name":"ScriptsSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1336,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts\" in the container's directory, represented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts" in the container's directory, represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1337,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\nroot.disk.glob(manifest.directory, GlobSelector::Scripts) do |datum|\n if datum.in?(mentioned)\n next\n end\n content.append(RunnableScript.new(datum, ancestor: self))\nend\ncontainer.replace(self, content)\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1361,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[*]\""}}]},{"html_id":"novika/Novika/Resolver/Session","path":"Novika/Resolver/Session.html","kind":"class","full_name":"Novika::Resolver::Session","name":"Session","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A resolver session interacts with a `RunnableRoot` in a way that\nallows you to *query*. Querying is done by `push`ing some queries,\nand then `pop`ping them \"into\" a `Response` object which you should\ncreate beforehand, and which you own.\n\n```\nsession = Resolver::Session.new(root)\nsession.push(\"foo\")\nsession.push(\"bar\")\nsession.push(\"baz\")\n\nresponse1 = Resolver::Response.new\nsession.pop(response1)\n\n# Re-use the same session. Queries were popped, so the session\n# is clean.\nsession.push(\"xyzzy\")\nsession.push(\"byzzy\")\n\nresponse2 = Resolver::Response.new\nsession.pop(response2)\n\n# Run the accepted stuff from the responses...\nresponse1.accepted_set.each_designation(root, &.run)\nresponse2.accepted_set.each_designation(root, &.run)\n```","summary":"A resolver session interacts with a RunnableRoot
in a way that allows you to query.
Yields only those queries from the query list that were marked as explicit.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2999,"url":null},"def":{"name":"each_explicit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@explicit.each do |query|\n yield query\nend"}},{"html_id":"each_query(&:RunnableQuery->)-instance-method","name":"each_query","doc":"Yields all queries from the query list.","summary":"Yields all queries from the query list.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3006,"url":null},"def":{"name":"each_query","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@queries.each do |query|\n yield query\nend"}},{"html_id":"on_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2981,"url":null},"def":{"name":"on_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"on_container_rewritten(callback)"}},{"html_id":"on_container_rewritten(callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"args_string":"(callback : RunnableContainer -> )","args_html":"(callback : RunnableContainer -> )","location":{"filename":"src/novika/resolver.cr","line_number":2986,"url":null},"def":{"name":"on_container_rewritten","args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"visibility":"Public","body":"@on_container_rewritten << callback"}},{"html_id":"pop(response:Response):ResolutionSet-instance-method","name":"pop","doc":"Resolves the list of queries that were `push`ed, returns the single\nresolution set comprised of resolutions for those queries that\nwere accepted by the resolver.\n\nAlso fills *response*, see `Response` for what you can get out of it.","summary":"Resolves the list of queries that were #push
ed, returns the single resolution set comprised of resolutions for those queries that were accepted by the resolver.
Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : RunnableQuery, explicit = false)","args_html":"(query : RunnableQuery, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3013,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries << query\nif explicit\n @explicit << query\nend\n"}},{"html_id":"push(query:Query,explicit=false)-instance-method","name":"push","doc":"Appends *query* to the list of queries to be resolved during\nthis session; allows to mark it as *explicit* (\"hand-written\")\nif necessary.","summary":"Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : Query, explicit = false)","args_html":"(query : Query, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3019,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(RunnableQuery.new(query), explicit)"}},{"html_id":"push(queries:Array(RunnableQuery),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(RunnableQuery), explicit = false)","args_html":"(queries : Array(RunnableQuery), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3026,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries.concat(queries)\nif explicit\n @explicit.concat(queries)\nend\n"}},{"html_id":"push(queries:Array(Query)|Array(String)|Array(Path),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","args_html":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3032,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(queries.map do |query|\n RunnableQuery.new(query)\nend, explicit)"}}]},{"html_id":"novika/Novika/Resolver/Signal","path":"Novika/Resolver/Signal.html","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":57,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/DoDiskLoad","kind":"struct","full_name":"Novika::Resolver::DoDiskLoad","name":"DoDiskLoad"},{"html_id":"novika/Novika/Resolver/DoDiskSave","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave"},{"html_id":"novika/Novika/Resolver/RunnableIgnored","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored"},{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"},{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of signals received by `SignalReceiver`s","summary":"Base class of signals received by SignalReceiver
s
SignalReceiver
s can receive signals sent by the RunnableRoot
.
Receives and reacts to a signal sent by RunnableRoot
.
Base class of ScriptsSlot
(known to the user as *
), SubtreeSlot
(known to the user as **
), and ChildSlot
(<>
).
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1325,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/SubtreeSlot","path":"Novika/Resolver/SubtreeSlot.html","kind":"class","full_name":"Novika::Resolver::SubtreeSlot","name":"SubtreeSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1370,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts and directories in the subtree (recursively),\nexcept for Novika application and library directories\",\nrepresented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts and directories in the subtree (recursively), except for Novika application and library directories", represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1371,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\ncontent.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.replace(self, content)\nmanifest.layout(content, group)\ncontent.rewrite\ncontent.recursive_select! do |runnable|\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableContainer)\n else\n next false\n end\n !(runnable.abspath.in?(mentioned))\nend\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1416,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[**]\""}}]},{"html_id":"novika/Novika/Resolver/ToAnswerDo","path":"Novika/Resolver/ToAnswerDo.html","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":80,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to answer a question, gives them\na Proc which will allow them to do that.","summary":"If signal receivers want to answer a question, gives them a Proc which will allow them to do that.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAnswerDo/Fn","path":"Novika/Resolver/ToAnswerDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAnswerDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":81,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, Nil)","aliased_html":"String -> Nil","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"}}]},{"html_id":"novika/Novika/Resolver/ToAskDo","path":"Novika/Resolver/ToAskDo.html","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":74,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to ask a question, gives them\na Proc which will do that and return a string answer, or\nnil if the user discarded the question.","summary":"If signal receivers want to ask a question, gives them a Proc which will do that and return a string answer, or nil if the user discarded the question.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAskDo/Fn","path":"Novika/Resolver/ToAskDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAskDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":75,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, (String | Nil))","aliased_html":"String -> String?","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}}]}]},{"html_id":"novika/Novika/RunnableResolver","path":"Novika/RunnableResolver.html","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3095,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A very high-level interface to the Novika resolver. Designed as one-\nshot, meaning you shouldn't reuse the same object twice or call\n`resolve?` twice. In this regard, as a protection, calling `resolve?`\ntwice will raise.\n\nSee `Session` and `Response` if you want a lower-level interface.\n\n```\nresolver = Novika::RunnableResolver.new(cwd: Path[Dir.current], args: [\"repl\"])\n\n# Define 'gets' and 'print' to ask for permissions.\n\nresolver.on_permissions_gets do |string|\n print string\n gets\nend\n\nresolver.on_permissions_print do |string|\n print string\nend\n\n# Run \"repl\" and everything it requested.\n\nresolver.after_permissions(&.run)\nresolver.resolve?\n```","summary":"A very high-level interface to the Novika resolver.
","constructors":[{"html_id":"new(cwd:Path,args:Array(Query))-class-method","name":"new","doc":"Creates a new resolver for the given current working directory\n*cwd* and query arguments *args*.\n\nSee `RunnableResolver`.","summary":"Creates a new resolver for the given current working directory cwd and query arguments args.
","abstract":false,"args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"args_string":"(cwd : Path, args : Array(Query))","args_html":"(cwd : Path, args : Array(Query))","location":{"filename":"src/novika/resolver.cr","line_number":3166,"url":null},"def":{"name":"new","args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(cwd, args)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"after_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"after_container_rewritten","doc":"Called when some container under this resolver was thoroughly rewritten.\n\nYou'll have to do additional checks to figure out where the\ncontainer came from. This is mainly an inspection method.","summary":"Called when some container under this resolver was thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3210,"url":null},"def":{"name":"after_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"@session.on_container_rewritten(callback)"}},{"html_id":"after_permissions(&callback:PermissionsHook->)-instance-method","name":"after_permissions","doc":"Registers *callback* to run after a valid Novika program is formed,\nand permissions are given.","summary":"Registers callback to run after a valid Novika program is formed, and permissions are given.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3245,"url":null},"def":{"name":"after_permissions","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(PermissionsHook ->)"},"visibility":"Public","body":"@after_permissions << callback"}},{"html_id":"after_program(&callback:ProgramHook->)-instance-method","name":"after_program","doc":"Registers *callback* to run after a valid Novika program is formed.\nSee `ProgramHook` to learn what is considered a Novika program.","summary":"Registers callback to run after a valid Novika program is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3231,"url":null},"def":{"name":"after_program","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ProgramHook ->)"},"visibility":"Public","body":"@after_program << callback"}},{"html_id":"after_response(&callback:ResponseHook->)-instance-method","name":"after_response","doc":"Registers *callback* to run after a valid response is formed.","summary":"Registers callback to run after a valid response is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3217,"url":null},"def":{"name":"after_response","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ResponseHook ->)"},"visibility":"Public","body":"@after_response << callback"}},{"html_id":"argument?(query:RunnableQuery)-instance-method","name":"argument?","doc":"Returns whether *query* was passed as an argument to this resolver.","summary":"Returns whether query was passed as an argument to this resolver.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":3193,"url":null},"def":{"name":"argument?","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"@args.any?(&.same?(query))"}},{"html_id":"on_permissions_gets(&on_permissions_gets:String->String|Nil)-instance-method","name":"on_permissions_gets","doc":"Registers a handler for permissions `gets`. Overrides the previous\nhandler, if any.","summary":"Registers a handler for permissions gets
.
Registers a handler for permissions print
.
Performs resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3296,"url":null},"def":{"name":"resolve?","return_type":"Bool","visibility":"Public","body":"if @resolved\n raise(\"BUG: attempt to RunnableResolver#resolve? twice\")\nend\nif @args.empty?\n manifest = Manifest.find(@root.disk, @cwd)\n if resolve_cwd?(manifest)\n else\n return false\n end\nelse\n sched?(@args, explicit: true)\nend\nif @response.successful?\nelse\n raise(ResponseRejectedError.new(@response))\nend\non_response(@response)\nprogram = @response.accepted_set\napps = program.unique_apps\nif apps.size > 1\n raise(MoreThanOneAppError.new(apps))\nend\non_program(program)\n@root.send(DoDiskLoad.new)\n@root.send(ToAskDo.new(@on_permissions_gets))\n@root.send(ToAnswerDo.new(@on_permissions_print))\nprogram.each_unique_dependency_with_dependents do |dependency, dependents|\n skiplist = Set(Resolution).new\n visited = Set(RunnableGroup).new\n dependents.each_group do |group, resolution|\n if group.app? || group.lib?\n else\n next\n end\n if group.in?(visited)\n skiplist << resolution\n next\n end\n container = @root.containerof(group)\n container.request(dependency)\n visited << group\n skiplist << resolution\n end\n dependents.each do |resolution|\n if resolution.in?(skiplist)\n next\n end\n resolution.each_dependency(&.allow)\n end\nend\n@root.send(DoDiskSave.new)\non_permissions(program)\n@resolved = true\ntrue\n"}}],"types":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","path":"Novika/RunnableResolver/PermissionsHook.html","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook","abstract":false,"superclass":{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},"ancestors":[{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"Same as `ProgramHook` but also allows you to run the program.","summary":"Same as ProgramHook
but also allows you to run the program.
Returns the list of designations in the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3145,"url":null},"def":{"name":"designations","return_type":"Array(Designation)","visibility":"Public","body":"designations = [] of Designation\n@program.each_designation(@root) do |designation|\n designations << designation\nend\ndesignations\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the program.","summary":"Runs the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3154,"url":null},"def":{"name":"run","visibility":"Public","body":"@program.each_designation(@root, &.run)"}}]},{"html_id":"novika/Novika/RunnableResolver/ProgramHook","path":"Novika/RunnableResolver/ProgramHook.html","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3127,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook"}],"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"An object that helps you do high-level things with a `ResolutionSet`\nfor the entire *program*.\n\nA Novika program is basically a collection of properly arranged\nNovika scripts. This is represented by a single `ResolutionSet`,\nwhich is an ordered set. It being a set means that you cannot\nexecute a single script twice in one session of the resolver,\nthat is, globally.","summary":"An object that helps you do high-level things with a ResolutionSet
for the entire program.
Makes and yields designations for the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3137,"url":null},"def":{"name":"each_designation","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"@program.each_designation(@root) do |designation|\n yield designation\nend"}},{"html_id":"program:Novika::Resolver::ResolutionSet-instance-method","name":"program","doc":"Returns the program `ResolutionSet`.","summary":"Returns the program ResolutionSet
.
An object that helps you do high-level things with a Response
.
Yields preambles of apps and libs that were queried for in arguments to RunnableResolver#new
specifically, followed by their corresponding runnable groups.
Returns the Response
object.
Marks this object as schedulable in Engine
.
Safe #schedule
.
Unsafe #schedule
.
The includer should be a Form
.
Scissors deal with cutting a source string into fragments, known as unclassified forms.
","class_methods":[{"html_id":"cut(source:String,&:Int32,Int32,Int32|Nil->)-class-method","name":"cut","doc":"Cuts *source* into a series of *unclassified forms*; yields\nstart byte index and byte length of each to the block.","summary":"Cuts source into a series of unclassified forms; yields start byte index and byte length of each to the block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String, & : Int32, Int32, Int32 | Nil -> )","args_html":"(source : String, & : Int32, Int32, Int32 | Nil -> )","location":{"filename":"src/novika/scissors.cr","line_number":215,"url":null},"def":{"name":"cut","args":[{"name":"source","external_name":"source","restriction":"String"}],"yields":3,"block_arity":3,"block_arg":{"name":"","external_name":"","restriction":"(Int32, Int32, Int32 | ::Nil ->)"},"visibility":"Public","body":"slicer = new(source)\nslicer.each do |start, count, dot|\n yield start, count, dot\nend\n"}}],"constructors":[{"html_id":"new(source:String)-class-method","name":"new","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String)","args_html":"(source : String)","location":{"filename":"src/novika/scissors.cr","line_number":14,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"each(&)-instance-method","name":"each","doc":"Cuts the source string into a series of *unclassified forms*;\nyields start byte index, byte length, and first dot `'.'` byte\nindex of each to the block.\n\nDot byte index is yielded to save an O(N) search, which would\nbe otherwise required since '.' is handled specially by several\nforms in Novika.","summary":"Cuts the source string into a series of unclassified forms; yields start byte index, byte length, and first dot '.'
byte index of each to the block.
Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::SmallDecimalSnapshot]","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: value, cls: Int64, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":140,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.value = form.to_i64\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":131,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":136,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(value)"}},{"html_id":"value:Int64-instance-method","name":"value","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"def":{"name":"value","return_type":"Int64","visibility":"Public","body":"@value"}},{"html_id":"value=(value:Int64)-instance-method","name":"value=","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Int64"}],"args_string":"(value : Int64)","args_html":"(value : Int64)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"Int64"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Snapshot","path":"Novika/Snapshot.html","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot","abstract":true,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":38,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"system\"]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::Snapshot]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"PARTS","name":"PARTS","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"}],"subclasses":[{"html_id":"novika/Novika/BlockRefSnapshot","kind":"class","full_name":"Novika::BlockRefSnapshot","name":"BlockRefSnapshot"},{"html_id":"novika/Novika/BooleanSnapshot","kind":"class","full_name":"Novika::BooleanSnapshot","name":"BooleanSnapshot"},{"html_id":"novika/Novika/BuiltinSnapshot","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot"},{"html_id":"novika/Novika/BytesliceSnapshot","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot"},{"html_id":"novika/Novika/ColorSnapshot","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot"},{"html_id":"novika/Novika/LargeDecimalSnapshot","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot"},{"html_id":"novika/Novika/QuotedWordSnapshot","kind":"class","full_name":"Novika::QuotedWordSnapshot","name":"QuotedWordSnapshot"},{"html_id":"novika/Novika/QuoteSnapshot","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot"},{"html_id":"novika/Novika/SmallDecimalSnapshot","kind":"class","full_name":"Novika::SmallDecimalSnapshot","name":"SmallDecimalSnapshot"},{"html_id":"novika/Novika/WordSnapshot","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"to_form(assembler:BlockAssembler)-instance-method","name":"to_form","doc":"Converts this snapshot to the corresponding form.","summary":"Converts this snapshot to the corresponding form.
","abstract":true,"args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"args_string":"(assembler : BlockAssembler)","args_html":"(assembler : BlockAssembler)","location":{"filename":"src/novika/image.cr","line_number":40,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"visibility":"Public","body":""}}],"macros":[{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/SnapshotType","path":"Novika/SnapshotType.html","kind":"enum","full_name":"Novika::SnapshotType","name":"SnapshotType","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Word","name":"Word","value":"0_u8"},{"id":"BlockRef","name":"BlockRef","value":"1_u8"},{"id":"SmallDecimal","name":"SmallDecimal","value":"2_u8"},{"id":"LargeDecimal","name":"LargeDecimal","value":"3_u8"},{"id":"Quote","name":"Quote","value":"4_u8"},{"id":"QuotedWord","name":"QuotedWord","value":"5_u8"},{"id":"Boolean","name":"Boolean","value":"6_u8"},{"id":"Color","name":"Color","value":"7_u8"},{"id":"Builtin","name":"Builtin","value":"8_u8"},{"id":"Byteslice","name":"Byteslice","value":"9_u8"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds the type of a snapshot.\n\nMembers are sorted by their frequency in code (eyeballed),\nnot to say that it matters.","summary":"Holds the type of a snapshot.
","instance_methods":[{"html_id":"block_ref?-instance-method","name":"block_ref?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":13,"url":null},"def":{"name":"block_ref?","visibility":"Public","body":"self == BlockRef"}},{"html_id":"boolean?-instance-method","name":"boolean?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":18,"url":null},"def":{"name":"boolean?","visibility":"Public","body":"self == Boolean"}},{"html_id":"builtin?-instance-method","name":"builtin?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":20,"url":null},"def":{"name":"builtin?","visibility":"Public","body":"self == Builtin"}},{"html_id":"byteslice?-instance-method","name":"byteslice?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":21,"url":null},"def":{"name":"byteslice?","visibility":"Public","body":"self == Byteslice"}},{"html_id":"color?-instance-method","name":"color?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":19,"url":null},"def":{"name":"color?","visibility":"Public","body":"self == Color"}},{"html_id":"large_decimal?-instance-method","name":"large_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":15,"url":null},"def":{"name":"large_decimal?","visibility":"Public","body":"self == LargeDecimal"}},{"html_id":"quote?-instance-method","name":"quote?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":16,"url":null},"def":{"name":"quote?","visibility":"Public","body":"self == Quote"}},{"html_id":"quoted_word?-instance-method","name":"quoted_word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":17,"url":null},"def":{"name":"quoted_word?","visibility":"Public","body":"self == QuotedWord"}},{"html_id":"small_decimal?-instance-method","name":"small_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":14,"url":null},"def":{"name":"small_decimal?","visibility":"Public","body":"self == SmallDecimal"}},{"html_id":"word?-instance-method","name":"word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":12,"url":null},"def":{"name":"word?","visibility":"Public","body":"self == Word"}}]},{"html_id":"novika/Novika/StructLayoutForm","path":"Novika/StructLayoutForm.html","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin form wrapper around `FFI::StructLayout`. Lazily parses\na struct layout definition and keeps the corresponding\n`FFI::StructLayout` in sync.","summary":"A thin form wrapper around FFI::StructLayout
.
Initializes a struct layout form.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","args_html":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":250,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, names, types, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(layout:Novika::FFI::StructLayout,comment:Nil|String)-class-method","name":"new","doc":"Initializes a struct layout form from the given *layout*.\nThe layout must contain at least one field.","summary":"Initializes a struct layout form from the given layout.
","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","args_html":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":295,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if layout == other.layout\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":287,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@comment ? io << @comment : to_s(io)"}},{"html_id":"layout(outerset=nil)-instance-method","name":"layout","doc":"Returns the underlying layout.","summary":"Returns the underlying layout.
","abstract":false,"args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"args_string":"(outerset = nil)","args_html":"(outerset = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":268,"url":null},"def":{"name":"layout","args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"visibility":"Public","body":"if @layout.field_count > 0 || outerset.try(&.includes?(object_id))\n return @layout\nend\nif this = @this\nelse\n return @layout\nend\nif names = @names\nelse\n return @layout\nend\nif types = @types\nelse\n return @layout\nend\nnames.zip(types) do |name, typename|\n parser = StructLayoutParser.new(this, typename, name, self, outerset)\n @layout.add(name.id, parser.parse)\nend\n@layout\n"}},{"html_id":"object_id(*args,**options)-instance-method","name":"object_id","doc":"Since `StructLayoutForm` is a struct, it doesn't have its own\nobject id, and instead borrows it from the names array, which\nis assumed to be created personally for this struct layout form.","summary":"Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Parses types in struct layouts.
","constructors":[{"html_id":"new(this,typename,field:Word,current:StructLayoutForm,outerset:Set(UInt64)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"args_string":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","args_html":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":171,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename, field, current, outerset)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":219,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).inline\n"}},{"html_id":"on_struct_reference(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":225,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"add_to_outerset\n(form.layout(@outerset)).reference\n"}},{"html_id":"on_union(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":213,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).union\n"}}]},{"html_id":"novika/Novika/StructViewForm","path":"Novika/StructViewForm.html","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":85,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::StructView` and its descendants.\n\nThis form is a readable and submittable store, which means you\ncan read (e.g. `entry:fetch`) and submit (e.g. `entry:submit`)\nto exsisting entries.","summary":"A thin wrapper around FFI::StructView
and its descendants.
Returns whether this and other struct views are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":162,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @view == (other.@view)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"view.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"view.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":151,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":108,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"if name.is_a?(Word)\n @view[name.id]?.try(&.to_form?)\nend"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":104,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Word) ? @view.has_field?(name.id) : false"}},{"html_id":"inline?-instance-method","name":"inline?","doc":"Returns whether this view is an inline struct view.","summary":"Returns whether this view is an inline struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":138,"url":null},"def":{"name":"inline?","visibility":"Public","body":"view.is_a?(FFI::InlineStructView)"}},{"html_id":"layout:StructLayoutForm-instance-method","name":"layout","doc":"Returns the struct layout of the underlying struct view.","summary":"Returns the struct layout of the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":100,"url":null},"def":{"name":"layout","return_type":"StructLayoutForm","visibility":"Public","body":"StructLayoutForm.new(view.layout, comment: nil)"}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":120,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\nfalse\n"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":126,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\ntrue\n"}},{"html_id":"reference?-instance-method","name":"reference?","doc":"Returns whether this view is a struct reference view.","summary":"Returns whether this view is a struct reference view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":133,"url":null},"def":{"name":"reference?","visibility":"Public","body":"view.is_a?(FFI::StructReferenceView)"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/foreign.cr","line_number":112,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if name.is_a?(Word)\nelse\n return\nend\n(@view.layout.desc?(name.id)).try do |desc|\n @view[name.id] = desc.type.from(form)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":155,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << @view"}},{"html_id":"union?-instance-method","name":"union?","doc":"Returns whether this view is a union view.","summary":"Returns whether this view is a union view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":143,"url":null},"def":{"name":"union?","visibility":"Public","body":"view.is_a?(FFI::UnionView)"}},{"html_id":"view:FFI::StructView-instance-method","name":"view","doc":"Returns the underlying struct view.","summary":"Returns the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":91,"url":null},"def":{"name":"view","return_type":"FFI::StructView","visibility":"Public","body":"@view"}}]},{"html_id":"novika/Novika/Substrate","path":"Novika/Substrate.html","kind":"module","full_name":"Novika::Substrate(T)","name":"Substrate","abstract":false,"locations":[{"filename":"src/novika/substrate.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Substrate is a fast, low-level copy-on-write wrapper for\nan array.","summary":"Substrate is a fast, low-level copy-on-write wrapper for an array.
","class_methods":[{"html_id":"[]-class-method","name":"[]","doc":"Initializes an empty substrate.","summary":"Initializes an empty substrate.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":19,"url":null},"def":{"name":"[]","visibility":"Public","body":"RealSubstrate(T).new"}},{"html_id":"[](*elements)-class-method","name":"[]","doc":"Initializes a substrate with *elements*.","summary":"Initializes a substrate with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/substrate.cr","line_number":24,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"for(elements.to_a)"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Initializes a substrate with *elements* as the underlying array.","summary":"Initializes a substrate with elements as the underlying array.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"args_string":"(elements : Array(T))","args_html":"(elements : Array(T))","location":{"filename":"src/novika/substrate.cr","line_number":29,"url":null},"def":{"name":"for","args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"visibility":"Public","body":"RealSubstrate.new(elements)"}}],"instance_methods":[{"html_id":"==(other)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/substrate.cr","line_number":96,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"other.is_a?(Substrate) && (array == other.array)"}},{"html_id":"at!(index)-instance-method","name":"at!","doc":"Unsafely fetches the element at *index*.","summary":"Unsafely fetches the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":37,"url":null},"def":{"name":"at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"array.unsafe_fetch(index)"}},{"html_id":"at?(index)-instance-method","name":"at?","doc":"Returns the element at *index*. Returns nil if *index* is\nout of bounds, i.e., *not* in `0 <= index < count`.","summary":"Returns the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":48,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if index.in?(0...count)\n at!(index)\nend"}},{"html_id":"copy-instance-method","name":"copy","doc":"Returns a copy of this substrate.","summary":"Returns a copy of this substrate.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":79,"url":null},"def":{"name":"copy","visibility":"Public","body":""}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of elements in the array.","summary":"Returns the amount of elements in the array.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":42,"url":null},"def":{"name":"count","visibility":"Public","body":"array.size"}},{"html_id":"delete?(atindex)-instance-method","name":"delete?","doc":"Deletes the element at *index*. Returns nil if *index* is\nout of bounds (see `at?`).","summary":"Deletes the element at index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""}],"args_string":"(at index)","args_html":"(at index)","location":{"filename":"src/novika/substrate.cr","line_number":73,"url":null},"def":{"name":"delete?","args":[{"name":"index","external_name":"at","restriction":""}],"visibility":"Public","body":""}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"Same as `Array#each`.","summary":"Same as Array#each
.
Same as Array#each
.
Adds element before index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"args_string":"(at index, element)","args_html":"(at index, element)","location":{"filename":"src/novika/substrate.cr","line_number":69,"url":null},"def":{"name":"insert?","args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":""}},{"html_id":"map!(&:T->T|Nil)-instance-method","name":"map!","doc":"Replaces elements of this substrate with the result of the\nblock. If the result is nil, leaves the original element.","summary":"Replaces elements of this substrate with the result of the block.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":90,"url":null},"def":{"name":"map!","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> T | ::Nil)"},"visibility":"Public","body":""}},{"html_id":"slice_at!(index)-instance-method","name":"slice_at!","doc":"Splits this substrate in two at *index*. Returns the two\nresulting substrates.\n\nThis method is unsafe: it does not check whether *index*\nis in bounds.","summary":"Splits this substrate in two at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":57,"url":null},"def":{"name":"slice_at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"lhs = Array(T).new(index) do |i|\n at!(i)\nend\nrhs = Array(T).new(count - index) do |j|\n at!(index + j)\nend\n{RealSubstrate.new(lhs), RealSubstrate.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"Sorts elements of this substrate inplace, using a *cmp*\ncomparator proc for comparing two elements.","summary":"Sorts elements of this substrate inplace, using a cmp comparator proc for comparing two elements.
","abstract":true,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/substrate.cr","line_number":94,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":""}},{"html_id":"unsafe_paste(other:Substrate(T),index,other_start,other_insert_count)-instance-method","name":"unsafe_paste","doc":"Pastes *count* elements of other starting at *b*egin, to\n*dest* index in self, without doing any checks whatsoever.\n\nA lot of undefined behavior unless you are sure all\nnumbers are good.","summary":"Pastes count elements of other starting at begin, to dest index in self, without doing any checks whatsoever.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"args_string":"(other : Substrate(T), index, other_start, other_insert_count)","args_html":"(other : Substrate(T), index, other_start, other_insert_count)","location":{"filename":"src/novika/substrate.cr","line_number":86,"url":null},"def":{"name":"unsafe_paste","args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Tape","path":"Novika/Tape.html","kind":"struct","full_name":"Novika::Tape(T)","name":"Tape","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/tape.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A `Substrate` with an integer cursor.","summary":"A Substrate
with an integer cursor.
Initializes a tape with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/tape.cr","line_number":23,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"Tape.new(Substrate[*elements])"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Creates a tape from an existing array of *elements*, which\nwill be used as the underlying container for `Substrate`.\nThis means that all mutations of substrate will be performed\non the *elements* array, and vice versa.","summary":"Creates a tape from an existing array of elements, which will be used as the underlying container for Substrate
.
Adds element before the cursor, and advances the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":57,"url":null},"def":{"name":"add","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor + 1)"}},{"html_id":"at!(*args,**options)-instance-method","name":"at!","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
Returns a shallow copy of this tape.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":133,"url":null},"def":{"name":"copy","visibility":"Public","body":"Tape.new(substrate.copy, cursor)"}},{"html_id":"count(*args,**options)-instance-method","name":"count","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Returns the cursor position.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":9,"url":null},"def":{"name":"cursor","return_type":"Int32","visibility":"Public","body":"@cursor"}},{"html_id":"drop?-instance-method","name":"drop?","doc":"Removes the element before the cursor, and moves the cursor\nback once. Returns the resulting tape.","summary":"Removes the element before the cursor, and moves the cursor back once.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":82,"url":null},"def":{"name":"drop?","visibility":"Public","body":"Tape.new((substrate.delete?(cursor - 1)) || (return), cursor - 1)"}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Drops and returns the element after cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":92,"url":null},"def":{"name":"eject?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new((substrate.delete?(cursor)).not_nil!, cursor), element}\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this tape is empty (has no elements).","summary":"Returns whether this tape is empty (has no elements).
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":31,"url":null},"def":{"name":"empty?","visibility":"Public","body":"count.zero?"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Adds element after cursor without moving the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":87,"url":null},"def":{"name":"inject","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor)"}},{"html_id":"map!(&)-instance-method","name":"map!","doc":"See `Substrate#map!`.","summary":"See Substrate#map!
.
Fetches the top element, and advances the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":51,"url":null},"def":{"name":"next?","visibility":"Public","body":"if cursor < count\n {Tape.new(substrate, cursor + 1), substrate.at!(cursor)}\nend"}},{"html_id":"paste(elements:Tape(T))-instance-method","name":"paste","doc":"Adds elements before cursor in *elements* to this tape.\nAdvances the cursor.","summary":"Adds elements before cursor in elements to this tape.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"args_string":"(elements : Tape(T))","args_html":"(elements : Tape(T))","location":{"filename":"src/novika/tape.cr","line_number":63,"url":null},"def":{"name":"paste","args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"visibility":"Public","body":"Tape.new(substrate.unsafe_paste(elements.substrate, index: cursor, other_start: 0, other_insert_count: elements.cursor), cursor + elements.cursor)"}},{"html_id":"resub(other)-instance-method","name":"resub","doc":"Replaces this tape's substrate with other. *cursor* is\nleft where it was in self if it fits, else is moved to\nthe end.","summary":"Replaces this tape's substrate with other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/tape.cr","line_number":108,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"substrate.deref\nTape.new(other.substrate.copy, Math.min(cursor, other.count))\n"}},{"html_id":"slice:Tuple(Tape(T),Tape(T))-instance-method","name":"slice","doc":"Slices this tape's substrate at cursor, returns the\ntwo resulting tape halves.","summary":"Slices this tape's substrate at cursor, returns the two resulting tape halves.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":126,"url":null},"def":{"name":"slice","return_type":"::Tuple(Tape(T), Tape(T))","visibility":"Public","body":"lhs, rhs = substrate.slice_at!(cursor)\n{Tape.new(lhs), Tape.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"See `Substrate#sort_using!`","summary":"","abstract":false,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/tape.cr","line_number":120,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":"Tape.new(substrate.sort_using!(cmp), cursor)"}},{"html_id":"swap?-instance-method","name":"swap?","doc":"Swaps two elements before the cursor.","summary":"Swaps two elements before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":74,"url":null},"def":{"name":"swap?","visibility":"Public","body":"if cursor < 2\n return\nend\nTape.new(substrate.unsafe_swap(cursor - 2, cursor - 1), cursor)\n"}},{"html_id":"thru?-instance-method","name":"thru?","doc":"Returns the element after cursor and moves the cursor forward.","summary":"Returns the element after cursor and moves the cursor forward.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":99,"url":null},"def":{"name":"thru?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new(substrate, cursor + 1), element}\n"}},{"html_id":"to?(cursorposition)-instance-method","name":"to?","doc":"Moves the cursor to *position*. Returns the resulting tape\non success, nil if position is out of bounds (see `Substrate#at?`).","summary":"Moves the cursor to position.
","abstract":false,"args":[{"name":"position","external_name":"cursor","restriction":""}],"args_string":"(cursor position)","args_html":"(cursor position)","location":{"filename":"src/novika/tape.cr","line_number":44,"url":null},"def":{"name":"to?","args":[{"name":"position","external_name":"cursor","restriction":""}],"visibility":"Public","body":"if position.in?(0..count)\n Tape.new(substrate, position)\nend"}},{"html_id":"top?-instance-method","name":"top?","doc":"Returns the element before the cursor.","summary":"Returns the element before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":36,"url":null},"def":{"name":"top?","visibility":"Public","body":"if cursor.zero?\n return\nend\nsubstrate.at!(cursor - 1)\n"}}]},{"html_id":"novika/Novika/True","path":"Novika/True.html","kind":"struct","full_name":"Novika::True","name":"True","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":45,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a truthy `Boolean`.","summary":"Represents a truthy Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean true\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::TypedSnapshot]","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"enum\", name: type, cls: UInt8, onlyif: nil, verify: nil, value: nil, encoding: SnapshotType}, {type: \"basic\", name: snapshot, cls: Snapshot, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}},{"html_id":"from_io(io:IO,format:IO::ByteFormat=IO::ByteFormat::BigEndian)-class-method","name":"from_io","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"args_string":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","args_html":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","location":{"filename":"src/novika/image.cr","line_number":304,"url":null},"def":{"name":"from_io","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"visibility":"Public","body":"type = SnapshotType.new(io.read_bytes(UInt8, format))\nsnapshot = case type\nin .block_ref?\n io.read_bytes(BlockRefSnapshot, format)\nin .boolean?\n io.read_bytes(BooleanSnapshot, format)\nin .color?\n io.read_bytes(ColorSnapshot, format)\nin .small_decimal?\n io.read_bytes(SmallDecimalSnapshot, format)\nin .large_decimal?\n io.read_bytes(LargeDecimalSnapshot, format)\nin .quote?\n io.read_bytes(QuoteSnapshot, format)\nin .word?\n io.read_bytes(WordSnapshot, format)\nin .quoted_word?\n io.read_bytes(QuotedWordSnapshot, format)\nin .builtin?\n io.read_bytes(BuiltinSnapshot, format)\nin .byteslice?\n io.read_bytes(BytesliceSnapshot, format)\nend\nnew(type, snapshot)\n"}}],"constructors":[{"html_id":"new(type:Novika::SnapshotType,snapshot:Novika::Snapshot)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"args_string":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","args_html":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","location":{"filename":"src/novika/image.cr","line_number":296,"url":null},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, snapshot)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(form:Block)-class-method","name":"new","doc":"Creates the corresponding `TypedSnapshot` for *form*.","summary":"Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Raises: no overload for form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":""}],"args_string":"(form)","args_html":"(form)","location":{"filename":"src/novika/image.cr","line_number":382,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":""}],"visibility":"Public","body":"raise(\"no overload for #{form.class}\")"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":288,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"snapshot:Snapshot-instance-method","name":"snapshot","doc":"Holds the `Snapshot` object.","summary":"Holds the Snapshot
object.
Holds the Snapshot
object.
See Snapshot#to_form
.
Holds the type of the #snapshot
.
Holds the type of the #snapshot
.
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ValueForm","path":"Novika/ValueForm.html","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm","abstract":false,"locations":[{"filename":"src/novika/forms/form.cr","line_number":88,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are classes (that is, reference types) that want\nto pretend they're value forms, i.e., value types.","summary":"Includers are classes (that is, reference types) that want to pretend they're value forms, i.e., value types.
"},{"html_id":"novika/Novika/Word","path":"Novika/Word.html","kind":"struct","full_name":"Novika::Word","name":"Word","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Words open entries they're assigned to in the dictionary\nof their enclosing block.","summary":"Words open entries they're assigned to in the dictionary of their enclosing block.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":17,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"word\""}}],"constructors":[{"html_id":"new(id:String)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/forms/words.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if id == other.id\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":13,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"word named '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":8,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":31,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"if entry = engine.block.entry_for?(self)\n entry.on_open(engine)\n return self\nend\nblock = current = engine.block\nwhile block && (trap = block.entry_for?(Hook.trap))\n form = trap.form\n if form.is_a?(Block) && (form.prototype.same?(current.prototype))\n block = block.parent?\n next\n end\n engine.stack.add(Word.new(id))\n trap.on_open(engine)\n return self\nend\ndie(\"definition for #{self} not found in the enclosing block(s)\")\nself\n"}},{"html_id":"private?-instance-method","name":"private?","doc":"Returns whether this word is private (by convention).","summary":"Returns whether this word is private (by convention).
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":22,"url":null},"def":{"name":"private?","visibility":"Public","body":"(id.prefixed_by?('_')) && (!(id.ends_with?('_')))"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds a level of quoting so this word becomes a quoted word.","summary":"Adds a level of quoting so this word becomes a quoted word.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":27,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(@id)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":67,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if id.in?(\"true\", \"false\")\n io << \"#\"\nend\nio << id\n"}}]},{"html_id":"novika/Novika/WordSnapshot","path":"Novika/WordSnapshot.html","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":196,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::WordSnapshot]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Word)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Word"}],"args_string":"(form : Word)","args_html":"(form : Word)","location":{"filename":"src/novika/image.cr","line_number":206,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Word"}],"visibility":"Public","body":"word = new\nword.id = form.id\nword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":197,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":202,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Word.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Set","path":"Set.html","kind":"struct","full_name":"Set(T)","name":"Set","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika.cr","line_number":19,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"}],"doc":"`Set` implements a collection of unordered values with no duplicates.\n\nAn `Enumerable` object can be converted to `Set` using the `#to_set` method.\n\n`Set` uses `Hash` as storage, so you must note the following points:\n\n* Equality of elements is determined according to `Object#==` and `Object#hash`.\n* `Set` assumes that the identity of each element does not change while it is stored. Modifying an element of a set will render the set to an unreliable state.\n\n### Example\n\n```\ns1 = Set{1, 2}\ns2 = [1, 2].to_set\ns3 = Set.new [1, 2]\ns1 == s2 # => true\ns1 == s3 # => true\ns1.add(2)\ns1.concat([6, 8])\ns1.subset_of? s2 # => false\ns2.subset_of? s1 # => true\n```","summary":"Set
implements a collection of unordered values with no duplicates.
A String
represents an immutable sequence of UTF-8 characters.
Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"args_string":"(prefix : String) : Bool","args_html":"(prefix : String) : Bool","location":{"filename":"src/novika.cr","line_number":9,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"bytesize > prefix.bytesize && (starts_with?(prefix))"}},{"html_id":"prefixed_by?(prefix:Char):Bool-instance-method","name":"prefixed_by?","doc":"Returns whether this string starts with *prefix* but also\nhas other characters after it.","summary":"Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"args_string":"(prefix : Char) : Bool","args_html":"(prefix : Char) : Bool","location":{"filename":"src/novika.cr","line_number":14,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"return_type":"Bool","visibility":"Public","body":"bytesize > 1 && (starts_with?(prefix))"}}]},{"html_id":"novika/Union","path":"Union.html","kind":"struct","full_name":"Union(*T)","name":"Union","abstract":false,"superclass":{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},"ancestors":[{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"doc":"A union type represents the possibility of a variable or an expression\nhaving more than one possible type at compile time.\n\nWhen invoking a method on a union type, the language checks that the\nmethod exists and can be resolved (typed) for each type in the union.\nFor this reason, adding instance methods to `Union` makes no sense and\nhas no effect. However, adding class method to `Union` is possible\nand can be useful. One example is parsing `JSON` into one of many\npossible types.\n\nUnion is special in that it is a generic type but instantiating it\nmight not return a union type:\n\n```\nUnion(Int32 | String) # => (Int32 | String)\nUnion(Int32) # => Int32\nUnion(Int32, Int32, Int32) # => Int32\n```","summary":"A union type represents the possibility of a variable or an expression having more than one possible type at compile time.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","doc":"Joins union members' `Form#typedesc`.","summary":"Joins union members' Form#typedesc
.
An Array
is an ordered, integer-indexed collection of objects of type T.
A pool of BlockIdMap
objects.
Regex that can be used to search for a pattern in Block
comments.
Returns whether the output of Novika should be colorful.
","abstract":false,"location":{"filename":"src/novika.cr","line_number":58,"url":null},"def":{"name":"colorful?","return_type":"Bool","visibility":"Public","body":"((STDOUT.tty? && STDERR.tty?) && (ENV[\"TERM\"]? != \"dumb\")) && (!(ENV.has_key?(\"NO_COLOR\")))"}}],"types":[{"html_id":"novika/Novika/Block","path":"Novika/Block.html","kind":"class","full_name":"Novika::Block","name":"Block","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/block.cr","line_number":338,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"MAX_COUNT_TO_S","name":"MAX_COUNT_TO_S","value":"128","doc":"Maximum amount of forms to display in block string representation.","summary":"Maximum amount of forms to display in block string representation.
"},{"id":"MAX_NESTED_COUNT_TO_S","name":"MAX_NESTED_COUNT_TO_S","value":"12","doc":"Maximum amount of forms to display in string representation\nof *nested* blocks.","summary":"Maximum amount of forms to display in string representation of nested blocks.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Blocks are fundamental to Novika.\n\nThey are a kind of AST node, they hold continuations and\nare continuations, they are arrays, stacks, and hash tables,\nall at the same time.\n\nIn this sense, blocks have *roles*. But any block can be\nany role, and change its role as often and whenever it\nwants or needs to.","summary":"Blocks are fundamental to Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":441,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"block\""}},{"html_id":"with(array:Array(Form),leaf:Bool|Nil=nil)-class-method","name":"with","doc":"Creates and returns an orphan block with *array* being\nits tape substrate's container. See `Tape.for`.","summary":"Creates and returns an orphan block with array being its tape substrate's container.
","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"args_string":"(array : Array(Form), leaf : Bool | Nil = nil)","args_html":"(array : Array(Form), leaf : Bool | Nil = nil)","location":{"filename":"src/novika/forms/block.cr","line_number":411,"url":null},"def":{"name":"with","args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"new(parent: nil, tape: Tape.for(array), leaf: leaf.nil? ? array.includes?(Block) : leaf)"}},{"html_id":"with(form1:Form,form2:Form)-class-method","name":"with","doc":"Double-*form* optimized version of `Block.with`.","summary":"Double-form optimized version of Block.with
.
Single-form optimized version of Block.with
.
Loose equality: for two blocks to be loosely equal, their tapes and their dictionaries must be loosely equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other) : Bool","args_html":"(other) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":1136,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"return_type":"Bool","visibility":"Public","body":"if other.is_a?(self)\nelse\n return false\nend\nif same?(other)\n return true\nend\nif count == other.count\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive(:==) do\n result = true\n if has_tape? || other.has_tape?\n result && (result = tape == other.tape)\n end\n if has_dict? || other.has_dict?\n result && (result = dict == other.dict)\n end\nend\nexecuted && result\n"}},{"html_id":"a(type:T.class,_depth=0):TforallT-instance-method","name":"a","doc":"Converts this block into the given *type*. Code execution\nmay be required, hence the need for *engine*. If failed,\nsame as `Form#a`.","summary":"Converts this block into the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"args_string":"(type : T.class, _depth = 0) : T forall T","args_html":"(type : T.class, _depth = 0) : T forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1237,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"return_type":"T","visibility":"Public","body":"if self.is_a?(T)\n return self\nend\n(case T\nwhen Decimal.class\n a?(Hook.as_decimal, type, _depth)\nwhen Quote.class\n a?(Hook.as_quote, type, _depth)\nwhen Word.class\n a?(Hook.as_word, type, _depth)\nwhen Color.class\n a?(Hook.as_color, type, _depth)\nwhen Boolean.class\n a?(Hook.as_boolean, type, _depth)\nwhen QuotedWord.class\n a?(Hook.as_quoted_word, type, _depth)\nwhen Byteslice.class\n a?(Hook.as_byteslice, type, _depth)\nend) || (afail(T))\n"}},{"html_id":"add(form:Form):self-instance-method","name":"add","doc":"Adds *form* to the tape.","summary":"Adds form to the tape.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":628,"url":null},"def":{"name":"add","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"impl = ->(other : Form) do\n if other.is_a?(Block)\n self.leaf = false\n end\n self.tape = tape.add(other)\nend\nif hook = flat_at?(Hook.on_shove)\n default = Builtin.new(\"__shove__\", desc: \"( F -- ): default __shove__ implementation. Pushes Form to\\n the block it was captured in.\") do |_, stack|\n impl.call(stack.drop)\n end\n stack = Block.with(form, default)\n Engine.exhaust(Engine.current.capabilities, hook, stack)\nelse\n impl.call(form)\nend\nself\n"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a block of forms between *b* and *e*, both\ninclusive. Clamps *b* and *e* to bounds.","summary":"Returns a block of forms between b and e, both inclusive.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/block.cr","line_number":568,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"if has_tape?\nelse\n return Block.new\nend\nb = Math.max(b, 0)\ne = Math.min(e, count - 1)\nBlock.with((b..e).map do |index|\n at(index)\nend)\n"}},{"html_id":"at(name:Form,entry:Entry):self-instance-method","name":"at","doc":"Binds *name* to *entry* in this block's dictionary.","summary":"Binds name to entry in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : self","args_html":"(name : Form, entry : Entry) : self","location":{"filename":"src/novika/forms/block.cr","line_number":995,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"self","visibility":"Public","body":"tap do\n dict.set(name, entry)\nend"}},{"html_id":"at(name:Form,form:Form):self-instance-method","name":"at","doc":"Binds *name* to *form* in this block's dictionary.","summary":"Binds name to form in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form) : self","args_html":"(name : Form, form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1000,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"at(name, Entry.new(form))"}},{"html_id":"at(index:Int32):Form-instance-method","name":"at","doc":"Returns the form at *index* in the tape. Dies if *index*\nis out of bounds. See `Tape#at?`.","summary":"Returns the form at index in the tape.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : Form","args_html":"(index : Int32) : Form","location":{"filename":"src/novika/forms/block.cr","line_number":560,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"index out of bounds\")\nend\n(tape.at?(index)) || (die(\"index out of bounds\"))\n"}},{"html_id":"at(name:String,desc=\"abuiltin\",&code:Engine,Block->):self-instance-method","name":"at","doc":"Makes an `OpenEntry` called *name* for *code* wrapped\nin `Builtin`.","summary":"Makes an OpenEntry
called name for code wrapped in Builtin
.
Makes an OpenEntry
called name for code wrapped in Builtin
.
Returns the form at index, or nil.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/forms/block.cr","line_number":552,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.at?(index)\n"}},{"html_id":"befriend(other:Block):self-instance-method","name":"befriend","doc":"Adds *other* to the friendlist of this block.","summary":"Adds other to the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":747,"url":null},"def":{"name":"befriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"friends.add(other)\nself\n"}},{"html_id":"can_be?(type:T.class):BoolforallT-instance-method","name":"can_be?","doc":"Returns whether this block implements hook(s) needed\nfor behaving like *type*. See also: `a(type)`.","summary":"Returns whether this block implements hook(s) needed for behaving like type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : Bool forall T","args_html":"(type : T.class) : Bool forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1253,"url":null},"def":{"name":"can_be?","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"Bool","visibility":"Public","body":"if self.is_a?(T)\n return true\nend\ncase T\nwhen Decimal.class\n flat_has?(Hook.as_decimal)\nwhen Quote.class\n flat_has?(Hook.as_quote)\nwhen Word.class\n flat_has?(Hook.as_word)\nwhen Color.class\n flat_has?(Hook.as_color)\nwhen Boolean.class\n flat_has?(Hook.as_boolean)\nwhen QuotedWord.class\n flat_has?(Hook.as_quoted_word)\nwhen Byteslice.class\n flat_has?(Hook.as_byteslice)\nelse\n false\nend\n"}},{"html_id":"clear_entries:self-instance-method","name":"clear_entries","doc":"Removes all owned dictionary entries in this block.","summary":"Removes all owned dictionary entries in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1052,"url":null},"def":{"name":"clear_entries","return_type":"self","visibility":"Public","body":"dict.clear\nself\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of forms in this block.","summary":"Returns the amount of forms in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":526,"url":null},"def":{"name":"count","visibility":"Public","body":"has_tape? ? tape.count : 0"}},{"html_id":"cursor-instance-method","name":"cursor","doc":"Returns the cursor position in this block.","summary":"Returns the cursor position in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":521,"url":null},"def":{"name":"cursor","visibility":"Public","body":"has_tape? ? tape.cursor : 0"}},{"html_id":"delete_at(index:Int32):self-instance-method","name":"delete_at","doc":"Deletes the form at *index*. Does nothing if index is out\nof bounds.","summary":"Deletes the form at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1034,"url":null},"def":{"name":"delete_at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if delpt = tape.to?(index + 1)\nelse\n return self\nend\nif delpt.drop?\nelse\n return self\nend\nself.tape = (tape.to?(Math.min(cursor, delpt.count))).not_nil!\nself\n"}},{"html_id":"delete_entry(name:Form):self-instance-method","name":"delete_entry","doc":"Deletes the entry corresponding to *name* form from the\ndictionary of this block if it exists there. Otherwise,\ndoes nothing.","summary":"Deletes the entry corresponding to name form from the dictionary of this block if it exists there.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : self","args_html":"(name : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1045,"url":null},"def":{"name":"delete_entry","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"dict.del(name)\nself\n"}},{"html_id":"delete_if(&:Form->Bool):self-instance-method","name":"delete_if","doc":"Yields forms from left to right until the block returns `true`\nfor one, then deletes that form. If the block does not return\n`true` for any form, does nothing.","summary":"Yields forms from left to right until the block returns true
for one, then deletes that form.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/block.cr","line_number":437,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << (prototype.comment? || \"a block\")"}},{"html_id":"describe_with?(comment:String,force=false):String|Nil-instance-method","name":"describe_with?","doc":"Sets the block comment of this block to *comment* in\ncase it doesn't have a comment already.\n\nSetting the comment can also be forced by making *force* true.","summary":"Sets the block comment of this block to comment in case it doesn't have a comment already.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"args_string":"(comment : String, force = false) : String | Nil","args_html":"(comment : String, force = false) : String | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":463,"url":null},"def":{"name":"describe_with?","args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"return_type":"String | ::Nil","visibility":"Public","body":"if force || (!comment?)\n @comment = dedent(comment)\nend"}},{"html_id":"drop:Form-instance-method","name":"drop","doc":"Removes and returns the top form. Dies if none.","summary":"Removes and returns the top form.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":695,"url":null},"def":{"name":"drop","return_type":"Form","visibility":"Public","body":"impl = -> do\n top.tap do\n self.tape = tape.drop? || (raise(\"unreachable\"))\n end\nend\nif hook = flat_at?(Hook.on_cherry)\n default = Builtin.new(\"__cherry__\", desc: \"( -- ): default __cherry__ implementation.\") do\n impl.call\n end\n stack = Block.with(default)\n (Engine.exhaust(Engine.current.capabilities, hook, stack)).top\nelse\n impl.call\nend\n"}},{"html_id":"dupe:self-instance-method","name":"dupe","doc":"Duplicates the form before the cursor, dies if none.","summary":"Duplicates the form before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":673,"url":null},"def":{"name":"dupe","return_type":"self","visibility":"Public","body":"add(top)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields all forms in this block, *going from left to right*.","summary":"Yields all forms in this block, going from left to right.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":536,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.each do |form|\n yield form\nend\n"}},{"html_id":"each_entry(&)-instance-method","name":"each_entry","doc":"Yields entry names and `Entry` objects from the dictionary\nof this block.","summary":"Yields entry names and Entry
objects from the dictionary of this block.
Yields entry name forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":908,"url":null},"def":{"name":"each_entry_name","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |name, _|\n yield name\nend"}},{"html_id":"each_entry_value(&)-instance-method","name":"each_entry_value","doc":"Yields entry value forms in this block's dictionary.","summary":"Yields entry value forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":915,"url":null},"def":{"name":"each_entry_value","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |_, entry|\n yield entry.form\nend"}},{"html_id":"each_friend(&)-instance-method","name":"each_friend","doc":"Yields friends of this block. Asserts each is a block,\notherwise, dies (e.g. the user may have mistakenly\nadded some other form).","summary":"Yields friends of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":735,"url":null},"def":{"name":"each_friend","yields":1,"block_arity":1,"visibility":"Public","body":"if has_friends?\nelse\n return\nend\nfriends.reverse_each do |friend|\n if friend.is_a?(Block)\n else\n die(\"expected a block, got #{friend.class.typedesc} for a friend\")\n end\n yield friend\nend\n"}},{"html_id":"each_neighbor(payload:Block->T|Nil,visited:BlockIdMap|Nil=nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","args_html":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":856,"url":null},"def":{"name":"each_neighbor","args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"visibility":"Public","body":"each do |form|\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\nif has_dict?\nelse\n return\nend\ndict.each do |_, entry|\n form = entry.form\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\n"}},{"html_id":"each_neighbor(visited:BlockIdMap|Nil=nil,&payload:Block->T|Nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","args_html":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":893,"url":null},"def":{"name":"each_neighbor","args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"yields":1,"block_arity":1,"block_arg":{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},"visibility":"Public","body":"each_neighbor(payload, visited)"}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* found in this\nblock. Matching is done using loose equality `==(other)`.","summary":"Yields occurrences of the given pattern found in this block.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/block.cr","line_number":1159,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\neach do |form|\n if pattern == form\n yield index\n end\n index = index + 1\nend\n"}},{"html_id":"each_relative_fetch(fetcher:Block->T|Nil,seen:BlockIdMap|Nil=nil,skip_self:Bool=false,history:Block|Nil=nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"args_string":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","args_html":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":792,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"return_type":"T | ::Nil","visibility":"Public","body":"if skip_self && (!has_relatives?)\n return\nend\nif history\nelse\n v0 = skip_self ? nil : self\n ilist = PIlist.make(self)\n ilist.each(v0) do |fastpath|\n if value = fetcher.call(fastpath)\n else\n next\n end\n return value\n end\nend\nacquired = seen.nil?\nseen || (seen = BlockMaps.acquire)\nbegin\n fetch = EachRelativeFetch.new(fetcher, seen, history)\n fetch.on(self, ignore: ilist)\nensure\n if acquired\n BlockMaps.release(seen)\n end\nend\n"}},{"html_id":"each_relative_fetch(*args,**kwargs,&fetcher:Block->T|Nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","args_html":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":827,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"block_arg":{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},"return_type":"T | ::Nil","visibility":"Public","body":"each_relative_fetch(fetcher, *args, **kwargs)"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1273,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << (prototype.comment? =~ EFFECT_PATTERN ? $~[1] : \"a block\")"}},{"html_id":"eject:Form-instance-method","name":"eject","doc":"Drops and returns the form after the cursor. Dies if\ncursor is at the end.","summary":"Drops and returns the form after the cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":612,"url":null},"def":{"name":"eject","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"eject out of bounds\")\nend\nself.tape, _ = tape.eject? || (die(\"eject out of bounds\"))\n"}},{"html_id":"entry_count-instance-method","name":"entry_count","doc":"Returns the amount of entries owned by (defined in) this block.","summary":"Returns the amount of entries owned by (defined in) this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":531,"url":null},"def":{"name":"entry_count","visibility":"Public","body":"has_dict? ? dict.count : 0"}},{"html_id":"entry_for(name:Form):Entry-instance-method","name":"entry_for","doc":"Returns the dictionary entry for *name*, or dies.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or dies.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry","args_html":"(name : Form) : Entry","location":{"filename":"src/novika/forms/block.cr","line_number":942,"url":null},"def":{"name":"entry_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry","visibility":"Public","body":"(entry_for?(name)) || (die(\"no value form for '#{name}'\"))"}},{"html_id":"entry_for?(name:Form):Entry|Nil-instance-method","name":"entry_for?","doc":"Returns the dictionary entry for *name*, or nil.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or nil.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":950,"url":null},"def":{"name":"entry_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if entry = flat_at?(name)\n return entry\nend\neach_relative_fetch(skip_self: true, &.flat_at?(name))\n"}},{"html_id":"flat_at?(name:Form):Entry|Nil-instance-method","name":"flat_at?","doc":"Returns the dictionary entry corresponding to *name*.\nDoes not traverse the block hierarchy.","summary":"Returns the dictionary entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":980,"url":null},"def":{"name":"flat_at?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if has_dict?\nelse\n return\nend\ndict.get(name) do\nend\n"}},{"html_id":"flat_has?(name:Form):Bool-instance-method","name":"flat_has?","doc":"Returns whether this block's (and this block's only)\ndictionary has an entry corresponding to *name*.","summary":"Returns whether this block's (and this block's only) dictionary has an entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":988,"url":null},"def":{"name":"flat_has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"if has_dict?\nelse\n return false\nend\ndict.has?(name)\n"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":962,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"(entry_for?(name)).try(&.form)"}},{"html_id":"has_comment?:Bool-instance-method","name":"has_comment?","doc":"Returns whether this block has a comment.","summary":"Returns whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":455,"url":null},"def":{"name":"has_comment?","return_type":"Bool","visibility":"Public","body":"!(!comment?)"}},{"html_id":"has_dict?:Bool-instance-method","name":"has_dict?","doc":"Returns whether this block has a dict.","summary":"Returns whether this block has a dict.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":372,"url":null},"def":{"name":"has_dict?","return_type":"Bool","visibility":"Public","body":"!(!@dict)"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":958,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(!each_relative_fetch do |block|\n (block.flat_has?(name)) || nil\nend)"}},{"html_id":"has_friends?:Bool-instance-method","name":"has_friends?","doc":"Returns whether this block has any friends.","summary":"Returns whether this block has any friends.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":723,"url":null},"def":{"name":"has_friends?","return_type":"Bool","visibility":"Public","body":"(!(!@friends)) && (!friends.count.zero?)"}},{"html_id":"has_relatives?:Bool-instance-method","name":"has_relatives?","doc":"Returns whether this block has a parent, friends, or both.","summary":"Returns whether this block has a parent, friends, or both.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":728,"url":null},"def":{"name":"has_relatives?","return_type":"Bool","visibility":"Public","body":"(!(!parent?)) || has_friends?"}},{"html_id":"has_tape?:Bool-instance-method","name":"has_tape?","doc":"Returns whether this block has a tape.","summary":"Returns whether this block has a tape.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":361,"url":null},"def":{"name":"has_tape?","return_type":"Bool","visibility":"Public","body":"!(!@tape)"}},{"html_id":"import!(fromdonor:Block):self-instance-method","name":"import!","doc":"Imports entries from *donor* to this block's dictionary\nby mutating this block's dictionary.","summary":"Imports entries from donor to this block's dictionary by mutating this block's dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"from","restriction":"Block"}],"args_string":"(from donor : Block) : self","args_html":"(from donor : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":578,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"from","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"dict.import!(donor.dict)\nself\n"}},{"html_id":"includes?(other:Form):Bool-instance-method","name":"includes?","doc":"Returns whether the tape of this block includes *other*,\nas per loose equality `==(other)`.","summary":"Returns whether the tape of this block includes other, as per loose equality #==(other)
.
Adds form after the cursor.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":605,"url":null},"def":{"name":"inject","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"self.tape = tape.inject(form)\nself\n"}},{"html_id":"instance(parentnew_parent:Block=self,shallow=false,__tr:BlockIdMap|Nil=nil):Block-instance-method","name":"instance","doc":"Creates and returns an instance of this block, under the\ngiven *parent*.","summary":"Creates and returns an instance of this block, under the given parent.
","abstract":false,"args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"args_string":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","args_html":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","location":{"filename":"src/novika/forms/block.cr","line_number":1169,"url":null},"def":{"name":"instance","args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"return_type":"Block","visibility":"Public","body":"copy = self.class.new(parent: new_parent, tape: has_tape? ? tape.copy : nil, prototype: prototype)\nif leaf? || shallow\n return copy\nend\n__tr || (__tr = BlockIdMap.new)\n__tr[object_id] = copy\ncopy.tape = copy.tape.map! do |form|\n if form.is_a?(Block)\n else\n next\n end\n __tr[form.object_id]? || (form.instance(same?(form.parent?) ? copy : form, __tr: __tr))\nend\ncopy.leaf = false\ncopy\n"}},{"html_id":"next?:Form|Nil-instance-method","name":"next?","doc":"See `Tape#next?`.","summary":"See Tape#next?
.
Schedules this block for execution in engine using the safe scheduling method (see Engine#schedule
).
Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":970,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"(entry_for(name)).opener?"}},{"html_id":"parent:Block|Nil-instance-method","name":"parent","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent","return_type":"Block | ::Nil","visibility":"Public","body":"if (value = @parent).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#parent cannot be nil\"))\nelse\n value\nend"}},{"html_id":"parent=(parent:Block|Nil)-instance-method","name":"parent=","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil)","args_html":"(parent : Block | Nil)","location":{"filename":"src/novika/forms/block.cr","line_number":388,"url":null},"def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"parent?:Block|Nil|Nil-instance-method","name":"parent?","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent?","return_type":"Block | ::Nil | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"paste(forms:Block)-instance-method","name":"paste","doc":"Mutably adds forms before the cursor in *forms* block's\ntape after the cursor in this block's tape.","summary":"Mutably adds forms before the cursor in forms block's tape after the cursor in this block's tape.
","abstract":false,"args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"args_string":"(forms : Block)","args_html":"(forms : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":654,"url":null},"def":{"name":"paste","args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"visibility":"Public","body":"if forms.count.zero?\n return\nend\nself.tape = tape.paste(forms.tape)\n"}},{"html_id":"path_to_entry?(name:Form):Tuple(Entry,Block)|Nil-instance-method","name":"path_to_entry?","doc":"Returns a tuple that consists of the dictionary entry\ncorresponding to *name*, followed by the path block which\nholds all blocks leading to the entry.\n\nReturns nil if *name* could not be found.\n\nIn general works like `entry_for` and friends, the only\ndifference being that it also tracks and returns the path.\nThe latter makes this method slightly slower that `entry_for`.","summary":"Returns a tuple that consists of the dictionary entry corresponding to name, followed by the path block which holds all blocks leading to the entry.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Tuple(Entry, Block) | Nil","args_html":"(name : Form) : Tuple(Entry, Block) | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":930,"url":null},"def":{"name":"path_to_entry?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"::Tuple(Entry, Block) | ::Nil","visibility":"Public","body":"path = Block.new\nif entry = each_relative_fetch(history: path, &.flat_at?(name))\nelse\n return\nend\n{entry, path}\n"}},{"html_id":"prototype:Block-instance-method","name":"prototype","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype","return_type":"Block","visibility":"Public","body":"if (value = @prototype).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#prototype cannot be nil\"))\nelse\n value\nend"}},{"html_id":"prototype=(prototype:Block)-instance-method","name":"prototype=","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"args_string":"(prototype : Block)","args_html":"(prototype : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":392,"url":null},"def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"prototype?:Block|Nil-instance-method","name":"prototype?","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype?","return_type":"Block | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":974,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(opener?(name))"}},{"html_id":"resub(other:Block):self-instance-method","name":"resub","doc":"Replaces this block's tape with *other*'s.","summary":"Replaces this block's tape with other's.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1105,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"self.tape = has_tape? ? tape.resub(other.tape) : Tape.new(other.tape.substrate)\nself\n"}},{"html_id":"reverse_each(&)-instance-method","name":"reverse_each","doc":"Yields all forms in this block, *going from right to left*.","summary":"Yields all forms in this block, going from right to left.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":543,"url":null},"def":{"name":"reverse_each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\n(0...tape.count).reverse_each do |index|\n yield tape.at!(index)\nend\n"}},{"html_id":"schedule(engine:Engine,stack:Block):self-instance-method","name":"schedule","doc":"Schedules an instance of this block for execution, with *stack*\nset as the stack that will be used by the instance during\nexecution.\n\nMoves the cursor of the instance before the first form\nso that the entire block will be executed by *engine*.","summary":"Schedules an instance of this block for execution, with stack set as the stack that will be used by the instance during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1087,"url":null},"def":{"name":"schedule","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\ninstance.schedule!(engine, stack)\nself\n"}},{"html_id":"schedule!(engine:Engine,stack:Block):self-instance-method","name":"schedule!","doc":"Schedules this block for execution, with *stack* set as the\nstack that will be used by this block during execution.\n\nMoves the cursor before the first form so that the entire\nblock will be executed by *engine*.","summary":"Schedules this block for execution, with stack set as the stack that will be used by this block during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1073,"url":null},"def":{"name":"schedule!","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\nengine.schedule!(stack: stack, block: to(0))\nself\n"}},{"html_id":"shallow:Block-instance-method","name":"shallow","doc":"Returns a shallow copy of this block.","summary":"Returns a shallow copy of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1096,"url":null},"def":{"name":"shallow","return_type":"Block","visibility":"Public","body":"self.class.new(parent: parent?, tape: has_tape? ? tape.copy : nil, dict: has_dict? ? dict.copy : nil, prototype: prototype)"}},{"html_id":"slice:Tuple(Block,Block)-instance-method","name":"slice","doc":"Slices this block at cursor. This results in two halves,\nwhich are consequently returned.","summary":"Slices this block at cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":685,"url":null},"def":{"name":"slice","return_type":"::Tuple(Block, Block)","visibility":"Public","body":"if has_tape?\nelse\n return {Block.new(parent: self), Block.new(parent: self)}\nend\nlhs, rhs = tape.slice\n{Block.new(parent: self, tape: lhs), Block.new(parent: self, tape: rhs)}\n"}},{"html_id":"slurp(source:String):self-instance-method","name":"slurp","doc":"Parses all forms in string *source*, and adds them to\nthis block.","summary":"Parses all forms in string source, and adds them to this block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String) : self","args_html":"(source : String) : self","location":{"filename":"src/novika/forms/block.cr","line_number":508,"url":null},"def":{"name":"slurp","args":[{"name":"source","external_name":"source","restriction":"String"}],"return_type":"self","visibility":"Public","body":"classifier = Classifier.new(source, block: self)\nScissors.cut(source) do |start, count, dot|\n classifier.classify(start, count, dot)\nend\nclassifier.end\nself\n"}},{"html_id":"sort_using!(&cmp:Form,Form->Int32):self-instance-method","name":"sort_using!","doc":"Sorts this block's tape inplace, calls *cmp* comparator proc\nfor each form pair for a comparison integer -1, 0, or 1.","summary":"Sorts this block's tape inplace, calls cmp comparator proc for each form pair for a comparison integer -1, 0, or 1.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":715,"url":null},"def":{"name":"sort_using!","yields":2,"block_arity":2,"block_arg":{"name":"cmp","external_name":"cmp","restriction":"(Form, Form -> Int32)"},"return_type":"self","visibility":"Public","body":"if has_tape?\nelse\n return self\nend\nself.tape = tape.sort_using!(cmp)\nself\n"}},{"html_id":"spot(io,vicinity=10,colorful=true)-instance-method","name":"spot","doc":"Appends a string representation of this block to *io* in\nwhich only forms in the negative and positive *vicinity*\nof this block's cursor are present, and the word before\nthe cursor is emphasized.\n\nDoes not respect `MAX_COUNT_TO_S`. Does not display quotes.\nDoes not display nested blocks.","summary":"Appends a string representation of this block to io in which only forms in the negative and positive vicinity of this block's cursor are present, and the word before the cursor is emphasized.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"args_string":"(io, vicinity = 10, colorful = true)","args_html":"(io, vicinity = 10, colorful = true)","location":{"filename":"src/novika/forms/block.cr","line_number":1284,"url":null},"def":{"name":"spot","args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"visibility":"Public","body":"io << \"[\"\nb = (cursor - vicinity).clamp(0..(count - 1))\ne = (cursor + vicinity).clamp(0..(count - 1))\n(b..e).each do |index|\n form = at(index)\n focus = index == (cursor - 1)\n (Colorize.with.bold.toggle(focus && colorful)).surround(io) do\n case form\n when Block\n io << \" […]\"\n when Quote\n io << \" '…'\"\n else\n (io << \" \") << form\n end\n end\n if focus\n io << (\" |\".colorize.toggle(colorful)).red\n end\nend\nio << \" ]\"\n"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/block.cr","line_number":966,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(entry_for?(name)).try(&.submit(form))"}},{"html_id":"swap:self-instance-method","name":"swap","doc":"Swaps two forms before the cursor, dies if none.","summary":"Swaps two forms before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":678,"url":null},"def":{"name":"swap","return_type":"self","visibility":"Public","body":"self.tape = tape.swap? || (die(\"at least two forms required before the cursor\"))\nself\n"}},{"html_id":"thru:Form-instance-method","name":"thru","doc":"Returns form after cursor, and moves cursor past it.\n\nSimilar to `eject`, but doesn't modify the block.","summary":"Returns form after cursor, and moves cursor past it.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":621,"url":null},"def":{"name":"thru","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"thru out of bounds\")\nend\nself.tape, _ = tape.thru? || (die(\"thru out of bounds\"))\n"}},{"html_id":"to(index:Int32):self-instance-method","name":"to","doc":"Moves tape cursor to *index*. Dies if *index* is out\nof bounds. See `Tape#to?`.","summary":"Moves tape cursor to index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":593,"url":null},"def":{"name":"to","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if (!has_tape?) && index.zero?\n return self\nend\nif has_tape?\nelse\n die(\"cursor index out of bounds\")\nend\nself.tape = (tape.to?(index)) || (die(\"cursor index out of bounds\"))\nself\n"}},{"html_id":"to_dict_block:Block-instance-method","name":"to_dict_block","doc":"Builds and returns a dictionary block for this block.\n\nDictionary block is an *orphan* block whose dictionary is a shallow\ncopy of this block's dictionary; and whose tape is empty.","summary":"Builds and returns a dictionary block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1122,"url":null},"def":{"name":"to_dict_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, dict: has_dict? ? dict.copy : nil)"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1269,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"(a?(Hook.as_quote, Quote)) || super()"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1309,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if repr = a?(Hook.as_quote, Quote)\n io << repr.string\n return\nend\nexecuted = exec_recursive(:to_s) do\n io << \"[\"\n if has_tape? && (!tape.empty?)\n (0...cursor).each do |index|\n (io << \" \") << (at(index))\n end\n if cursor == count\n else\n io << \" |\"\n (cursor...count).each do |index|\n (io << \" \") << (at(index))\n end\n end\n end\n if has_dict? && (!dict.empty?)\n io << \" ·\"\n dict.each do |name, entry|\n ((((io << \" \") << (entry.opener? ? \"@\" : \"$\")) << \"{\") << name) << \" :: \"\n entry.effect(io)\n io << \"}\"\n end\n end\n io << \" ]\"\nend\nif executed\nelse\n io << \"⭮\"\nend\n"}},{"html_id":"to_tape_block:Block-instance-method","name":"to_tape_block","doc":"Builds and returns a tape block for this block.\n\nTape block is an *orphan* block whose tape is a shallow copy\nof this block's tape; and whose dictionary is empty.","summary":"Builds and returns a tape block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1114,"url":null},"def":{"name":"to_tape_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, tape: has_tape? ? tape.copy : nil, leaf: leaf?)"}},{"html_id":"top:Form-instance-method","name":"top","doc":"Returns the top form, dies if none.","summary":"Returns the top form, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":661,"url":null},"def":{"name":"top","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"no top for block\")\nend\ntop? || (die(\"no top for block\"))\n"}},{"html_id":"top?:Form|Nil-instance-method","name":"top?","doc":"Returns the top form, or nil if none.","summary":"Returns the top form, or nil if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":668,"url":null},"def":{"name":"top?","return_type":"Form | ::Nil","visibility":"Public","body":"tape.top?"}},{"html_id":"unfriend(other:Block):self-instance-method","name":"unfriend","doc":"Removes *other* from the friendlist of this block.","summary":"Removes other from the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":754,"url":null},"def":{"name":"unfriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if has_friends?\nelse\n return self\nend\nfriends.delete_if do |friend|\n friend.is_a?(Block) && (friend.same?(other))\nend\nself\n"}}]},{"html_id":"novika/Novika/BlockIdMap","path":"Novika/BlockIdMap.html","kind":"alias","full_name":"Novika::BlockIdMap","name":"BlockIdMap","abstract":false,"locations":[{"filename":"src/novika/forms/block.cr","line_number":327,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Hash(UInt64, Novika::Block)","aliased_html":"Hash(UInt64, Novika::Block)","const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Maps block unique identifiers (currently, object ids are used as\nsuch) to blocks they identify.\n\nUsed instead of Sets for forcing identity-based lookup rather\nthan hash-based lookup.","summary":"Maps block unique identifiers (currently, object ids are used as such) to blocks they identify.
"},{"html_id":"novika/Novika/BlockPool","path":"Novika/BlockPool.html","kind":"class","full_name":"Novika::BlockPool","name":"BlockPool","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":549,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Creates a block pool by exploring the given pivot block's hierarchy, forms, etc.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"args_string":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","args_html":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","location":{"filename":"src/novika/image.cr","line_number":777,"url":null},"def":{"name":"new","args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"visibility":"Public","body":"pool = new\nvisitor = BlockVisitor.new(caps.block, mode)\nvisitor.enter(pivot)\npool.cb = caps.block.object_id\npool.pivot = pivot.object_id\npool.blocks = visitor.blocks\npool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":550,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"blocks:Array(FrozenBlock)-instance-method","name":"blocks","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"def":{"name":"blocks","return_type":"Array(FrozenBlock)","visibility":"Public","body":"@blocks"}},{"html_id":"blocks=(blocks:Array(FrozenBlock))-instance-method","name":"blocks=","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"args_string":"(blocks : Array(FrozenBlock))","args_html":"(blocks : Array(FrozenBlock))","def":{"name":"blocks=","args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"visibility":"Public","body":"@blocks = blocks"}},{"html_id":"cb:UInt64-instance-method","name":"cb","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"def":{"name":"cb","return_type":"UInt64","visibility":"Public","body":"@cb"}},{"html_id":"cb=(cb:UInt64)-instance-method","name":"cb=","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"args_string":"(cb : UInt64)","args_html":"(cb : UInt64)","def":{"name":"cb=","args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"visibility":"Public","body":"@cb = cb"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"pivot:UInt64-instance-method","name":"pivot","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"def":{"name":"pivot","return_type":"UInt64","visibility":"Public","body":"@pivot"}},{"html_id":"pivot=(pivot:UInt64)-instance-method","name":"pivot=","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"args_string":"(pivot : UInt64)","args_html":"(pivot : UInt64)","def":{"name":"pivot=","args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"visibility":"Public","body":"@pivot = pivot"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs (melts if necessary) the pivot block, its\nblock hierarchy, its forms etc. Returns the resulting\n`Block` form.","summary":"Reconstructs (melts if necessary) the pivot block, its block hierarchy, its forms etc.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":764,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"assembler = BlockAssembler.new(blocks, caps.block)\nassembler.resolve!(cb, caps.block)\nassembler.fetch(pivot)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Represents a boolean (true/false) value.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/boolean.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"boolean\""}}],"constructors":[{"html_id":"[](object):Boolean-class-method","name":"[]","doc":"Creates a `Boolean` subclass for the given *object*.","summary":"Creates a Boolean
subclass for the given object.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Snapshot of a boolean form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BooleanSnapshot]","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 0, cls: Novika::BooleanSnapshot, onlyif: nil, verify: nil}] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Boolean)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"args_string":"(form : Boolean)","args_html":"(form : Boolean)","location":{"filename":"src/novika/image.cr","line_number":85,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"visibility":"Public","body":"bool = new\nbool.state = form.is_a?(True)\nbool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":73,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"state:Bool-instance-method","name":"state","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state","return_type":"Bool","visibility":"Public","body":"@state == 1"}},{"html_id":"state=(state:UInt8)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"args_string":"(state : UInt8)","args_html":"(state : UInt8)","def":{"name":"state=","args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"visibility":"Public","body":"@state = state"}},{"html_id":"state=(value:Bool)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@state = UInt8.new(value ? 1 : 0)"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":81,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Boolean[state]"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Builtin","path":"Novika/Builtin.html","kind":"struct","full_name":"Novika::Builtin","name":"Builtin","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/builtin.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Wraps a snippet of Crystal (native) code, namely a Crystal\n`Proc`, for usage in the Novika-land.","summary":"Wraps a snippet of Crystal (native) code, namely a Crystal Proc
, for usage in the Novika-land.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/builtin.cr","line_number":20,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << @desc"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":33,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@desc =~ EFFECT_PATTERN ? (io << $~[1]) : \"native code\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the identifier of this builtin.
","abstract":false,"location":{"filename":"src/novika/forms/builtin.cr","line_number":9,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/builtin.cr","line_number":28,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"code.call(engine, engine.stack)\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":37,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[native code for: '\") << id) << \"']\""}}]},{"html_id":"novika/Novika/BuiltinSnapshot","path":"Novika/BuiltinSnapshot.html","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BuiltinSnapshot]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Builtin)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"args_string":"(form : Builtin)","args_html":"(form : Builtin)","location":{"filename":"src/novika/image.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"visibility":"Public","body":"builtin = new\nbuiltin.id = form.id\nbuiltin\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":246,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":252,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"assembler.cb.form_for(Novika::Word.new(id))"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Byteslice","path":"Novika/Byteslice.html","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/byteslice.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DEFAULT_PREVIEW","name":"DEFAULT_PREVIEW","value":"\"byteslice\"","doc":"Holds the default preview string for byteslices.","summary":"Holds the default preview string for byteslices.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":23,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"byteslice\""}}],"constructors":[{"html_id":"new(bytes:Bytes,preview:String=DEFAULT_PREVIEW,mutable:Bool=true)-class-method","name":"new","doc":"Initializes a byteslice from *bytes*.","summary":"Initializes a byteslice from bytes.
","abstract":false,"args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"args_string":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","args_html":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":15,"url":null},"def":{"name":"new","args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(bytes, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(io:IO,preview=DEFAULT_PREVIEW,mutable=true)-class-method","name":"new","doc":"Initializes a byteslice form from the given *io*.","summary":"Initializes a byteslice form from the given io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"args_string":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","args_html":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":19,"url":null},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(io, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(&)-class-method","name":"new","doc":"Yields an IO to the block, then returns a raw bytes\nform for it.","summary":"Yields an IO to the block, then returns a raw bytes form for it.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":82,"url":null},"def":{"name":"new","yields":1,"block_arity":1,"visibility":"Public","body":"io = IO::Memory.new\nyield io\nnew(io)\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @bytes == (other.@bytes)\nelse\n return false\nend\nif @mutable == (other.@mutable)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address-instance-method","name":"address","doc":"Returns the memory address where this byteslice points to.","summary":"Returns the memory address where this byteslice points to.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":66,"url":null},"def":{"name":"address","visibility":"Public","body":"@bytes.to_unsafe.address"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a sub-slice starting at *b*-th byte, and\nending at *e*-th byte.\n\nThe resulting byteslice *does not* preserve the\npreview string of this byteslice.","summary":"Returns a sub-slice starting at b-th byte, and ending at e-th byte.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":39,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nByteslice.new(@bytes[b..e], mutable: @mutable)\n"}},{"html_id":"at(index:Int32)-instance-method","name":"at","doc":"Returns the *index*-th byte.","summary":"Returns the index-th byte.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":28,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"byte = @bytes[index]? || (die(\"index out of bounds\"))\nDecimal.new(byte)\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of bytes in this byteslice.","summary":"Returns the amount of bytes in this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":46,"url":null},"def":{"name":"count","visibility":"Public","body":"@bytes.size"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":50,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @bytes.hash(hasher)\nhasher = @mutable.hash(hasher)\nhasher\n"}},{"html_id":"mutable?:Bool-instance-method","name":"mutable?","doc":"Returns whether this byteslice is mutable.","summary":"Returns whether this byteslice is mutable.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":12,"url":null},"def":{"name":"mutable?","return_type":"Bool","visibility":"Public","body":"@mutable"}},{"html_id":"points_to?(address:UInt64)-instance-method","name":"points_to?","doc":"Returns whether this byteslice points to the given *address*.","summary":"Returns whether this byteslice points to the given address.
","abstract":false,"args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"args_string":"(address : UInt64)","args_html":"(address : UInt64)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":89,"url":null},"def":{"name":"points_to?","args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"visibility":"Public","body":"address == self.address"}},{"html_id":"preview:String-instance-method","name":"preview","doc":"Returns the preview string of this byteslice.","summary":"Returns the preview string of this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":9,"url":null},"def":{"name":"preview","return_type":"String","visibility":"Public","body":"@preview"}},{"html_id":"same?(other:Byteslice)-instance-method","name":"same?","doc":"Returns whether this and *other* byteslices point to the same\nlocation in memory, and have the same mutability status.","summary":"Returns whether this and other byteslices point to the same location in memory, and have the same mutability status.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"args_string":"(other : Byteslice)","args_html":"(other : Byteslice)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":95,"url":null},"def":{"name":"same?","args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"visibility":"Public","body":"(other.points_to?(address)) && (@mutable == other.mutable?)"}},{"html_id":"to_io:IO::Memory-instance-method","name":"to_io","doc":"Wraps the underlying byte slice in an IO.","summary":"Wraps the underlying byte slice in an IO.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":71,"url":null},"def":{"name":"to_io","return_type":"IO::Memory","visibility":"Public","body":"IO::Memory.new(@bytes)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":54,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"[\") << @preview) << \", consists of \") << count) << \" \"\nio << (@mutable ? \"mutable\" : \"immutable\")\nio << \" byte(s)]\"\n"}},{"html_id":"to_unsafe:Bytes-instance-method","name":"to_unsafe","doc":"Returns the underlying byte slice.","summary":"Returns the underlying byte slice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":61,"url":null},"def":{"name":"to_unsafe","return_type":"Bytes","visibility":"Public","body":"@bytes"}},{"html_id":"write_to(io:IO)-instance-method","name":"write_to","doc":"Writes this byteslice to *io*.","summary":"Writes this byteslice to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":76,"url":null},"def":{"name":"write_to","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io.write(@bytes)"}}]},{"html_id":"novika/Novika/BytesliceSnapshot","path":"Novika/BytesliceSnapshot.html","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":268,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BytesliceSnapshot]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.size\nend}, {type: \"bytes\", name: content, cls: Bytes, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Byteslice)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"args_string":"(form : Byteslice)","args_html":"(form : Byteslice)","location":{"filename":"src/novika/image.cr","line_number":278,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"visibility":"Public","body":"byteslice = new\nbyteslice.content = form.to_unsafe\nbyteslice\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":269,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"content:Bytes-instance-method","name":"content","abstract":false,"def":{"name":"content","return_type":"Bytes","visibility":"Public","body":"@content"}},{"html_id":"content=(content:Bytes)-instance-method","name":"content=","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"args_string":"(content : Bytes)","args_html":"(content : Bytes)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"visibility":"Public","body":"@content = content"}},{"html_id":"count:UInt64-instance-method","name":"count","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":274,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Byteslice.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Capabilities","path":"Novika/Capabilities.html","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities","abstract":false,"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/disk.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/ink.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/system.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Capabilities/IConsole","path":"Novika/Capabilities/IConsole.html","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"BG_DEFAULT","name":"BG_DEFAULT","value":"Color.new(Decimal.new(0), Decimal.new(0), Decimal.new(0))","doc":"Background color used when there is no user-provided\nbackground color.","summary":"Background color used when there is no user-provided background color.
"},{"id":"FG_DEFAULT","name":"FG_DEFAULT","value":"Color.new(Decimal.new(255), Decimal.new(255), Decimal.new(255))","doc":"Foreground color used when there is no user-provided\nforeground color.","summary":"Foreground color used when there is no user-provided foreground color.
"}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Console","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables the console API.\n\nExposed vocabulary:\n\n* `console:on`, implemented by `on`\n* `console:off`, implemented by `off`\n* `console:256`, implemented by `colors_256`\n* `console:compat`, implemented by `colors_compat`\n* `console:truecolor`, implemented by `colors_truecolor`\n* `console:readKey`, implemented by `read_key`\n* `console:size`, implemented by `size`\n* `console:hadKeyPressed?`, implemented by `had_key_pressed?`\n* `console:hadCtrlPressed?`, implemented by `had_ctrl_pressed?`\n* `console:hadAltPressed?`, implemented by `had_alt_pressed?`\n* `console:hadShiftPressed?`, implemented by `had_shift_pressed?`\n* `console:hadBackspacePressed?`, implemented by `had_backspace_pressed?`\n* `console:hadFnPressed?`, implemented by `had_fn_pressed?`\n* `console:hadInsertPressed?`, implemented by `had_insert_pressed?`\n* `console:hadDeletePressed?`, implemented by `had_delete_pressed?`\n* `console:hadHomePressed?`, implemented by `had_home_pressed?`\n* `console:hadEndPressed?`, implemented by `had_end_pressed?`\n* `console:hadPgupPressed?`, implemented by `had_pgup_pressed?`\n* `console:hadPgdnPressed?`, implemented by `had_pgdn_pressed?`\n* `console:hadLeftPressed?`, implemented by `had_left_pressed?`\n* `console:hadRightPressed?`, implemented by `had_right_pressed?`\n* `console:hadUpPressed?`, implemented by `had_up_pressed?`\n* `console:hadDownPressed?`, implemented by `had_down_pressed?`\n* `console:getCharPressed`, implemented by `get_char_pressed`\n* `console:change`, implemented by `change`\n* `console:appendEcho`, implemented by `append_echo`\n* `console:present`, implemented by `present`\n* `console:clear`, implemented by `clear`","summary":"Enables the console API.
","class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":45,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"console\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":53,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":49,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"enables the console API\""}}],"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/console.cr","line_number":152,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"bg-instance-method","name":"bg","doc":"Returns the active primary background color.","summary":"Returns the active primary background color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":168,"url":null},"def":{"name":"bg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg1|\n __arg1.bg.last?\nend) || BG_DEFAULT"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/console.cr","line_number":158,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":""}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":64,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":67,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":70,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"fg-instance-method","name":"fg","doc":"Returns the active primary foreground color.","summary":"Returns the active primary foreground color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":163,"url":null},"def":{"name":"fg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg0|\n __arg0.fg.last?\nend) || FG_DEFAULT"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/console.cr","line_number":147,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":95,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":101,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":139,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":92,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":110,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":134,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":116,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":104,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":113,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":107,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":89,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":125,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":122,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":119,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":128,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":98,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":131,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/console.cr","line_number":172,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"console:on\", \"( -- ): enables the console. Must be called before using\\n any other console-related word.\") do |engine|\n on(engine)\nend\ntarget.at(\"console:off\", \"( -- ): disables the console. Must be called at the end\\n of your program or when you don't need console anymore.\") do |engine|\n off(engine)\nend\ntarget.at(\"console:compat\", \"( -- ): enables the compatibility color output mode. In\\n this mode, only 8 colors are available. All RGB colors\\n are automatically reduced to one of those 8 colors.\") do |engine|\n colors_compat(engine)\nend\ntarget.at(\"console:256\", \"( -- ): enables the 256-color output mode. In this mode,\\n 256 colors are available. All RGB colors are automatically\\n reduced to one of those 256 colors.\") do |engine|\n colors_256(engine)\nend\ntarget.at(\"console:truecolor\", \"( -- ): enables the truecolor output mode. In this mode,\\nall colors are available and are passed to the console\\nas-is.\") do |engine|\n colors_truecolor(engine)\nend\ntarget.at(\"console:size\", \"( -- Cw Ch ): leaves the Console width (in columns) and\\n Console height (in rows).\") do |engine, stack|\n w, h = size(engine)\n w.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"console:setTimeout\", \"( D -- ): sets input timeout to Duration, given in *milliseconds*.\\n\\n * If Duration is negative, `console:readKey` will wait\\n for input indefinitely (i.e., until there is input).\\n\\n * If Duration is zero, `console:readKey` won't wait for\\n input at all, but make note if there is any at the moment.\\n\\n * If Duration is positive, `console:readKey` will peek\\n during the timeout window.\") do |_, stack|\n @timeout = stack.drop.a(Decimal)\nend\ntarget.at(\"console:readKey\", \"( -- ): peeks or waits for input. See `console:setTimeout`.\\n Refreshes the input state. Use `console:hadKeyPressed` and\\n friends to explore the input state afterwards.\") do |engine|\n read_key(engine, @timeout)\nend\ntarget.at(\"console:hadKeyPressed?\", \"( -- true/false ): leaves whether any key was pressed.\") do |engine, stack|\n (had_key_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCtrlPressed?\", \"( -- true/false ): leaves whether the CTRL key was pressed.\") do |engine, stack|\n (had_ctrl_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadAltPressed?\", \"( -- true/false ): leaves whether the ALT key was pressed.\") do |engine, stack|\n (had_alt_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadShiftPressed?\", \"( -- true/false ): leaves whether the SHIFT key was pressed.\") do |engine, stack|\n (had_shift_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadBackspacePressed?\", \"( -- true/false ): leaves whether the Backspace key was pressed.\") do |engine, stack|\n (had_backspace_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadFnPressed?\", \"( -- true/false ): leaves whether one of the function keys\\n F1-F12 was pressed.\") do |engine, stack|\n (had_fn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadInsertPressed?\", \"( -- true/false ): leaves whether the INSERT key was pressed.\") do |engine, stack|\n (had_insert_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDeletePressed?\", \"( -- true/false ): leaves whether the DELETE key was pressed.\") do |engine, stack|\n (had_delete_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadHomePressed?\", \"( -- true/false ): leaves whether the HOME key was pressed.\") do |engine, stack|\n (had_home_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadEndPressed?\", \"( -- true/false ): leaves whether the END key was pressed.\") do |engine, stack|\n (had_end_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageUpPressed?\", \"( -- true/false ): leaves whether the PAGE UP key was pressed.\") do |engine, stack|\n (had_pgup_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageDownPressed?\", \"( -- true/false ): leaves whether the PAGE DOWN key was pressed.\") do |engine, stack|\n (had_pgdn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadLeftPressed?\", \"( -- true/false ): leaves whether the LEFT ARROW key was pressed.\") do |engine, stack|\n (had_left_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadRightPressed?\", \"( -- true/false ): leaves whether the RIGHT ARROW key was pressed.\") do |engine, stack|\n (had_right_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadUpPressed?\", \"( -- true/false ): leaves whether the UP ARROW key was pressed.\") do |engine, stack|\n (had_up_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDownPressed?\", \"( -- true/false ): leaves whether the DOWN ARROW key was pressed.\") do |engine, stack|\n (had_down_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCharPressed?\", \"( -- true/false ): leaves whether EXCLUSIVELY a printable\\n character key was pressed (no CTRL, ALT, etc.) Whether the\\n SHIFT key was pressed or not is ignored.\") do |engine, stack|\n (had_char_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:getCharPressed\", \"( -- Cq ): leaves Char quote for the key that was pressed.\\n Usually a lowercase or uppercase letter; but also may look\\n like `'\\\\n'` or `'\\\\t'`, etc.)\\n\\nIn case the key that was pressed cannot be represented\\nby the means of a quote, or if the user did not press\\nany key, an empty quote is left in place of Char quote.\") do |engine, stack|\n (get_char_pressed(engine)).onto(stack)\nend\ntarget.at(\"console:change\", \"( X Y -- ): changes the color of the cell at X, Y coordinates\\n to be the foreground, background colors set by ink's\\n `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n change(engine, x, y, fg, bg)\nend\ntarget.at(\"console:appendEcho\", \"( F X Y -- ): appends echo of Form at an X and Y position\\n (in columns and rows correspondingly) using the foreground,\\n background colors set by ink's `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, fg, bg, q)\nend\ntarget.at(\"console:withReverseAppendEcho\", \"( F X Y -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, bg, fg, q)\nend\ntarget.at(\"console:present\", \"( -- ): syncs internal buffer and console.\") do |engine|\n present(engine)\nend\ntarget.at(\"console:clear\", \"( -- ): clears console with primary colors.\") do |engine|\n clear(engine, fg, bg)\nend\n"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":61,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":58,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":155,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":86,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":73,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IDisk","path":"Novika/Capabilities/IDisk.html","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/disk.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Disk","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"disk\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes various disk-related (storage-related) words\""}}],"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":18,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":63,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":35,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":21,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":24,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":27,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":30,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":46,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":79,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"disk:has?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n on the disk.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:canRead?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and is readable.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (can_read?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasDir?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a directory.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_dir?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasFile?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a file.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_file?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasSymlink?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a symlink.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_symlink?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:dirEmpty?\", \"( Pq -- true/false ): leaves whether the directory at Path quote\\n is empty. Dies if Path quote points to something other than\\n a directory, or doesn't exist.\") do |engine, stack|\n path = stack.drop.a(Quote)\n if boolean = dir_empty?(engine, path)\n else\n path.die(\"no directory at path\")\n end\n boolean.onto(stack)\nend\ntarget.at(\"disk:join\", \"( Bpq Cpq -- Pq ): leaves Path quote, which is the result of joining\\n Base path quote and Child path quote using the platform-specific\\n path separator.\\n\\n```\\n'hello' 'world' disk:join leaves: 'hello/world' \\\"On Unix\\\"\\n'hello' 'world' disk:join leaves: 'hello\\\\\\\\world' \\\"On Windows\\\"\\n```\") do |engine, stack|\n cp = stack.drop.a(Quote)\n bp = stack.drop.a(Quote)\n (join(engine, bp, cp)).onto(stack)\nend\ntarget.at(\"disk:pwd\", \"( -- Pq ): leaves Path quote pointing to the current working directory.\") do |engine, stack|\n (pwd(engine)).onto(stack)\nend\ntarget.at(\"disk:home\", \"( -- Pq ): leaves Path quote pointing to the user's home directory.\") do |engine, stack|\n (home(engine)).onto(stack)\nend\ntarget.at(\"disk:touch\", \"( Pq -- ): creates an empty file at the location that Path quote\\n points to. Does nothing if Path already exists.\\n\\n```\\ndisk:pwd 'demo.txt' disk:join $: demoPath\\ndemoPath disk:touch 'Hey!' demoPath disk:write\\ndemoPath disk:read leaves: 'Hey!'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n touch(engine, path)\nend\ntarget.at(\"disk:mkdir\", \"( Pq -- ): creates an empty directory at the location that Path\\n quote points to. Also creates any non-existing intermediate\\n directories. Does nothing if Path quote already points to an\\n existing directory, file, symlink, etc.\\n\\n```\\ndisk:pwd 'demo-dir-a' disk:join\\n 'demo-dir-b' disk:join\\n 'demo-dir-c' disk:join $: demoDirPath\\n\\ndemoDirPath disk:mkdir\\ndemoDirPath disk:hasDir? leaves: true\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n mkdir(engine, path)\nend\ntarget.at(\"disk:copy\", \"( Spq Dpq -- ): copies whatever Source path quote points to, to the\\n location that Destination path quote points to. If Source is a\\n directory, it is copied recursively.\\n\\nIf copy process failed (for instance if there is already something\\nat Destination path quote), dies.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\ndisk:pwd 'b.txt' disk:join $: pathToB\\n\\npathToA disk:touch pathToA 'Content of file a.txt' disk:write\\npathToA pathToB disk:copy\\n\\npathToA disk:read leaves: 'Content of file a.txt'\\npathToB disk:read leaves: 'Content of file a.txt'\\n```\") do |engine, stack|\n dst = stack.drop.a(Quote)\n src = stack.drop.a(Quote)\n if copy(engine, src, dst)\n else\n src.die(\"could not copy\")\n end\nend\ntarget.at(\"disk:read\", \"( Pq -- Q ): leaves Quote containing the content of the file that\\n Path quote points to. Dies if Path quote points to nothing or if\\n it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n if contents = read?(engine, path)\n else\n path.die(\"no file at path\")\n end\n contents.onto(stack)\nend\ntarget.at(\"disk:write\", \"( Q/Bf Pq -- ): (over)writes the content of the file that Path quote\\n points to, with the given Quote or Byteslice form. Dies if Path quote\\n points to nothing or if it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n\\n[ 0 $: count\\n [ count dup 1 + =: count ]\\n] @: counter\\n\\ncounter @: inc\\ninc leaves: 0\\ninc leaves: 1\\ninc leaves: 2\\n\\ndisk:pwd 'counter.nki' disk:join $: pathToCounter\\npathToCounter disk:touch\\n\\n\\\"Save inc state using NKI and write the resulting byteslice\\n to the file we've just created. Note that captureAll is similar\\n to deep copy (it copies the *entire* Novika environment including\\n the standard library), it's not the best way to do this but\\n by far the easiest.\\\"\\n(this -> inc nki:captureAll) pathToCounter disk:write\\n\\npathToCounter disk:read toByteslice nki:toBlock @: incFromDisk\\n\\nincFromDisk leaves: 3\\nincFromDisk leaves: 4\\nincFromDisk leaves: 5\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n content = stack.drop.a(Quote | Byteslice)\n if write?(engine, content, path)\n else\n path.die(\"no file at path\")\n end\nend\n"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":40,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":55,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":43,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":67,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":""}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":50,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":72,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":77,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IFrontend","path":"Novika/Capabilities/IFrontend.html","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Frontend","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"frontend\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes information about the language frontend\""}}],"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":21,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":23,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"novika:version\", \"( -- Vq ): leaves Version of the frontend as a quote.\") do |engine, stack|\n (version(engine)).onto(stack)\nend\ntarget.at(\"novika:capabilities\", \"( -- Lb ): lists the ids of capabilities provided by the\\n frontend in List block.\\n\\n```\\n\\\"Yours may differ!\\\"\\nnovika:capabilities leaves: [ [ 'essential' 'colors' 'console' ] ]\\n```\") do |engine, stack|\n (capabilities(engine)).onto(stack)\nend\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":18,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IInk","path":"Novika/Capabilities/IInk.html","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/ink.cr","line_number":14,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"NO_SYSTEM_ECHO_ERROR","name":"NO_SYSTEM_ECHO_ERROR","value":"\"with...Echo words need 'echo' from capability 'system', but this capability is not available\""}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Ink","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables colorful output using `withColorAppendEcho` and friends.\n\nExposed vocabulary:\n\n* `withEchoFg`, generic implementation\n* `withEchoBg`, generic implementation\n* `dropEchoFg`, generic implementation\n* `dropEchoBg`, generic implementation\n* `withColorAppendEcho`, implemented by `with_color_append_echo`\n* `withEmphasisAppendEcho`, implemented by `with_emphasis_append_echo`\n* `withReverseAppendEcho`, generic implementation; when no\n colors given by the use, `with_reverse_append_echo` is used.","summary":"Enables colorful output using withColorAppendEcho
and friends.
Echo background color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg","visibility":"Public","body":"@bg"}},{"html_id":"bg=(bg:Array(Novika::Color))-instance-method","name":"bg=","doc":"Echo background color stack.","summary":"Echo background color stack.
","abstract":false,"args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"args_string":"(bg : Array(Novika::Color))","args_html":"(bg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg=","args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@bg = bg"}},{"html_id":"enabled=(enabled:Bool)-instance-method","name":"enabled=","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"args_string":"(enabled : Bool)","args_html":"(enabled : Bool)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled=","args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"visibility":"Public","body":"@enabled = enabled"}},{"html_id":"enabled?:Bool-instance-method","name":"enabled?","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled?","return_type":"Bool","visibility":"Public","body":"if (value = @enabled).nil?\n @enabled = (Novika.colorful?)\nelse\n value\nend"}},{"html_id":"fg:Array(Novika::Color)-instance-method","name":"fg","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg","visibility":"Public","body":"@fg"}},{"html_id":"fg=(fg:Array(Novika::Color))-instance-method","name":"fg=","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"args_string":"(fg : Array(Novika::Color))","args_html":"(fg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg=","args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@fg = fg"}},{"html_id":"inject(intotarget)-instance-method","name":"inject","doc":"Injects the colors vocabulary into *target*.","summary":"Injects the colors vocabulary into target.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":62,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"withEchoFg\", \"( C -- ): pushes Color form onto the echo foreground\\n color stack.\") do |_, stack|\n fg << (stack.drop.a(Color))\nend\ntarget.at(\"withEchoBg\", \"( C -- ): pushes Color form onto the echo background\\n color stack.\") do |_, stack|\n bg << (stack.drop.a(Color))\nend\ntarget.at(\"dropEchoFg\", \"( -- ): drops a color from the echo foreground color stack.\") do\n fg.pop?\nend\ntarget.at(\"dropEchoBg\", \"( -- ): drops a color from the echo background color stack.\") do\n bg.pop?\nend\ntarget.at(\"withReverseAppendEcho\", \"( F -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\\n\\nNote: if unsupported by the output stream, will print\\nForm as-is.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? && bg.last?)\n with_color_append_echo(engine, bg.last, fg.last, form)\n else\n with_reverse_append_echo(engine, form)\n end\nend\ntarget.at(\"withEmphasisAppendEcho\", \"( F -- ): same as `withColorAppendEcho`, but also emphasizes\\n echo of Form. Bold style is used by default, but implementors\\n may choose e.g. italic.\") do |engine, stack|\n form = stack.drop\n if enabled?\n with_emphasis_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\ntarget.at(\"withColorAppendEcho\", \"( F -- ): appends Form with last color from the echo\\n foreground color stack set as foreground color, and\\n last color from the echo background stack set as background\\n color, to the standard output stream.\\n\\nNote: some implementations (particularly Novika's default\\nimplementation) choose to restrict foreground and background\\ncolors to system's basic 16 colors for compatibility &\\nportability. If you want more cross-platform control over\\ncolors (and pretty much everything else), take a look at\\nconsole capability.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? || bg.last?)\n with_color_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\n"}},{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":46,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":59,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/Impl","path":"Novika/Capabilities/Impl.html","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl","abstract":false,"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/colors.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/console.cr","line_number":5,"url":null},{"filename":"src/novika/capabilities/impl/disk.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/essential.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ink.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/nki.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/system.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"types":[{"html_id":"novika/Novika/Capabilities/Impl/Bit","path":"Novika/Capabilities/Impl/Bit.html","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"bit\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"allows to interpret decimals as sequences of bits\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"bit:fromLeft\", \"( D I -- B ): leaves Index-th Bit from left in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromLeft leaves: 1\\n0b00010001 1 bit:fromLeft leaves: 0\\n0b00010001 2 bit:fromLeft leaves: 0\\n0b00010001 3 bit:fromLeft leaves: 0\\n0b00010001 4 bit:fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n if bit = decimal.nth_ms_bit?(index)\n else\n index.die(\"bit index out of bounds\")\n end\n bit.onto(stack)\nend\ntarget.at(\"bit:fromRight\", \"( D I -- B ): leaves Index-th Bit from right in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromRight leaves: 1\\n0b00010001 1 bit:fromRight leaves: 0\\n0b00010001 2 bit:fromRight leaves: 0\\n0b00010001 3 bit:fromRight leaves: 0\\n0b00010001 4 bit:fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n (decimal.nth_ls_bit(index)).onto(stack)\nend\ntarget.at(\"bit:count\", \"( D -- Bc ): leaves Bit count, the number of bits in the given\\n Decimal. Dies if Decimal has a fractional part.\\n\\n```\\n0b00010001 bit:count leaves: 4\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n decimal.bitcount.onto(stack)\nend\ntarget.at(\"bit:or\", \"( D D -- D ): combines two Decimal numbers using bitwise or, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b00010001\\n0b10001000 bit:or leaves:\\n0b10011001\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a | b).onto(stack)\nend\ntarget.at(\"bit:and\", \"( D D -- D ): combines two Decimal numbers using bitwise and, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b10011001\\n0b00011000 bit:and leaves:\\n0b00011000\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a & b).onto(stack)\nend\ntarget.at(\"bit:bits\", \"( D -- Bb ): leaves Bits block for the given Decimal, which contains\\n the binary representation of the *absolute value* of Decimal, starting\\n with the most-significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [ 1 0 0 1 1 0 0 1 ]\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n bits = Block.new\n decimal.each_bit(&.onto(bits))\n bits.onto(stack)\nend\ntarget.at(\"bit:fromBits\", \"( Bb -- D ): converts Bits block to a Decimal. Bits block should\\n contain binary digits (represented by `0` or `1`), and should\\n begin with the most significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [[ 1 0 0 1 1 0 0 1 ]]\\n bit:fromBits leaves: 0b10011001\\n```\") do |_, stack|\n bits = stack.drop.a(Block)\n acc = Decimal.new(0)\n pow = Decimal.new(bits.count - 1)\n one = Decimal.new(1)\n two = Decimal.new(2)\n bits.each do |bit|\n acc = acc + (((bit.a(Decimal)).int.in(0..1)) * (two ** pow))\n pow = pow - one\n end\n acc.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Colors","path":"Novika/Capabilities/Impl/Colors.html","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/colors.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"colors\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes vocabulary for working with colors\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"rgb\", \"( R G B -- Cf ): creates a Color form from three decimals\\n Red (0-255), Green (0-255), and Blue (0-255).\\n\\n```\\n36 255 255 rgb toQuote leaves: 'rgb(36, 255 ,255)'\\n```'\") do |_, stack|\n b = ((stack.drop.a(Decimal)).in(0..255)).posint\n g = ((stack.drop.a(Decimal)).in(0..255)).posint\n r = ((stack.drop.a(Decimal)).in(0..255)).posint\n (Color.rgb(r, g, b)).onto(stack)\nend\ntarget.at(\"getRGB\", \"( Cf -- R G B ): leaves Red, Green, Blue values for a\\n Color form.\\n\\n```\\n0 25 3 rgb \\\"rgb(0, 25, 3)\\\" getRGB leaves: [ 0 25 3 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n r, g, b = color.rgb\n r.onto(stack)\n g.onto(stack)\n b.onto(stack)\nend\ntarget.at(\"hsl\", \"( H S L -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Lightness (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSL color is\\nfirst converted into RGB.\\n\\n```\\n206 35 46 hsl toQuote leaves: 'rgb(76, 123, 158)'\\n```\") do |_, stack|\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsl(h, s, l)).onto(stack)\nend\ntarget.at(\"getHSL\", \"( Cf -- H S L ): leaves Hue, Saturation, Lightness for\\n a Color form.\\n\\n```\\n206 35 46 hsl \\\"rgb(76, 123, 158)\\\" getHSL leaves: [ 206 35 46 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, l = color.hsl\n h.onto(stack)\n s.onto(stack)\n l.onto(stack)\nend\ntarget.at(\"hsv\", \"( H S V -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Value (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSV color is\\nfirst converted into RGB.\\n\\n```\\n120 100 100 hsv toQuote leaves: 'rgb(0, 255, 0)'\\n```\") do |_, stack|\n v = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsv(h, s, v)).onto(stack)\nend\ntarget.at(\"getHSV\", \"( Cf -- H S V ): leaves Hue, Saturation, Value for a\\n Color form.\\n\\n```\\n180 100 50 hsv \\\"rgb(0,128,128)\\\" getHSV leaves: [ 180 100 50 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, v = color.hsv\n h.onto(stack)\n s.onto(stack)\n v.onto(stack)\nend\ntarget.at(\"lch\", \"( L C H -- Cf ): creates a Color form from three decimals\\n Lightness (0-100), Chroma (0-132), Hue (0-360).\\n\\nSince color forms are stored as RGB, the LCH color is\\nfirst converted into RGB.\\n\\nLCH colors are tricky to implement but very fun to use.\\nThat's why they're in Novika's standard library.\\n\\nCIELAB encloses more colors than sRGB, so some conversion\\nimprecisions *are* to be expected because some colors just\\nfall out of sRGB gamut (lossiness is especially noticeable\\nin LCH -> RGB -> LCH conversions, but it stabilizes on the\\nlast step because the last step's LCH is guraranteed to be\\ninside the sRGB gamut).\\n\\nAny color out of the sRGB gamut is brought into the sRGB\\ngamut by lowering chroma until it's in the sRGB bounds.\\n\\nHere is a 'good' conversion, meaning it nicely closes\\non itself:\\n\\n```\\n78 74 133 lch $: color\\n\\ncolor toQuote leaves: 'rgb(122, 215, 85)'\\ncolor getLCH leaves: [ 78 74 133 ]\\ncolor getLCH lch toQuote leaves: 'rgb(122, 215, 85)''\\n\\\"And so on...\\\"\\n```\\n\\nAnd here is a bad conversion. At first, though, for it\\ndoes stabilize after a few rounds as it falls firmly\\ninto the sRGB color space.\\n\\n```\\n74 107 26 lch $: color\\ncolor toQuote leaves: 'rgb(255, 154, 151)'\\n\\n\\\"Note how many chroma units we lose! Plus, Lab and\\n LCH have hue shift on chroma changes, hence 26 -> 25.\\\"\\ncolor getLCH leaves: [ 74 41 25 ]\\n\\ncolor getLCH lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\ncolor getLCH lch getLCH leaves: [ 74 41 25 ]\\n\\\"... and so on, conversion had stabilized ...\\\"\\n```\\n\\nYou don't necessarily have to think about this, because\\nthe resulting colors do look very similar, differing in\\npoints rather than magnitudes. Just be aware that the\\nconversion method used by this word and `getLCH` is lossy\\nin some cases.\") do |_, stack|\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n c = ((stack.drop.a(Decimal)).in(0..132)).posint\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n (Color.lch(l, c, h)).onto(stack)\nend\ntarget.at(\"getLCH\", \"( Cf -- L C H ): leaves Lightness, Chroma, Hue for a Color\\n form. Please read documentation for `lch` to understand\\n why `a b c lch getLCH` might not leave `a b c`.\\n\\n```\\n78 74 133 lch toQuote leaves: 'rgb(122, 215, 85)'\\n78 74 133 lch getLCH leaves: [ 78 74 133 ]\\n\\n74 107 26 lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\n\\\"Chroma lowered to fit into sRGB. Lab and LCH have hue\\n shift on chroma changes, 26 -> 25\\\"\\n74 107 26 lch getLCH leaves: [ 74 41 25 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n l, c, h = color.lch\n l.onto(stack)\n c.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"withAlpha\", \"( Cf A -- Cf' ): leaves Color form with alpha channel\\n set to Alpha (0-255).\\n\\n```\\n0 25 3 rgb toQuote leaves: 'rgb(0, 25, 3)'\\n0 25 3 rgb 100 withAlpha toQuote leaves: 'rgba(0, 25, 3, 100)'\\n```\") do |_, stack|\n alpha = ((stack.drop.a(Decimal)).in(0..255)).posint\n color = stack.drop.a(Color)\n color.a = alpha\n color.onto(stack)\nend\ntarget.at(\"getAlpha\", \"( Cf -- A ): leaves Alpha for the given Color form.\\n\\n```\\n0 25 3 rgb getAlpha leaves: 255 \\\"Opaque = 255\\\"\\n0 25 3 rgb 100 withAlpha getAlpha leaves: 100\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n color.a.onto(stack)\nend\ntarget.at(\"fromPalette\", \"( Cf Pb -- Cc ): leaves the Closest color form to Color from\\n a Palette block. How close the color is is determined by\\n distance: the Closest color is that color in Palette block\\n to which Color has least (minimum) distance.\\n\\n```\\n[ 0 0 0 rgb\\n 255 0 0 rgb\\n 0 255 0 rgb\\n 0 0 255 rgb\\n 255 255 255 rgb\\n] vals $: pal\\n\\n0 0 0 rgb pal fromPalette toQuote leaves: 'rgb(0, 0, 0)'\\n76 175 80 rgb pal fromPalette \\\"greenish\\\" toQuote leaves: 'rgb(0, 255, 0)'\\n220 237 200 rgb pal fromPalette \\\"very light green\\\" toQuote leaves: 'rgb(255, 255, 255)'\\n74 20 140 rgb pal fromPalette \\\"very dark purple\\\" toQuote leaves: 'rgb(255, 0, 0)'\\n```\") do |_, stack|\n palette = stack.drop.a(Block)\n color = stack.drop.a(Color)\n colors = [] of Color\n palette.each do |pcolor|\n colors << (pcolor.a(Color))\n end\n (color.closest(colors)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Console","path":"Novika/Capabilities/Impl/Console.html","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/console.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":208,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.print(xi, yi, fg, bg, quote.string[...(Termbox.width - xi)])\nend\n"}},{"html_id":"change(engine,x:Decimal,y:Decimal,fg:Color,bg:Color)-instance-method","name":"change","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":199,"url":null},"def":{"name":"change","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.change(xi, yi, fg, bg)\nend\n"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":221,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nTermbox.clear(fg, bg)\nTermbox.clear\n"}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":21,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M256_A\nTermbox.set_output_mode(Termbox::OutputMode::M256)\n"}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":26,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M8_A\nTermbox.set_output_mode(Termbox::OutputMode::Normal)\n"}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":31,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = nil\nTermbox.set_output_mode(Termbox::OutputMode::Truecolor)\n"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":110,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"if event = @event.as?(Termbox::Event::KeyEvent)\nelse\n return Quote.new(\"\")\nend\nif char = event.char\n return Quote.new(char)\nend\nkey = event.key.not_nil!\ncase key\nwhen .ctrl_tilde?\n char = '~'\nwhen .ctrl_2?\n char = '2'\nwhen .ctrl_a?\n char = 'a'\nwhen .ctrl_b?\n char = 'b'\nwhen .ctrl_c?\n char = 'c'\nwhen .ctrl_d?\n char = 'd'\nwhen .ctrl_e?\n char = 'e'\nwhen .ctrl_f?\n char = 'f'\nwhen .ctrl_g?\n char = 'g'\nwhen .ctrl_h?\n char = 'h'\nwhen .tab?\n char = '\\t'\nwhen .ctrl_i?\n char = 'i'\nwhen .ctrl_j?\n char = 'j'\nwhen .ctrl_k?\n char = 'k'\nwhen .ctrl_l?\n char = 'l'\nwhen .enter?\n char = '\\n'\nwhen .ctrl_m?\n char = 'm'\nwhen .ctrl_n?\n char = 'n'\nwhen .ctrl_o?\n char = 'o'\nwhen .ctrl_p?\n char = 'p'\nwhen .ctrl_q?\n char = 'q'\nwhen .ctrl_r?\n char = 'r'\nwhen .ctrl_s?\n char = 's'\nwhen .ctrl_t?\n char = 't'\nwhen .ctrl_u?\n char = 'u'\nwhen .ctrl_v?\n char = 'v'\nwhen .ctrl_w?\n char = 'w'\nwhen .ctrl_x?\n char = 'x'\nwhen .ctrl_y?\n char = 'y'\nwhen .ctrl_z?\n char = 'z'\nwhen .esc?\n char = '\\e'\nwhen .ctrl_lsq_bracket?\n char = '['\nwhen .ctrl_3?\n char = '3'\nwhen .ctrl_4?\n char = '4'\nwhen .ctrl_backslash?\n char = '\\\\'\nwhen .ctrl_5?\n char = '5'\nwhen .ctrl_rsq_bracket?\n char = ']'\nwhen .ctrl_6?\n char = '6'\nwhen .ctrl_7?\n char = '7'\nwhen .ctrl_slash?\n char = '/'\nwhen .ctrl_underscore?\n char = '_'\nwhen .space?\n char = ' '\nwhen .ctrl_8?\n char = '8'\nwhen .f1?\n char = '1'\nwhen .f2?\n char = '2'\nwhen .f3?\n char = '3'\nwhen .f4?\n char = '4'\nwhen .f5?\n char = '5'\nwhen .f6?\n char = '6'\nwhen .f7?\n char = '7'\nwhen .f8?\n char = '8'\nwhen .f9?\n char = '9'\nwhen .f10?\n char = \"10\"\nwhen .f11?\n char = \"11\"\nwhen .f12?\n char = \"12\"\nelse\n return Quote.new(\"\")\nend\nQuote.new(char)\n"}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":56,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.alt?]\n"}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":80,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n key.backspace? || key.backspace2?\nend"}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":106,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"Boolean[!(!(@event.as?(Termbox::Event::KeyEvent)).try do |__arg5|\n __arg5.char.try(&.printable?)\nend)]"}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":50,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.ctrl?]\n"}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.delete?)"}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":102,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_down?)"}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.end?)"}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":68,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n case key\n when .f1?, .f2?, .f3?, .f4?, .f5?, .f6?, .f7?, .f8?, .f9?, .f10?, .f11?, .f12?\n true\n end\nend"}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.home?)"}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.insert?)"}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":44,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[!(!event)]\n"}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":90,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_left?)"}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgdn?)"}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgup?)"}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":94,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_right?)"}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":62,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && (event.char.try(&.uppercase?) || event.mod.shift?)]\n"}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":98,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_up?)"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":17,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.disable"}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":13,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.enable"}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":217,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.present"}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":40,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":"@event = Termbox.peek?(timeout.to_i)"}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":36,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":"{Decimal.new(Termbox.width), Decimal.new(Termbox.height)}"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Disk","path":"Novika/Capabilities/Impl/Disk.html","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/disk.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":5,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.readable?(path.string)]"}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":51,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if File.exists?(src.string)\nelse\n return false\nend\nFileUtils.cp_r(src.string, dst.string)\ntrue\n"}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":25,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":"if File.directory?(path.string)\n Boolean[Dir.empty?(path.string)]\nend"}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":9,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.exists?(path.string)]"}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":17,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[Dir.exists?(path.string)]"}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":13,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.file?(path.string)]"}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":21,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.symlink?(path.string)]"}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":37,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Path.home.to_s)"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":29,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(File.join(base.string, child.string))"}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":45,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"if File.exists?(path.string)\n return\nend\nFileUtils.mkdir_p(path.string)\n"}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":33,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Dir.current)"}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":59,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if File.file?(path.string)\n Quote.new(File.read(path.string))\nend"}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":41,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"File.touch(path.string)"}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":63,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.write(path.string, content.string)\ntrue\n"}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":71,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.open(path.string, \"wb\") do |handle|\n content.write_to(handle)\nend\ntrue\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Essential","path":"Novika/Capabilities/Impl/Essential.html","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/essential.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"essential\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes essential native code vocabulary, such as 'hydrate' and 'new'\""}}],"instance_methods":[{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(Word.new(\"true\"), True.new)\ntarget.at(Word.new(\"false\"), False.new)\ntarget.at(\"prototype\", \"( B -- Pb ): leaves the Prototype block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.prototype.onto(stack)\nend\ntarget.at(\"parent\", \"( B -- Pb ): leaves the Parent block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n if parent = block.parent?\n else\n block.die(\"no parent for block\")\n end\n parent.onto(stack)\nend\ntarget.at(\"address\", \"( B -- A ): leaves pointer Address of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.object_id)).onto(stack)\nend\ntarget.at(\"conts\", \"( -- Cb ): pushes the Continuations block.\") do |engine, stack|\n engine.conts.onto(stack)\nend\ntarget.at(\"cont\", \"( -- Cb ): pushes the Continuation block.\") do |engine, stack|\n engine.cont.onto(stack)\nend\ntarget.at(\"newContinuation\", \"( S B -- C ): creates a Continuation from a Stack and\\n a Block.\") do |_, stack|\n Engine.cont(block: stack.drop.a(Block), stack: stack.drop.a(Block)).onto(stack)\nend\ntarget.at(\"getContBlock\", \"( C -- Cb ): leaves the Code block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_BLOCK_AT)).onto(stack)\nend\ntarget.at(\"getContStack\", \"( C -- Sb ): leaves the Stack block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_STACK_AT)).onto(stack)\nend\ntarget.at(\"this\", \"( -- B ): pushes the Block it's opened in.\\n\\n```\\n[ this ] open echo\\n\\\"STDOUT: [ this ]⏎ (instance of `[ this ]`)\\\"\\n```\") do |engine, stack|\n engine.block.onto(stack)\nend\ntarget.at(\"stack\", \"( -- S ): pushes the Stack it's opened in.\\n\\n```\\nstack dup echo\\n\\\"STDOUT: [ ⭮ ]⏎\\\"\\n\\n'foo' <<\\nstack echo\\n\\\"STDOUT: [ ⭮ 'foo' ]⏎\\\"\\n```\") do |_, stack|\n stack.onto(stack)\nend\ntarget.at(\"ahead\", \"( -- B ): leaves the block that will be executed after\\n `this` finishes.\\n\\n```\\n100 [ ahead 1 inject ] open + leaves: 101 \\\"(i.e. 100 1 +)\\\"\\n```\") do |engine, stack|\n cont = engine.conts.at(engine.conts.count - 2)\n cont = (cont.as?(Block)) || (cont.die(\"malformed continuation\"))\n ahead = cont.at(Engine::C_BLOCK_AT)\n ahead.onto(stack)\nend\ntarget.at(\"resume\", \"( B -- ): closes blocks all the way up to, but not\\n including, Block.\") do |engine, stack|\n block = stack.drop.a(Block)\n conts = engine.conts\n found = false\n while !(conts.tape.empty? || (found = block.same?(engine.block)))\n conts.drop\n end\n if found\n else\n block.die(\"resume: no such block in continuations\")\n end\nend\ntarget.at(\"dup\", \"( F -- F F ): duplicates the Form before cursor.\\n\\n```\\n'hello' dup leaves: [ 'hello' 'hello' ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ dup ] hydrate\\nblock leaves: [ [ 1 2 2 | 3 ] ]\\n```\") do |_, stack|\n stack.dupe\nend\ntarget.at(\"drop\", \"( F -- ): drops the Form before cursor.\\n\\n```\\n'hello' drop leaves: [ ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ drop ] hydrate\\nblock leaves: [ [ 1 | 3 ] ]\\n```\") do |_, stack|\n stack.drop\nend\ntarget.at(\"swap\", \"( A B -- B A ): swaps two Forms before cursor.\\n\\n```\\n1 2 swap leaves: [ 2 1 ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ swap ] hydrate\\nblock leaves: [ [ 2 1 | 3 ] ]\\n```\") do |_, stack|\n stack.swap\nend\ntarget.at(\"hydrate\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, it is added to\\n Stack (equivalent to `<<`), If Form is a block, its\\n instance is opened. To open a block without creating\\n an instance of it (unsafe), use `hydrate!`.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"hydrate!\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, the behavior is\\n the same as in `hydrate`. If Form is a block, performs\\n unsafe hydration (hydrates without making an instance\\n of the block). For a safer alternative, see `hydrate`.\\n Use if you know what you're doing, or if you're ready\\n to make an instance yourself.\\n\\nDetails: `hydrate!` is considered unsafe because hydration\\nartifacts are exposed to the user and/or its blocks. The\\ncontents of a block after hydration may differ from its\\ncontents before unsafe hydration. Indeed, `hydrate!` is\\nalmost as unsafe as pushing into `conts`; the only benefit\\nit provides is that it is able to catch infinite/very\\ndeep recursion.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule!(form, new_stack)\nend\ntarget.at(\"open\", \"( F -- F' ): opens Form in the active stack. Equivalent\\n to `stack F hydrate`.\\n\\n```\\n100 open leaves: 100\\n\\n1 [ 2 + ] open leaves: 3\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, stack)\nend\ntarget.at(\"there\", \"( S B -- S ): opens Block with Stack set as the active\\n stack. Leaves Stack. Ahead is transferred to block.\\n\\n```\\n[ 1 2 ] [ + ] there leaves: [ [ 3 ] ]\\n[ 1 2 ] [ ahead thruBlock open ] there + leaves: [ [ 3 ] ]\\n```\") do |engine, stack|\n form = stack.drop\n new_stack = stack.top.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"do\", \"( F -- ): opens Form with an empty stack activated, and\\n disposed when Form has been evaluated.\\n\\n```\\n[ 'Hi!' echo ] do\\n\\\"STDOUT: Hi!⏎\\\"\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, Block.new)\nend\ntarget.at(\"new\", \"( B -- I ): leaves an Instance of a Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance.onto(stack)\nend\ntarget.at(\"shallowNew\", \"( B -- Si ): leaves a Shallow instance of Block.\\n\\n`shallowNew` is different from `new` in that it does not reparent\\nsub-blocks to the parent instance recursively. Instead, it only\\ncreates an instance of Block, and does not look at skips its\\ncontent entirely.\\n\\n```\\n[ $: x [ x ] ] @: newBox\\n\\n1 newBox $: fooBox1\\n2 newBox $: fooBox2\\n3 newBox $: fooBox3\\n\\nfooBox1 open leaves: 1\\nfooBox2 open leaves: 2\\nfooBox3 open leaves: 3\\n\\n[ fooBox1 fooBox2 fooBox3 ] vals $: boxes\\n\\nboxes shallowNew $: shallowBoxesInstance\\nshallowBoxesInstance 0 fromLeft open leaves: 1\\nshallowBoxesInstance 1 fromLeft open leaves: 2\\nshallowBoxesInstance 2 fromLeft open leaves: 3\\n\\n\\\"Works as expected! Note that sub-blocks are exactly the same as\\n those in the original 'boxes' block. However, 'shallowBoxesInstance'\\n and 'boxes' are different blocks now:\\\"\\n\\n(shallowBoxesInstance 0 fromLeft) (boxes 0 fromLeft) same? leaves: true\\n(shallowBoxesInstance 1 fromLeft) (boxes 1 fromLeft) same? leaves: true\\n(shallowBoxesInstance 2 fromLeft) (boxes 2 fromLeft) same? leaves: true\\n\\nboxes shallowBoxesInstance same? leaves: false\\n\\n\\\"... and 'shallowBoxesInstance' does indeed have 'boxes' as its parent:\\\"\\n\\n(shallowBoxesInstance parent) boxes same? leaves: true\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance(shallow: true).onto(stack)\nend\ntarget.at(\"sel\", \"( D A B -- A/B ): selects A (Determiner is truthy) or B\\n (Determiner is falsey)\") do |_, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n (det.sel(a, b)).onto(stack)\nend\ntarget.at(\"br\", \"( D T F -- ? ): opens True/False forms depending on\\n Determiner being true/false.\") do |engine, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n engine.schedule(det.sel(a, b), stack)\nend\ntarget.at(\"<\", \"( A B -- S ): leaves whether A is smaller than (less than) B.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n Boolean[a < b].onto(stack)\nend\ntarget.at(\"same?\", \"( F1 F2 -- true/false ): leaves whether two Forms are the\\n same (by reference for block, by value for any other form).\\n\\n```\\n1 2 same? leaves: false\\n1 1 same? leaves: true\\n\\n'hello' 'hello world' same? leaves: false\\n'hello' 'hello' same? leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 same? leaves: false \\\"They're different blocks, content doesn't matter!\\\"\\n\\nb1 b1 same? leaves: true\\nb2 b2 same? leaves: true\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n (Boolean.same?(a, b)).onto(stack)\nend\ntarget.at(\"=\", \"( F1 F2 -- true/false ): leaves whether two Forms are equal by\\n content (they may or may not be the same forms reference-wise,\\n i.e., those for which `same?` would leave true).\\n\\n```\\n1 2 = leaves: false\\n1 1 = leaves: true\\n\\n'hello' 'hello world' = leaves: false\\n'hello' 'hello' = leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 = leaves: true \\\"They're equal by content!\\\"\\n\\nb1 b1 = leaves: true\\nb2 b2 = leaves: true\\n\\n\\\"Supports self-reference:\\\"\\n[ ] $: b3\\nb3 b3 shove\\nb3 b3 = leaves: true\\n(b3 first) b3 = leaves: true\\n\\\"etc...\\\"\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n Boolean[a == b].onto(stack)\nend\ntarget.at(\"anyof?\", \"( F B -- true/false ): leaves whether any form in Block is\\n equal (via `=`) to Form.\\n\\n```\\n1 [ 1 2 3 ] anyof? leaves: true\\n'hello' [ 'hello' 'world' 1 ] anyof? leaves: true\\n'hello' [ 1 2 3 ] anyof? leaves: false\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n form = stack.drop\n Boolean[form.in?(block)].onto(stack)\nend\ntarget.at(\"occurrences\", \"( B/Q Pf/Pq -- Bi ): leaves Begin indices of all occurrences\\n of Pattern form/Pattern quote in Block/Quote. Begin indices\\n is an orphan with no entries.\\n\\nWorks in a similar way to `anyof?` in that it compares each\\nelement of the Block/Quote with Pattern form/Pattern quote\\nlike `=` (but not using `=`, at least in the quote case\\nwhere KMP is used).\\n\\n```\\n[ ] 123 occurrences leaves: [ [ ] ]\\n\\n[ 1 1 2 0 0 1 2 1 3 4 8 ] $: haystack\\nhaystack 0 occurrences leaves: [ [ 3 4 ] ]\\nhaystack 1 occurrences leaves: [ [ 0 1 5 7 ] ]\\nhaystack 'foo' occurrences leaves: [ [ ] ]\\n\\n'' 'foobar' occurrences leaves: [ [ ] ]\\n'foobar' '' occurrences leaves: [ [ ] ]\\n\\n'foobra' $: haystack\\nhaystack 'o' occurrences leaves: [ [ 1 2 ] ]\\nhaystack 'foo' occurrences leaves: [ [ 0 ] ]\\nhaystack 'ra' occurrences leaves: [ [ 4 ] ]\\n\\n'GATCCATATG' $: haystack\\nhaystack 'ATAAT' occurrences leaves: [ [ ] ]\\nhaystack 'ATAT' occurrences leaves: [ [ 5 ] ]\\n```\") do |_, stack|\n pattern = stack.drop\n iterable = stack.drop.a(Block | Quote)\n case iterable\n in Quote\n fail = iterable.empty? || (pattern.is_a?(Quote) && pattern.empty?)\n in Block\n fail = iterable.count.zero?\n end\n if fail\n Block.new.onto(stack)\n next\n end\n occurrences = [] of Form\n iterable.each_occurrence_of(pattern) do |index|\n occurrences << (Decimal.new(index))\n end\n (Block.with(occurrences, leaf: false)).onto(stack)\nend\ntarget.at(\"uppercase?\", \"( Q -- true/false ): leaves whether Quote is all-uppercase.\\n If Quote is empty, leaves false.\\n\\n```\\n'' uppercase? leaves: false\\n'A' uppercase? leaves: true\\n'hello' uppercase? leaves: false\\n'Hello' uppercase? leaves: false\\n'HELLO' uppercase? leaves: true\\n'HELLO WORLD' uppercase? leaves: false\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n string = quote.string\n case string.size\n when 0\n isup = false\n when 1\n isup = string[0].uppercase?\n else\n isup = true\n string.each_char do |char|\n if char.uppercase?\n else\n isup = false\n break\n end\n end\n end\n Boolean[isup].onto(stack)\nend\ntarget.at(\"toUppercase\", \"( Q -- Uq ): leaves all- Uppercase quote for Quote: converts\\n lowercase character(s) in Quote to uppercase. If Quote is empty,\\n leaves empty quote.\\n\\n```\\n'' toUppercase leaves: ''\\n'hello' toUppercase leaves: 'HELLO'\\n'hello world' toUppercase? leaves: 'HELLO WORLD'\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n (Quote.new(quote.string.upcase)).onto(stack)\nend\ntarget.at(\"block?\", \"( F -- true/false ): leaves whether Form is a block.\") do |_, stack|\n Boolean[stack.drop.is_a?(Block)].onto(stack)\nend\ntarget.at(\"asBlock\", \"( F -- B ): asserts that Form is a Block, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBlock\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n[] asBlock leaves: [ [] \\\"(the same block)\\\" ]\\n```\") do |_, stack|\n stack.top.a(Block)\nend\ntarget.at(\"word?\", \"( F -- true/false ): leaves whether Form is a word form,\\n or a block that implements '__word__'.\\n\\n```\\n#foo word? leaves: true\\n\\n[ #foo $: __word__ this ] open word? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Word) || (form.is_a?(Block) && (form.can_be?(Word)))].onto(stack)\nend\ntarget.at(\"private?\", \"( W -- true/false ): leaves whether Word is private (by convention).\\n\\nA Word prefixed by one or more underscores '_' *but that which\\ndoes not end with one(s)* is considered private by convention.\\nHook words such as `__quote__` are *not* considered private.\\n\\nThe fact that privacy is defined \\\"by convention\\\" means that nothing\\nactually stops anyone from obtaining the word's associated value form.\\n\\n```\\n#hello private? leaves: false\\n#_hello private? leaves: true\\n#_ private? leaves: false \\\"Beware!\\\"\\n```\") do |_, stack|\n Boolean[(stack.drop.a(Word)).private?].onto(stack)\nend\ntarget.at(\"toWord\", \"( F -- W ): converts Form into Word.\\n 1. If Form is a word, behaves as noop\\n 2. If Form is a quote, dies only if quote contains\\n Unicode whitespace characters or is itself empty.\\n 3. If Form is a quoted word, peels off **all** quoting\") do |_, stack|\n form = stack.drop.a((Word | QuotedWord) | Quote)\n case form\n in Word\n form.onto(stack)\n in QuotedWord\n form.to_word.onto(stack)\n in Quote\n string = form.string\n if string.empty?\n form.die(\"toWord: quote argument is empty\")\n else\n if string.each_char.any?(&.whitespace?)\n form.die(\"toWord: quote argument contains whitespace\")\n end\n end\n (Word.new(form.string)).onto(stack)\n end\nend\ntarget.at(\"asWord\", \"( F -- W ): asserts that Form is a Word form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#foo asWord leaves: [ foo ]\\n```\\n\\n`__word__` hook can make a block usable in place of a word,\\nprovided its definition leaves a word or a block which\\nimplements '__word__':\\n\\n```\\n[ $: x x $: __word__ this ] @: a\\n#foo a asWord \\\"beware: leaves instance of a\\\"\\n#boo a a asWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Word)\nend\ntarget.at(\"quotedWord?\", \"( F -- true/false ): leaves whether Form is a quoted word\\n form, or a block that implements '__quotedWord__'.\\n\\n```\\n##foo quotedWord? leaves: true\\n[ ##foo $: __quotedWord__ this ] open quotedWord? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(QuotedWord) || (form.is_a?(Block) && (form.can_be?(QuotedWord)))].onto(stack)\nend\ntarget.at(\"asQuotedWord\", \"( F -- Qw ): asserts that Form is a Quoted word form,\\n dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuotedWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n##foo asQuotedWord leaves: #foo\\n```\\n\\n`__quotedWord__` hook can make a block usable in place of\\na quoted word, provided its definition leaves a quoted\\nword or a block that implements `__quotedWord__`:\\n\\n```\\n[ $: x x $: __quotedWord__ this ] @: a\\n##foo a asQuotedWord \\\"beware: leaves instance of a\\\"\\n##boo a a asQuotedWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(QuotedWord)\nend\ntarget.at(\"decimal?\", \"( F -- true/false ): leaves whether Form is a decimal form,\\n or a block that implements '__decimal__'.\\n\\n```\\n123 decimal? leaves: true\\n[ 123 $: __decimal__ this ] open decimal? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Decimal) || (form.is_a?(Block) && (form.can_be?(Decimal)))].onto(stack)\nend\ntarget.at(\"toQuotedWord\", \"( Qw/W -- #Qw/#W ): adds a layer of \\\"quoting\\\" to Quoted\\n word or Word.\\n\\n```\\n\\\"Note that in quoted word literals (here on the left hand\\n side) one layer of quoting is 'eaten off' by the parser!\\\"\\n\\n#foo toQuotedWord leaves: #foo\\n##foo toQuotedWord leaves: ##foo\\n```\") do |_, stack|\n form = stack.drop.a(Word | QuotedWord)\n form.to_quoted_word.onto(stack)\nend\ntarget.at(\"asDecimal\", \"( F -- D ): asserts that Form is a Decimal form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asDecimal\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n100 asDecimal leaves: 100\\n```\\n\\n`__decimal__` hook can make a block usable in place of a\\ndecimal, provided its definition leaves a decimal or a\\nblock that implements `__decimal__`:\\n\\n```\\n[ $: x x $: __decimal__ this ] @: a\\n100 a asDecimal \\\"beware: leaves an instance of a\\\"\\n200 a a asDecimal \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Decimal)\nend\ntarget.at(\"quote?\", \"( F -- true/false ): leaves whether Form is a quote form,\\n or a block that implements '__quote__'.\\n\\n```\\n'foo' quote? leaves: true\\n[ 'foo' $: __quote__ this ] open quote? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Quote) || (form.is_a?(Block) && (form.can_be?(Quote)))].onto(stack)\nend\ntarget.at(\"asQuote\", \"( F -- Q ): asserts that Form is a Quote form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuote\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'foo' asQuote leaves: 'foo'\\n```\\n\\n`__quote__` hook can make a block usable in place of a\\nquote, provided its definition leaves a quote or a block\\nthat implements `__quote__`:\\n\\n```\\n[ $: x x $: __quote__ this ] @: a\\n'foo' a asQuote \\\"beware: leaves instance of a\\\"\\n'boo' a a asQuote \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Quote)\nend\ntarget.at(\"boolean?\", \"( F -- true/false ): leaves whether Form is a boolean form,\\n or a block that implements '__boolean__'.\\n\\n```\\ntrue boolean? leaves: true\\n[ true $: __boolean__ this ] open boolean? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Boolean) || (form.is_a?(Block) && (form.can_be?(Boolean)))].onto(stack)\nend\ntarget.at(\"asBoolean\", \"( F -- true/false ): asserts that Form is a boolean form, dies\\n if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBoolean\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\ntrue asBoolean leaves: true\\nfalse asBoolean leaves: false\\n```\\n\\n`__boolean__` hook can make a block usable in place of a\\nboolean, provided its definition leaves a boolean or a\\nblock that implements `__boolean__`:\\n\\n```\\n[ $: x x $: __boolean__ this ] @: a\\ntrue a asBoolean \\\"beware: leaves an instance of a\\\"\\ntrue a a asBoolean \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Boolean)\nend\ntarget.at(\"builtin?\", \"( F -- true/false ): leaves whether Form is a builtin form.\") do |_, stack|\n Boolean[stack.drop.is_a?(Builtin)].onto(stack)\nend\ntarget.at(\"asBuiltin\", \"( F -- B ): asserts Form is a Builtin, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asBuiltin\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#+ here asBuiltin toQuote leaves: '[ native code ]'\\n```\") do |_, stack|\n stack.top.a(Builtin)\nend\ntarget.at(\"color?\", \"( F -- true/false ): leaves whether Form is a color form,\\n or a block that implements '__color__'.\\n\\n```\\n0 0 0 rgb color? leaves: true\\n[ 0 0 0 rgb $: __color__ this ] open color? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Color) || (form.is_a?(Block) && (form.can_be?(Color)))].onto(stack)\nend\ntarget.at(\"asColor\", \"( F -- C ): asserts that Form is a Color form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asColor\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n0 0 0 rgb asColor toQuote leaves: 'rgb(0, 0, 0)'\\n```\\n\\n`__color__` hook can make a block usable in place of a\\ncolor, provided its definition leaves a color or a block\\nthat implements `__color__`:\\n\\n```\\n[ $: x x $: __color__ this ] @: a\\n0 0 0 rgb a asColor \\\"beware: leaves an instance of a\\\"\\n0 0 0 rgb a a asColor \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Color)\nend\ntarget.at(\"byteslice?\", \"( F -- true/false ): leaves whether Form is a byteslice\\n form, or a block that implements '__byteslice__'.\\n\\n```\\n'hello world' toByteslice byteslice? leaves: true\\n[ [ 'Hi!' toByteslice ] $: __byteslice__ this ] open byteslice? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Byteslice) || (form.is_a?(Block) && (form.can_be?(Byteslice)))].onto(stack)\nend\ntarget.at(\"asByteslice\", \"( F -- B ): asserts that Form is a Byteslice form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asByteslice\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'hello world' toByteslice asByteslice leaves: '[byteslice, consists of 11 mutable byte(s)]'\\n```\\n\\n`__byteslice__` hook can make a block usable in place of\\na byteslice, provided its definition leaves a byteslice\\nor a block that implements `__byteslice__`:\\n\\n```\\n[ $: x x $: __byteslice__ this ] @: a\\n'foo' toByteslice a asByteslice \\\"beware: leaves an instance of a\\\"\\n'foo' toByteslice a a asByteslice \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Byteslice)\nend\ntarget.at(\"pushes\", \"( B N F -- ): creates a definition for Name in Block that\\n pushes Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form))\nend\ntarget.at(\"opens\", \"( B N F -- ): creates a definition for Name in Block that\\n opens Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form, opener: true))\nend\ntarget.at(\"entry:submit\", \"( Ss N F -- ): replaces the value form of an existing\\n definition for Name in Submittable store (usually a block)\\n to Form. Does not change whether the definition opens\\n or pushes.\\n\\n```\\n[ 'John Doe' $: fullName\\n [ fullName count ] @: fullNameLength\\n] obj $: person\\n\\nperson.fullName leaves: 'John Doe'\\nperson.fullNameLength leaves: 8\\n\\n\\\"Let's try to change the name:\\\"\\nperson #fullName 'Alice Bobette' entry:submit\\nperson.fullName leaves: 'Alice Bobette'\\nperson.fullNameLength leaves: 13\\n\\n\\\"Now let's change the way we compute the length; let's count\\n how many double-Ts there are in the full name.\\\"\\nperson #fullNameLength [ person.fullName 'tt' occurrences count ] entry:submit\\n\\n\\\"... just one:\\\"\\nperson.fullNameLength leaves: 1\\n\\n\\\"... or maybe multiple:\\\"\\nperson #fullName 'Tette Mopettitte' entry:submit\\nperson.fullName leaves: 'Tette Mopettitte'\\nperson.fullNameLength leaves: 3\\n```\") do |_, stack|\n form = stack.drop\n name = stack.drop\n submittable = stack.drop.a(ISubmittableStore)\n submittable.submit(name, form)\nend\ntarget.at(\"entry:exists?\", \"( Rs N -- true/false ): leaves whether Readable store\\n (usually a block) can fetch value for Name.\\n\\n```\\n[ orphan $: table\\n orphan extendWith: [\\n [ ${ name age score }\\n [ name $: name\\n age $: age ] obj toDict $: record\\n table record score pushes\\n ] @: set\\n [ ${ name age } table (this toDict) entry:fetch ] @: get\\n [ ${ name age } table (this toDict) entry:exists? ] @: has?\\n [ table entry:names map: [ $: record\\n [\\n record.name (31 ' ' lpad) (31 '...' fit)\\n record.age toQuote (15 ' ' lpad) (15 '...' fit)\\n (table record entry:fetch) toQuote (16 ' ' lpad) (16 '...' fit)\\n ] vals sepBy: ' |'\\n ] sepBy: '\\n'\\n ] @: __quote__\\n ]\\n] @: newScoreboard\\n\\nnewScoreboard $: scoreboard\\n\\n'John Doe' 42 '100 points' scoreboard.set\\n'Johnanna Doe' 28 '170 points' scoreboard.set\\n'Alice H.' 19 '250 points' scoreboard.set\\n'David A.' 67 '90 points' scoreboard.set\\n\\nscoreboard echo\\n\\n\\\"\\\"\\\"STDOUT:\\n John Doe | 42 | 100 points⏎\\n Johnanna Doe | 28 | 170 points⏎\\n Alice H. | 19 | 250 points⏎\\n David A. | 67 | 90 points⏎\\n\\\"\\\"\\\"\\n\\n'John Doe' 42 scoreboard.get leaves: '100 points'\\n'Alice H.' 19 scoreboard.get leaves: '250 points'\\n\\n'David A.' 67 scoreboard.has? leaves: true\\n'David A.' 123 scoreboard.has? leaves: false\\n'Peter Peterson' 19 scoreboard.has? leaves: false\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.has_form_for?(name)].onto(stack)\nend\ntarget.at(\"entry:fetch\", \"( Rs N -- F ): leaves the value Form with the given Name\\n in Readable store (usually a block). Does not open the\\n value form. Dies if Store does not contain an entry\\n for Name.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: a\\n\\na #x entry:fetch leaves: 100\\na #y entry:fetch leaves: 200\\na #a entry:fetch leaves: a \\\"via inheritance\\\"\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n (store.form_for(name)).onto(stack)\nend\ntarget.at(\"entry:fetch?\", \"( Rs N -- F true / false ): leaves value Form of the entry with\\n the given Name in Readable store (usually a block), follows it\\n with `true`. If there is no entry with the given name leaves\\n `false` only. Does not open the value form.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: a\\n\\na #x entry:fetch? leaves: [ 100 true ]\\na #y entry:fetch? leaves: false\\n\\na ('Enter name> ' readLine or: okbye toWord) entry:fetch? br:\\n [ 'Here is its value: ' _ ~ ]\\n 'Entry does not exist :('\\necho\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n if form = store.form_for?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:open\", \"( Rs C N -- ... ): resolves Name in Readable store and *opens*\\n it if it is an opener, assuming Caller to be the opener block.\") do |_, stack|\n name = stack.drop.a(Word)\n caller = stack.drop.a(Block)\n store = stack.drop.a(IReadableStore)\n if store.is_a?(Block)\n else\n form = store.form_for(name)\n form.onto(stack)\n next\n end\n entry = store.entry_for(name)\n if entry.opener?\n caller.inject(Word.new(\"open\"))\n end\n entry.onto(stack)\nend\ntarget.at(\"entry:flatFetch?\", \"( B N -- F true / false ): leaves the value Form of the entry with the\\n given Name in Block's dictionary. Follows it by `true` if it exists.\\n Leaves only `false` if there is no such entry in Block. Block hierarchy\\n (friends, parents) is not traversed. This word only looks at Block's\\n own dictionary). Does not open the value Form.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: myParent\\n[ 'hello' $: x ] obj $: myChild\\n\\n(myParent -- myChild) drop\\n\\nmyParent #x entry:flatFetch? leaves: [ 100 true ]\\nmyParent #y entry:flatFetch? leaves: [ 200 true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\nmyChild #x entry:flatFetch? leaves: [ 'hello' true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\n\\\"Even though myChild is a child of myParent and has access to 'y',\\n `entry:flatFetch?` doesn't care.\\\"\\nmyChild #y entry:flatFetch? leaves: false \\\"doesn't inherit!\\\"\\n\\n\\\"Compare it with `entry:fetch?`:\\\"\\nmyChild #y entry:fetch? leaves: [ 200 true ]\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if form = block.flat_at?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:opener?\", \"( Rs N -- true/false ): leaves whether an entry with the given\\n Name is an opener entry in Readable store (usually a block).\\n Dies if Readable store has no entry with the given Name.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: foo\\n\\nfoo #x entry:opener? leaves: false\\nfoo.x leaves: 100\\n\\n\\\"Change not only the value form for 'x' but also its type: make\\n it an opener.\\\"\\nfoo extend: [ [ 1 2 + ] @: x ]\\n\\nfoo #x entry:opener? leaves: true\\nfoo.x leaves: 3\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.opener?(name)].onto(stack)\nend\ntarget.at(\"entry:delete\", \"( B N -- ): removes the entry corresponding to Name form\\n from the dictionary of Block if it exists there. Otherwise,\\n does nothing.\\n\\n```\\n100 $: x\\n\\n[ 200 $: x ] obj $: foo\\n\\n\\\"'x' of foo shadows 'x' of toplevel block\\\"\\nfoo.x leaves: 200\\n\\n\\\"Let's try to remove it so it doesn't:\\\"\\nfoo #x entry:delete\\nfoo.x leaves: 100\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n block.delete_entry(name)\nend\ntarget.at(\"entry:wipeout\", \"( B -- ): removes all *owned* dictionary entries in Block.\\n\\n```\\n[ 100 $: x\\n 200 $: y\\n] obj $: numbers\\n\\nnumbers entry:names leaves: [ [x y] ]\\n\\nnumbers entry:wipeout\\nnumbers entry:names leaves: [ [] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.clear_entries\nend\ntarget.at(\"entry:pathTo?\", \"( B N -- P F true / false ): leaves Path, a block describing the\\n path to Form (including Block itself) under the corresponding\\n Name (like `entry:fetch?`). Follows Path and Form with `true`\\n indicating success, otherwise *only* `false` indicating that\\n there is no Form corresponding to Name in Block or any of the\\n blocks reachable from Block.\\n\\nThis word exists mainly for testing word lookup sanity. Feel free\\nto use it if you find any reason to!\\n\\n```\\n[ 100 $: x 'a' $: __quote__ ] obj $: a\\n[ 200 $: y 'b' $: __quote__ ] obj $: b\\n[ 300 $: z 'c' $: __quote__ ] obj $: c\\n\\na -- b -- c drop\\n\\n[ a #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ a ] 100 true'\\n[ b #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ b a ] 100 true'\\n[ c #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b a ] 100 true'\\n\\n[ b #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ b ] 200 true'\\n[ c #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b ] 200 true'\\n\\n[ c #z entry:pathTo? ] vals sepBy: ' ' leaves: '[ c ] 300 true'\\n\\n[ c #foo entry:pathTo? ] vals sepBy: ' ' leaves: 'false'\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if result = block.path_to_entry?(name)\n else\n Boolean[false].onto(stack)\n next\n end\n needle, path = result\n path.onto(stack)\n needle.onto(stack)\n Boolean[true].onto(stack)\nend\ntarget.at(\"entry:names\", \"( B -- Nb ): gathers all *owned* dictionary entry names of Block\\n into Name block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop \\\"for good measure :)\\\"\\n\\nmyParent entry:names leaves: [ [y x] ]\\nmyChild entry:names leaves: [ [z] ]\\nmyFriend entry:names leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_name do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:names*\", \"( B -- Nb ): gathers all dictionary entry names *reachable* from\\n Block to Name block. That is, gathers all entry names in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance of\\nBlock's relative graph.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:names* leaves: [ [y x greeting] ]\\nmyChild entry:names* leaves: [ [z y x greeting] ]\\nmyFriend entry:names* leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n names = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_name do |name|\n names << name\n if leaf\n next\n end\n leaf = name.is_a?(Block)\n end\n nil\n end\n names.uniq!\n (Block.with(names, leaf)).onto(stack)\nend\ntarget.at(\"entry:values\", \"( B -- Vb ): gathers all *owned* dictionary entry value forms of\\n Block into Value block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values leaves: [ [200 100] ]\\nmyChild entry:values leaves: [ [300] ]\\nmyFriend entry:values leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_value do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:values*\", \"( B -- Nb ): gathers all dictionary entry values *reachable* from\\n Block to Name block. That is, gathers all entry values in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance\\nof Block's relative graph. Values may repeat if some blocks\\nin this graph define entries with the same name.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values* leaves: [ [200 100 'Hello World'] ]\\nmyChild entry:values* leaves: [ [300 200 100 'Hello World'] ]\\nmyFriend entry:values* leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n values = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_value do |value|\n values << value\n if leaf\n next\n end\n leaf = value.is_a?(Block)\n end\n nil\n end\n (Block.with(values, leaf)).onto(stack)\nend\ntarget.at(\"entry:count\", \"( B -- Ec ): leaves Entry count, that is, the amount of entries\\n owned by (defined in) Block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myBlock\\n\\nmyBlock entry:count leaves: 2 \\\"'x' and 'y'\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.entry_count)).onto(stack)\nend\ntarget.at(\"shallowCopy\", \"( B -- C ): makes a shallow copy (sub-blocks are not copied)\\n of Block's tape and dictionary, and leaves a Copy block with\\n the tape copy, dictionary copy set as its tape, dictionary.\\n\\n```\\n[ 1 2 3 ] $: a\\na shallowCopy $: b\\na #x 0 pushes\\nb #y 1 pushes\\nb 1 shove\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 1 · ${y :: 1} ]⏎\\\"\\n```\") do |_, stack|\n (stack.drop.a(Block)).shallow.onto(stack)\nend\ntarget.at(\"resub\", \"( O B -- ): replaces the substrate of Block with Other's\\n substrate. This is useful if you want to swap Block's\\n contents with Other's without changing Block's identity:\\n\\n```\\n[ 1 2 3 ] $: a\\n[ 'a' 'b' 'c' ] $: b\\nb #x 0 pushes\\nb echo\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n```\\n\\nNote that since *substrate* is replaced, not *tape*, the\\ncursor position is saved:\\n\\n```\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\nb 2 |-\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' | 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 | 2 3 · ${x :: 0} ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n other = stack.drop.a(Block)\n block.resub(other)\nend\ntarget.at(\"fromLeft\", \"( B/Q/Bf I -- E ): leaves Index-th Element from left in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(index.to_i)).onto(stack)\nend\ntarget.at(\"fromRight\", \"( B/Q/Bf I -- E ): leaves Index-th Element from right in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromRight leaves: 3\\n[ 1 2 3 ] 1 fromRight leaves: 2\\n[ 1 2 3 ] 2 fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at((form.count - index.to_i) - 1)).onto(stack)\nend\ntarget.at(\"fromLeft*\", \"( B/Q/Bf N -- Eb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from left in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromLeft* leaves: [ [ 1 ] ]\\n[ 1 2 3 ] 2 fromLeft* leaves: [ [ 1 2 ] ]\\n[ 1 2 3 ] 3 fromLeft* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromLeft* leaves: [ [ 1 2 3 ] ]\\n'hello' 3 fromLeft* leaves: 'hel'\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(0, size.to_i - 1)).onto(stack)\nend\ntarget.at(\"fromRight*\", \"( B/Q/Bf N -- Fb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from right in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromRight* leaves: [ [ 3 ] ]\\n[ 1 2 3 ] 2 fromRight* leaves: [ [ 2 3 ] ]\\n[ 1 2 3 ] 3 fromRight* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromRight* leaves: [ [ 1 2 3 ] ]\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(form.count - size.to_i, form.count - 1)).onto(stack)\nend\ntarget.at(\"+\", \"( A B -- S ): leaves the Sum of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a + b)\nend\ntarget.at(\"-\", \"( A B -- D ): leaves the Difference of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a - b)\nend\ntarget.at(\"*\", \"( A B -- P ): leaves the Product of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a * b)\nend\ntarget.at(\"/\", \"( A B -- Q ): leaves the Quotient of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"division by zero\")\n end\n stack.add(a / b)\nend\ntarget.at(\"mod\", \"( A B -- M ): leaves the Modulo of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"modulo by zero\")\n end\n stack.add(a % b)\nend\ntarget.at(\"**\", \"( A B -- R ): raises A to the power B, leaves Result.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a ** b)\nend\ntarget.at(\"round\", \"( D -- Rd ): rounds Decimal towards the nearest integer,\\n leaves the corresoinding Rounded decimal. If both neighboring\\n integers are equidistant, rounds towards the even neighbor\\n (Banker's rounding).\\n\\n```\\n1 round leaves: 1\\n1.23 round leaves: 1\\n\\n1.5 round leaves: 2\\n1.67 round leaves: 2\\n\\n2.5 round leaves: 2 \\\"rounds towards the even neighbor\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.round.onto(stack)\nend\ntarget.at(\"floor\", \"( D -- Rd ): rounds Decimal *down* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 floor leaves: 1\\n1.23 floor leaves: 1\\n\\n1.5 floor leaves: 1\\n1.67 floor leaves: 1\\n\\n2.5 floor leaves: 2\\n\\n-2.5 floor leaves: -3 \\\"rounds down!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.floor.onto(stack)\nend\ntarget.at(\"ceil\", \"( D -- Rd ): rounds Decimal *up* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 ceil leaves: 1\\n1.23 ceil leaves: 2\\n\\n1.5 ceil leaves: 2\\n1.67 ceil leaves: 2\\n\\n2.5 ceil leaves: 3\\n\\n-2.5 ceil leaves: -2 \\\"rounds up!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.ceil.onto(stack)\nend\ntarget.at(\"trunc\", \"( D -- Rd ): rounds Decimal towards zero, leaves the resulting\\n Rounded decimal.\\n\\n```\\n1 trunc leaves: 1\\n1.23 trunc leaves: 1\\n1.5 trunc leaves: 1\\n1.67 trunc leaves: 1\\n2.5 trunc leaves: 2\\n\\n-2.3 trunc leaves: -2\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.trunc.onto(stack)\nend\ntarget.at(\"sqrt\", \"( D -- R ): leaves the square Root of Decimal.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.sqrt.onto(stack)\nend\ntarget.at(\"cos\", \"( Air -- Dc ): leaves Decimal cosine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_cos.onto(stack)\nend\ntarget.at(\"sin\", \"( Air -- Ds ): leaves Decimal sine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_sin.onto(stack)\nend\ntarget.at(\"rand\", \"( -- Rd ): leaves a Random decimal between 0 and 1.\") do |_, stack|\n (Decimal.new(rand)).onto(stack)\nend\ntarget.at(\"sliceQuoteAt\", \"( Q Sp -- Pb Pa ): for the given Quote, leaves the Part\\n before and Part after Slice point.\\n\\n```\\n'hello world' 2 sliceQuoteAt leaves: [ 'he' 'llo world' ]\\n```\") do |_, stack|\n spt = stack.drop.a(Decimal)\n quote = stack.drop.a(Quote)\n qpre, qpost = quote.slice_at(spt.to_i)\n qpre.onto(stack)\n qpost.onto(stack)\nend\ntarget.at(\"count\", \"( B/Q/Bf -- N ): leaves N, the amount of elements/graphemes/\\n bytes in Block/Quote/Byteslice form.\") do |_, stack|\n form = stack.drop.a((Block | Quote) | Byteslice)\n (Decimal.new(form.count)).onto(stack)\nend\ntarget.at(\"chr\", \"( Uc -- Q ): leaves a quote that consists of a single\\n character with the given Unicode codepoint.\") do |_, stack|\n ord = (stack.drop.a(Decimal)).posint.in(0..55295, 57344..1114111)\n (Quote.new(ord.chr)).onto(stack)\nend\ntarget.at(\"ord\", \"( Q -- Uc ): leaves the Unicode codepoint for the first\\n character in Quote. Dies if Quote is empty.\") do |_, stack|\n quote = stack.drop.a(Quote)\n if ord = quote.ord?\n else\n quote.die(\"ord: quote must contain at least one character\")\n end\n (Decimal.new(ord)).onto(stack)\nend\ntarget.at(\"lpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the left of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' lpad leaves: '-----hello'\\n'hello' 10 ':-' lpad leaves: ':----hello'\\n'hello' 7 'XYZABC' lpad leaves: 'XYhello'\\n'hello' 9 'XYZABC' lpad leaves: 'XYZAhello'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Left)).onto(stack)\nend\ntarget.at(\"rpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the right of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' rpad leaves: 'hello-----'\\n'hello' 10 ' -' rpad leaves: 'hello ----'\\n'hello' 7 'foobar' rpad leaves: 'hellofo'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Right)).onto(stack)\nend\ntarget.at(\"fit\", \"( Q Tl Eq -- Fq ): if Quote is longer than Total length, truncates\\n it so that it can fit Ellipsis quote, and stitches the truncated\\n Quote with the Ellipsis quote, forming Fit quote which is then\\n left on the stack.\\n\\nEssentially, Fit quote is guaranteed to be of Total length\\ncharacters **or less!**.\\n\\n```\\n'hello' 10 '…' fit leaves: 'hello'\\n'hello world' 10 '…' fit leaves: 'hello wor…'\\n'hello world' 8 '' fit leaves: 'hello wo'\\n'Lorem ipsum dolor sit amet' 10 '-' fit leaves: 'Lorem ipsu-'\\n'Lorem ipsum dolor sit amet' 24 '… (hidden)' fit leaves: 'Lorem ipsum do… (hidden)'\\n```\") do |_, stack|\n ellipsis = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.fit(total.to_i, ellipsis)).onto(stack)\nend\ntarget.at(\"|at\", \"( B -- N ): leaves N, the position of the cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n cursor = Decimal.new(block.cursor)\n cursor.onto(stack)\nend\ntarget.at(\"|to\", \"( B N -- ): moves the cursor in Block to N.\") do |_, stack|\n cursor = stack.drop.a(Decimal)\n block = stack.drop.a(Block)\n block.to(cursor.to_i)\nend\ntarget.at(\"<|\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor - 1)\nend\ntarget.at(\"|>\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor + 1)\nend\ntarget.at(\"|slice\", \"( B -- Lh Rh ): slices Block at cursor. Leaves Left half\\n and Right half.\") do |_, stack|\n block = stack.drop.a(Block)\n lhs, rhs = block.slice\n lhs.onto(stack)\n rhs.onto(stack)\nend\ntarget.at(\"cherry\", \"( [ ... E | ... ]B ~> [ ... | ... ]B -- E ): drops Block\\n and Element before cursor in Block (and moves cursor back\\n once), leaves Element.\") do |_, stack|\n (stack.drop.a(Block)).drop.onto(stack)\nend\ntarget.at(\"shove\", \"( [ ... | ... ]B E ~> [ ... E | ... ]B -- ): adds Element\\n before cursor in Block (and moves cursor forward once),\\n drops both.\") do |_, stack|\n stack.drop.onto(stack.drop.a(Block))\nend\ntarget.at(\"shove*\", \"( [ ...bl | ...br ]B [ ...el | ...er ]Eb ~> [ ...bl ...el | ...br ]B -- ): adds\\n elements before cursor in Element block after the cursor in Block.\\n\\n```\\n[ 1 2 3 ] $: xs\\nxs [ 4 5 6 ] shove*\\nxs leaves: [ [ 1 2 3 4 5 6 \\\"|\\\" ] ]\\n\\n[ 1 | 2 3 ] $: ys\\nys [ 100 200 300 ] shove*\\nys leaves: [ 1 100 200 300 | 2 3 ]\\n```\") do |_, stack|\n elems = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.paste(elems)\nend\ntarget.at(\"eject\", \"( [ ... | F ... ]B ~> [ ... | ... ]B -- F ): drops and\\n leaves the Form after cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.eject\n form.onto(stack)\nend\ntarget.at(\"inject\", \"( B F -- ): inserts Form to Block: adds Form to Block,\\n and moves cursor back again.\") do |_, stack|\n form = stack.drop\n block = stack.drop.a(Block)\n block.inject(form)\nend\ntarget.at(\"thru\", \"( [ ... | F ... ] -> [ ... F | ... ] -- F ): moves cursor\\n after Form, and leaves Form. Dies if cursor is at the end.\\n\\nNote: prefer `thru` to `eject` because `eject` modifies\\nthe block, and that may cause a tape copy which uses up\\na bit of memory and resources. The difference would matter\\nonly in high load scenarios, though.\\n\\nNote: anything that *does not* `ahead inject` will be OK\\nwith `ahead thru`. And even if it does `ahead inject`,\\nstill, there are ways to overcome the problems from not\\n`ahead eject`ing.\") do |_, stack|\n block = stack.drop.a(Block)\n block.thru.onto(stack)\nend\ntarget.at(\"thruBlock\", \"( B -- Bf / [ Vf ] ): similar to `thru` for Block. If\\n form after cursor is a Block form, it is left. If it is\\n a Value form, then it is enclosed in a new block whose\\n parent is Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.thru\n if form.is_a?(Block)\n form.onto(stack)\n else\n child = Block.new(block)\n child.add(form)\n child.onto(stack)\n end\nend\ntarget.at(\"top\", \"( [ ... F | ... ]B -- F ): leaves the top Form in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.top.onto(stack)\nend\ntarget.at(\"mergeDicts\", \"( Rb Db -- ): copies entries from Donor block's dictionary\\n to Recipient block's dictionary. Donor entries override\\n same-named entries in Recipient. Donor entries starting\\n with one or more underscores are not imported.\\n\\n```\\n[ ] $: a\\na #x 100 pushes\\na #_private 'Fool!' pushes\\n[ ] $: b\\nb #y 200 pushes\\n\\na b 2echo\\n\\\"STDOUT: [ · ${x :: 100} ${_private :: 'Fool!'} ]⏎\\\"\\n\\\"STDOUT: [ · ${y :: 200} ]⏎\\\"\\n\\nb a mergeDicts\\nb echo\\n\\\"STDOUT: [ · ${y :: 200} ${x :: 100} ]⏎\\\"\\n```\") do |_, stack|\n donor = stack.drop.a(Block)\n recpt = stack.drop.a(Block)\n recpt.import!(from: donor)\nend\ntarget.at(\"sortUsing!\", \"( B Cb -- B ): leaves Block sorted inplace. Forms in Block\\n are compared using Comparator block.\\n\\nComparator block is opened with two forms on the stack; let's\\ncall them A and B. If Comparator block leaves a negative decimal\\n(conventionally `-1`), then `A < B`. If Comparator block leaves\\n`0`, then `A = B`. If Comparator block leaves a positive decimal\\n(conventionally `1`), then `A > B`.\\n\\nDies if Comparator block leaves any other (kind of) form.\\n\\nIgnores all forms but the topmost for Comparator block.\\n\\n\\n```\\n[ 3 2 1 ] [ - ] sortUsing! leaves: [ 1 2 3 ]\\n```\") do |_, stack|\n cmp = stack.drop.a(Block)\n block = stack.top.a(Block)\n block.sort_using! do |a, b|\n stack = Block.with(a, b)\n ((Engine.exhaust(Engine.current.capabilities, cmp, stack)).top.a(Decimal)).to_i\n end\nend\ntarget.at(\"getErrorDetails\", \"( Eo -- Dq ): leaves Details quote containing error details\\n of an Error object.\") do |_, stack|\n error = stack.drop.a(Error)\n (Quote.new(error.details)).onto(stack)\nend\ntarget.at(\"toQuote\", \"( F -- Qr ): leaves Quote representation of Form.\") do |_, stack|\n stack.drop.to_quote.onto(stack)\nend\ntarget.at(\"toByteslice\", \"( Q -- B ): leaves immutable Byteslice for Quote.\") do |_, stack|\n (stack.drop.a(Quote)).to_byteslice.onto(stack)\nend\ntarget.at(\"replaceAll\", \"( Sq Pq Q -- Rq ): replaces all instances of Pattern quote\\n in Source quote with Quote. Leaves the Resulting quote.\\n\\n```\\n'hello' 'l' 'y' replaceAll leaves: 'heyyo'\\n```\") do |_, stack|\n repl = stack.drop.a(Quote)\n pattern = stack.drop.a(Quote)\n quote = stack.drop.a(Quote)\n (quote.replace_all(pattern, repl)).onto(stack)\nend\ntarget.at(\"effect\", \"( F -- Eq ): leaves Effect quote for Form.\\n\\nIf Form is not a block nor a builtin, it is simply converted\\nto quote in the same way as `toQuote`.\\n\\nIf Form is a block or a builtin, an attempt is made at\\nextracting a stack effect expression from its comment.\\nIf the attempt fails, Form's description is left. If the\\nattempt was successful, the extracted stack effect quote\\nis added onto the stack as Effect quote.\\n\\n```\\n100 effect leaves: '100'\\ntrue effect leaves: 'true'\\n\\n[] effect leaves: 'a block'\\n[ \\\"Hello World\\\" ] effect leaves: 'a block'\\n[ \\\"( -- ) \\\"] effect leaves: '( -- )'\\n\\n#+ here effect leaves: '( A B -- S )' \\\"(yours may differ)\\\"\\n#map: here effect leaves: '( Lb B -- MLb )'\\n```\") do |_, stack|\n (Quote.new(stack.drop.effect)).onto(stack)\nend\ntarget.at(\"die\", \"( D/Eo -- ): dies with Details quote/Error object.\") do |engine, stack|\n form = stack.drop.a(Quote | Error)\n case form\n in Quote\n raise(engine.die(form.string))\n in Error\n raise(form)\n end\nend\ntarget.at(\"stitch\", \"( Q1 Q2 -- Q3 ): quote concatenation.\") do |_, stack|\n b = stack.drop.a(Quote)\n a = stack.drop.a(Quote)\n stack.add(a.stitch(b))\nend\ntarget.at(\"reparent\", \"( Cb Pb -- Cb ): changes the parent of Child block to Parent block.\\n Lookup cycles are allowed and handled gracefully.\") do |_, stack|\n parent = stack.drop.a(Block)\n child = stack.top.a(Block)\n child.parent = parent\nend\ntarget.at(\"befriend\", \"( B F -- ): adds Friend to Block's friend list.\\n\\nFriends are asked for word entries after parents, grandparents\\netc. have failed to retrieve them. This recurses, e.g. friends\\nask their own friends and so on, until the entry is found. Lookup\\ncycles are allowed and handled gracefully.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\nb a befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\nb.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\nb.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\na #x [ 'I\\\\'ve changed!' echo ] opens\\n\\na.x\\n\\\"STDOUT: I've changed!⏎\\\"\\nb.x\\n\\\"STDOUT: I've changed!⏎\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.befriend(friend)\nend\ntarget.at(\"unfriend\", \"( B F -- ): removes Friend from Block's friend list. Does\\n nothing if Friend is not in the friend list. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na b unfriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n source = stack.drop.a(Block)\n source.unfriend(friend)\nend\ntarget.at(\"friends\", \"( B -- Fl ): leaves Friend list of Block. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na friends count echo\\n\\\"STDOUT: 1⏎\\\"\\na friends first b same? echo\\n\\\"STDOUT: true⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na friends [ drop ] hydrate\\na friends count echo\\n\\\"STDOUT: 0⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n source = stack.drop.a(Block)\n source.friends.onto(stack)\nend\ntarget.at(\"slurp\", \"( B Q -- B ): parses Quote and adds all forms from Quote\\n to Block.\") do |_, stack|\n source = stack.drop.a(Quote)\n block = stack.top.a(Block)\n block.slurp(source.string)\nend\ntarget.at(\"orphan\", \"( -- B ): creates and leaves a new orphan Block.\\n\\nOrphan blocks are blocks without a parent. Therefore, they do not\\nparticipate in any block hierarchy until they acquire some friends,\\nor a parent, and when (and whether) this should happen if for you —\\nnot Novika, as is usually the case — to decide.\\n\\n```\\n'Outer A' $: a\\n'Outer B' $: b\\n\\norphan $: x\\n\\n[ [ drop 'I die!' ] @: __died__ x.a ] do leaves: 'I die!'\\n[ [ drop 'I die too!' ] @: __died__ x.b ] do leaves: 'I die too!'\\n\\n\\\"Define `a` and `b` on the block itself. As you can see there\\n is no inheritance.\\\"\\nx extend: [\\n 100 $: a\\n 200 $: b\\n]\\n\\n\\\"Now `a` and `b` are looked up fine.\\\"\\nx.a leaves: 100\\nx.b leaves: 200\\n```\") do |_, stack|\n Block.new.onto(stack)\nend\ntarget.at(\"orphan?\", \"( B -- true/false ): leaves whether the given Block is an orphan\\n (see `orphan`).\\n\\n```\\norphan orphan? leaves: true\\n[ \\\"I'm not an orphan\\\" ] orphan? leaves: false\\n```\") do |_, stack|\n Boolean[!(stack.drop.a(Block)).parent?].onto(stack)\nend\ntarget.at(\"toOrphan\", \"( B -- B ): makes Block an orphan (destroys the link with\\n its parent).\\n\\n```\\n0 $: x\\n[ ] $: b\\nb . x echo\\n\\\"STDOUT: 0⏎\\\"\\n\\nb toOrphan leaves: [ [ ] ]\\n. x\\n\\\"Sorry: no value form found for 'x'\\\"\\\"\\n```\") do |_, stack|\n (stack.top.a(Block)).parent = nil\nend\ntarget.at(\"toTape\", \"( B -- Tb ): leaves Tape block for Block, i.e., the tape part\\n of Block. Useful for e.g. comparing two blocks only for tape\\n content, when Block may have dictionary entries.\\n\\nLookup hierarchy is destroyed: Tape block is an orphan.\\n\\n```\\n[ 1 2 3 ] $: a\\na #x 0 pushes\\na (a toTape) 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_tape_block.onto(stack)\nend\ntarget.at(\"toDict\", \"( B -- Db ): leaves Dictionary block for Block, i.e., the dictionary\\n part of Block. Useful for e.g. comparing two blocks only for dictionary\\n content in case tape contents differ.\\n\\nLookup hierarchy is destroyed: Dictionary block is an orphan.\\n\\n```\\n[ ${ x y } this ] @: createPoint\\n\\n10 20 createPoint $: a\\n10 20 createPoint $: b\\n\\na b = leaves: false\\n\\n\\\"And not for the reason you might think of. Their TAPES are not\\n equal; `a` and `b` are not only objects, they are also pieces\\n of code that led to each one's creation (sort of).\\\"\\na toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\nb toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\n\\n\\\"Let's strip the code using toDict:\\\"\\na toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\nb toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\n = leaves: true \\\"< now they're equal\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_dict_block.onto(stack)\nend\ntarget.at(\"desc\", \"( F -- Dq ): leaves the Description quote of the given Form.\\n\\n```\\n100 desc leaves: 'decimal number 100'\\n'foobar' desc leaves: 'quote \\\\\\\\'foobar\\\\\\\\''\\n[ 1 2 3 ] desc leaves: 'a block'\\n[ \\\"I am a block\\\" 1 2 3 ] desc leaves: 'I am a block'\\ntrue desc leaves: 'boolean true'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.desc)\n quote.onto(stack)\nend\ntarget.at(\"typedesc\", \"( F -- Dq ): leaves the type Description quote of the\\n given Form.\\n\\n```\\n100 typedesc leaves: 'decimal'\\n'foobar' typedesc leaves: 'quote'\\n[ 1 2 3 ] typedesc leaves: 'block'\\n[ \\\"I am a block\\\" 1 2 3 ] typedesc leaves: 'block'\\ntrue typedesc leaves: 'boolean'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.class.typedesc)\n quote.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/FFI","path":"Novika/Capabilities/Impl/FFI.html","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"ffi\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words for working with foreign functions, structs, and unions\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"ffi:library?\", \"( F -- true/false ): leaves whether Form is a foreign\\n library form.\\n\\n```\\n'foo' ffi:getLibrary ffi:library? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Library)].onto(stack)\nend\ntarget.at(\"ffi:layout?\", \"( F -- true/false ): leaves whether Form is a foreign\\n layout form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:layout? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(StructLayoutForm)].onto(stack)\nend\ntarget.at(\"ffi:struct&?\", \"( F -- true/false ): leaves whether Form is a struct\\n reference view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint& ffi:struct&? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.reference?)].onto(stack)\nend\ntarget.at(\"ffi:struct~?\", \"( F -- true/false ): leaves whether Form is an inline\\n struct view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct~ $: point~\\npoint~ ffi:struct~? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.inline?)].onto(stack)\nend\ntarget.at(\"ffi:union?\", \"( F -- true/false ): leaves whether Form is a union\\n view form.\\n\\n```\\n[ chr char ord u8 ] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxU\\nquuxU ffi:union? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.union?)].onto(stack)\nend\ntarget.at(\"ffi:hole?\", \"( F -- true/false ): leaves whether Form is a hole.\\n\\n```\\n#i32 ffi:hole $: intHole\\n\\nintHole ffi:hole? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Hole)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary?\", \"( I -- Lf true / false ): leaves Library form followed by true\\n if dynamic library with the given Id exists and was loaded &\\n retrieved successfully; otherwise, leaves false.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary? leaves: [ \\\"[foreign library]\\\" true ]\\n'random-nonexisting-library' ffi:getLibrary? leaves: false\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n library.onto(stack)\n end\n Boolean[!(!library)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary\", \"( I -- Lf ): leaves Library form if dynamic library with the\\n given Id exists and was loaded & retrieved successfully;\\n otherwise, dies.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary ffi:library? leaves: true\\n'random-nonexisting-library' ffi:getLibrary \\\"Dies: no such library\\\"\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n else\n id.die(\"no such library\")\n end\n library.onto(stack)\nend\ntarget.at(\"ffi:createLayout\", \"( Lb -- Slf ): parses Layout block and leaves the resulting\\n Struct layout form.\\n\\nStruct layouts are a generalization over structs (heap-\\nallocated and stack-allocated) and unions. They literally\\ndescribe how structs (unions) are layed out in memory.\\n\\nLayout block consists of *name words followed by type words*.\\nSee the example below. A reference to another struct layout\\ncan be made in Layout block using the prefixes `&` (heap-\\nallocated struct, i.e., pointer to struct), `~` (inline or\\nstack-allocated struct), and `?` (stack-allocated union).\\n\\nInline struct cycles are forbidden. Union cycles are forbidden.\\nEither could be hidden behind a reference/pointer.\\n\\nLayout block is parsed lazily (on first use, e.g., by `toQuote`,\\n`allocateStruct` variants, `=`, etc.) Therefore, you can define\\nself-referential structs, mutually referential structs, and\\nreference layouts that are defined later.\\n\\nSee FFI documentation on GitHub Wiki for a list of available\\ntypes and the corresponding C types.\\n\\n```\\n[ x f32\\n y f32\\n] ffi:createLayout $: point\\n\\n[ datum ~point \\\"<- inline struct\\\"\\n next &pointNode \\\"<- struct reference\\\"\\n] ffi:createLayout $: pointNode\\n\\n[ asPoint &point\\n asPointNode ~pointNode\\n] ffi:createLayout $: pointNodeUnion\\n\\n[ type u8\\n value ?pointNodeUnion \\\"<- stack-allocated union\\\"\\n] ffi:createLayout $: pointNodeOrPoint\\n```\") do |engine, stack|\n decl = stack.drop.a(Block)\n this = engine.block\n names = [] of Word\n types = [] of Word\n cur, nxt = names, types\n decl.each do |form|\n if form.is_a?(Word)\n else\n form.die(\"only words (for field name and for field type) are allowed in struct layout declaration\")\n end\n cur << form\n cur, nxt = nxt, cur\n end\n if names.size == types.size\n else\n decl.die(\"malformed struct layout: missing field name or type\")\n end\n if names.empty?\n decl.die(\"struct layout must have at least one field\")\n end\n (StructLayoutForm.new(this, names, types, decl.prototype.comment?)).onto(stack)\nend\n{% for method, desc in {inline: {\"~\", :InlineStruct, \"Isv\", \"Inline struct\"}, reference: {\"&\", :StructReference, \"Srv\", \"Struct reference\"}} %}\n\n {% sign, cls, ann, qual = desc %}\n\n target.at(\"ffi:allocateStruct{{ sign.id }}\", <<-END\n ( Slf -- {{ ann.id }} ): allocates {{ qual.id }} view for the\n given Struct layout form. If the struct is no longer in\n use, it is freed by the GC automatically.\n\n This word is **unsafe**: the resulting {{ qual.id }} view is\n in an undefined state (may contain junk) before you (or the\n C code you pass it to) fills it with good values. Showing\n the struct view left by this word to clients may expose your\n program to a whole class of security vulnerabilities.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n point ffi:allocateStruct{{ sign.id }} $: point{{ sign.id }}\n point{{ sign.id }} #x 123 entry:submit\n point{{ sign.id }} #y 456 entry:submit\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=123_i32, y=456_i32⟩'\n ```\n END\n ) do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.{{ method.id }}.make!\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:buildStruct{{ sign.id }}\", <<-END\n ( Eb Slf -- {{ ann.id }} ): allocates and fills {{ qual.id }}\n view with entries by asking Entry block for them.\n\n If Entry block is missing an entry matching a field that\n Struct layout form declares, and that field is of type\n `pointer` or struct reference (`&`), `none` (C nullptr)\n is used as the value. Dies if Entry block is missing\n matching entry or entries for fields of other types.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n\n \"Note: `this` has entries called `x` and `y`. `point` has\n fields called `x` and `y`. A match!\"\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = layout_form.layout\n view = layout.{{ method.id }}.make!\n layout.each_desc_with_index do |desc|\n entry = block.entry_for? Word.new(desc.id)\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n elsif desc.type.is_a?(Novika::FFI::UntypedPointer.class) || desc.type.is_a?(Novika::FFI::StructReferenceType)\n view[desc.id] = Novika::FFI::UntypedPointer.none\n else\n block.die(\n \"block is missing field '#{desc.id}'. Note that none (C nullptr) \\\n as default value is only supported for untyped pointers (`pointer`) \\\n and struct references (`&name`)\")\n end\n end\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:asStruct{{ sign.id }}\", <<-END\n ( A Slf -- {{ ann.id }} ): creates and leaves {{ qual.id }} view\n for the given Address, according to Struct layout form.\n\n This word is **unsafe**: it does not check whether Address\n points at something that is layed out according to Struct\n layout form. Passing 0 (none aka null pointer) for Address\n will lead to segfault. Passing Address that is outside of\n your program's memory will lead to segfault. Passing Address\n that *is* in the bounds of your program's memory, but one\n not pointing at a struct in accordance with Struct layout\n form, will lead to undefined behavior (most likely junk\n values in {{ qual.id }} view).\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} ffi:addressof $: addr\n\n addr point ffi:asStruct{{ sign.id }} $: addrPoint{{ sign.id }}\n addrPoint{{ sign.id }}.x leaves: x\n addrPoint{{ sign.id }}.y leaves: y\n addrPoint{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::{{ cls.id }}View.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n StructViewForm.new(view).onto(stack)\n end\n {% end %}\ntarget.at(\"ffi:allocateUnion\", \"( Slf -- Uv ): allocates Union view for the given Struct\\n layout form.\\n\\nThis word is **unsafe**: the resulting Union view is in\\nan undefined (uninitialized) state (may be zeroed out,\\ncontain junk, or both) before you (or the C code you pass\\nit to) fills it with good values. Showing the uninitialized\\nunion to clients may expose your program to a whole class\\nof security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxUnion\\nquuxUnion #chr 'A' entry:submit\\nquuxUnion.ord leaves: 65\\n\\n\\\"Union toQuote avoids printing values, because that could\\n cause a segfault/overflow in some cases, and would mostly\\n output junk anyway.\\\"\\nquuxUnion toQuote leaves: '(⋃ ⟪chr=char, ord=u8⟫)'\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.union.make!\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:buildUnion\", \"( Eb Slf -- Uv ): allocates and fills Union view with an\\n entry by asking Entry block for any *one* entry out of\\n those specified in Struct layout form, in the order they\\n are specified in Struct layout form. If the union is no\\n longer in use, it is freed by the GC automatically.\\n\\nEntry block must have at least one of the Struct layout\\nform's fields defined. Otherwise, this word dies.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n[ 'A' $: chr\\n this quux ffi:buildUnion\\n] val $: unionByChr\\n\\n[ 66 $: ord\\n this quux ffi:buildUnion\\n] val $: unionByOrd\\n\\n[ 'A' $: chr\\n 123 $: ord\\n this quux ffi:buildUnion\\n] val $: unionBoth\\n\\nunionByChr.ord leaves: 65\\nunionByOrd.chr leaves: 'B'\\n\\n\\\"'chr' is defined first, therefore, it is used rather\\n than 'ord'\\\"\\nunionBoth.chr leaves: 'A'\\nunionBoth.ord leaves: 65\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = form.layout\n view = layout.union.make!\n had_entry = false\n layout.each_desc_with_index do |desc|\n entry = block.entry_for?(Word.new(desc.id))\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n had_entry = true\n break\n end\n end\n if had_entry\n else\n block.die(\"block must have one of the union's fields defined\")\n end\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:asUnion\", \"( A Slf -- Uv ): creates and leaves a Union view for the\\n given Address, according to Struct layout form.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is layed out according to Struct\\nlayout form. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing\\nAddress that *is* in the bounds of your program's memory,\\nbut one not pointing at a union in accordance with Struct\\nlayout form, will lead to undefined behavior (most likely\\njunk values in Union view). Showing ill-formed results of\\nthis word to clients may expose your program to a whole\\nclass of security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n'A' $: chr\\n\\nthis quux ffi:buildUnion $: quuxUnion\\n\\nquuxUnion ffi:addressof $: addr\\n\\naddr quux ffi:asUnion $: addrUnion\\naddrUnion.chr leaves: 'A'\\naddrUnion.ord leaves: 65\\n```\") do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::UnionView.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:hole\", \"( T/Oh -- H ): allocates garbage-collected memory for Hole\\n that will hold a value of the given Type. If Other hole\\n is passed, wraps that Other hole instead (this could be\\n useful in C situations like `int**`)\\n\\nHoles are (just a bit) safer way of letting C write to a\\nmemory location. You first create the hole, then pass it\\nto C, then read from the hole by opening it.\\n\\nNote: this word is **unsafe**: since we cannot check whether\\nthe hole was written to, reading from hole (opening it) before\\nwriting to it will result in undefined behavior.\\n\\n```\\n\\\"\\\"\\\"\\nvoid outputCInt(int* x)\\n{\\n *x = 123;\\n}\\n\\\"\\\"\\\"\\n\\n#i32 ffi:hole $: intBox\\n\\nintBox outputCInt\\nintBox open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word | Hole)\n type = case typename\n in Hole\n Novika::FFI::UntypedPointer.new(typename.address)\n in Word\n (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n end\n (Hole.new(type)).onto(stack)\nend\ntarget.at(\"ffi:box\", \"( F T -- A ): allocates garbage-collected memory for Type, and\\n writes Form there. Form must be of (or convertible to) Type;\\n otherwise, this word dies. Leaves Address of the beginning of\\n the allocated memory.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n pointer = (type.from(form)).box\n (Decimal.new(pointer.address)).onto(stack)\nend\ntarget.at(\"ffi:unbox\", \"( A T -- F ): interprets whatever Address points at as a\\n value of the given Type, and leaves the matching Form.\\n Inverse of `ffi:box`.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is of the given Type. Passing 0\\n(none aka null pointer) for Address will lead to segfault.\\nPassing Address that points outside of your program's memory\\nwill lead to segfault. Passing Address that *is* in the bounds\\nof your program's memory, but one not pointing at a value of\\nthe given Type, will lead to undefined behavior (most likely\\njunk value of Form). Showing ill-formed results of this word to\\nclients, or letting clients control Address or Type, may expose\\nyour program to a whole class of security vulnerabilities.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n base = Pointer(Void).new(address.to_u64)\n form = (type.unbox(base)).to_form?.not_nil!\n form.onto(stack)\nend\ntarget.at(\"ffi:unsafeWrite\", \"( A F T -- ): interprets Form as that of the given Type,\\n and writes it at Address.\\n\\nThis word is **unsafe**: it does not check whether Address\\ncan be written to, whether there is enough memory to fully\\nwrite Form, etc. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing Address\\nthat *is* in the bounds of your program's memory and can\\nbe written to may lead to undefined behavior.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n value = type.from(form)\n base = Pointer(Void).new(address.to_u64)\n value.write_to!(base)\nend\ntarget.at(\"ffi:viewLayout\", \"( Svf -- Slf ): leaves Struct layout form for the given\\n Struct view form (an inline struct view, struct reference\\n view, or union view).\\n\\n```\\n[ x f32 y f32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint ffi:allocateStruct~ $: point~\\npoint ffi:allocateUnion $: pointU\\n\\npoint& ffi:viewLayout leaves: point\\npoint~ ffi:viewLayout leaves: point\\npointU ffi:viewLayout leaves: point\\n```\") do |_, stack|\n view = stack.drop.a(StructViewForm)\n view.layout.onto(stack)\nend\ntarget.at(\"ffi:sizeof\", \"( T -- B ): leaves the size of Type, in Bytes.\\n\\n```\\n#u8 ffi:sizeof leaves: 1\\n#u16 ffi:sizeof leaves: 2\\n#u32 ffi:sizeof leaves: 4\\n#u64 ffi:sizeof leaves: 8\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n (Decimal.new(type.sizeof)).onto(stack)\nend\ntarget.at(\"ffi:addressof\", \"( Svf/H -- A ): leaves Address of the given Struct view form\\n (an inline struct view, struct reference view, or union view),\\n or Hole in memory.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |_, stack|\n form = stack.drop.a(Hole | StructViewForm)\n (Decimal.new(form.address)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Frontend","path":"Novika/Capabilities/Impl/Frontend.html","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":7,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":"list = Block.new\ncapabilities.enabled.each do |klass|\n list.add(Quote.new(klass.id))\nend\nlist\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":3,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Novika::VERSION)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Ink","path":"Novika/Capabilities/Impl/Ink.html","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ink.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"COMPAT","name":"COMPAT","value":"{Color.rgb(0, 0, 0) => :black, Color.rgb(128, 0, 0) => :red, Color.rgb(0, 128, 0) => :green, Color.rgb(128, 128, 0) => :yellow, Color.rgb(0, 0, 128) => :blue, Color.rgb(128, 0, 128) => :magenta, Color.rgb(0, 128, 128) => :cyan, Color.rgb(192, 192, 192) => :light_gray, Color.rgb(128, 128, 128) => :dark_gray, Color.rgb(255, 0, 0) => :light_red, Color.rgb(0, 255, 0) => :light_green, Color.rgb(255, 255, 0) => :light_yellow, Color.rgb(0, 0, 255) => :light_blue, Color.rgb(255, 0, 255) => :light_magenta, Color.rgb(0, 255, 255) => :light_cyan, Color.rgb(255, 255, 255) => :white}"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":42,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"string = form.to_quote.string\ncolorful = string.colorize\nif fg\n colorful = colorful.fore(COMPAT[fg.closest(COMPAT.keys)])\nend\nif bg\n colorful = colorful.back(COMPAT[bg.closest(COMPAT.keys)])\nend\nappend_echo(engine, colorful)\n"}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":38,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"append_echo(engine, form.to_quote.string.colorize.reverse)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Nki","path":"Novika/Capabilities/Impl/Nki.html","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/nki.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"nki\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words to capture, read, and manipulate Novika images\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"nki:toBlock\", \"( Bf -- B ): leaves Block for the given Byteslice form,\\n assumed to contain a well-formed Novika image created\\n with `nki:captureAll`, `nki:captureNeighborhood`, or\\n otherwise. Dies if Byteslice form is an invalid Novika\\n image, or isn't a Novika image.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n bytes = stack.drop.a(Byteslice)\n begin\n image = bytes.to_io.read_bytes(Image)\n rescue error : BinData::ReadingVerificationException\n bytes.die(\"apparently, this byteslice is not a Novika image\")\n end\n (image.to_block(engine.capabilities)).onto(stack)\nend\ntarget.at(\"nki:captureAll\", \"( B -- Bf ): thoroughly, recursively captures entire\\n hierarchy of Block (its parents, prototype, friends,\\n tape, and dictionary), and leaves the resulting Novika\\n image as a Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nIf you're a visual type of person, imagine this word and\\nall related facilities as a kind of \\\"mold\\\", which carefully,\\nin an ordered fashion \\\"fills up\\\" a maze, until all paths\\nwere explored and all exits found.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhood\", \"( B -- Bf ): like `nki:captureAll`, but rather than\\n capturing all reachable blocks, captures only Block's\\n neighborhood. Leaves the resulting Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nWe store each block in Block's tape and dictionary in\\na list, then ask that block to do the same. When recursion\\nfinishes, the resulting list is called *block neighborhood*.\\n\\nParent, friends, and prototype of the given block are\\nreconstructed *if and only if they are in the block\\nneighborhood*.\\n\\n```\\n[ 1 2 3 ] nki:captureNeighborhood $: imgN\\n\\nimgN toQuote leaves: '[byteslice, consists of 111 byte(s)]' \\\"yours may differ!\\\"\\nimgN nki:toBlock leaves: [ [ 1 2 3 ] ]\\n\\n\\\"As opposed to nki:captureAll, which will capture EVERYTHING\\n it can reach:\\\"\\n[ 1 2 3 ] nki:captureAll $: imgA\\n\\nimgA toQuote leaves: '[byteslice, consists of 38298 byte(s)]' \\\"yours may differ!\\\"\\n\\n\\\"Note: [ 1 2 3 ] lives in a parallel universe now, with\\n its own friends, prototypes, toplevel block, and so on!\\n It doesn't have any links whatsoever to the whoever-it-was\\n that called nki:captureAll!\\\"\\nimgA nki:toBlock leaves: [ [ 1 2 3 ] ]\\n```\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllRaw\", \"( B -- Bf ): same as `nki:captureAll`, but does not archive\\n image payload obtained from capturing Block. May yield very\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodRaw\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but does not\\n archive image payload obtained from capturing Block. May yield\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllGzipBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodGzipBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliFast\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliFast\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/System","path":"Novika/Capabilities/Impl/System.html","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"ancestors":[{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/system.cr","line_number":100,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":101,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"print(form.to_quote.string)"}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":130,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":"exit(code.to_i)"}},{"html_id":"monotonic(engine):Decimal-instance-method","name":"monotonic","doc":"Returns a reading from the monotonic clock, in milliseconds.","summary":"Returns a reading from the monotonic clock, in milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":122,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(Time.monotonic.total_milliseconds)"}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":126,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":"sleep(millis.to_i.milliseconds)"}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":111,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":"string = prompt.to_quote.string\nprint(string)\nanswer = gets\n{answer ? Quote.new(answer) : nil, Boolean[!(!answer)]}\n"}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":118,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":"error.report(STDERR)"}}]}]},{"html_id":"novika/Novika/Capabilities/ISystem","path":"Novika/Capabilities/ISystem.html","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/System","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":77,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"system\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":85,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":81,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes all sorts of OS-related vocabulary, such as 'echo' and 'nap'\""}}],"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/system.cr","line_number":90,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":114,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/system.cr","line_number":116,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"appendEcho\", \"( F -- ): enquotes and appends Form to the standard\\n output stream.\") do |engine, stack|\n append_echo(engine, stack.drop)\nend\ntarget.at(\"readLine\", \"( Pf -- Aq true / false ): enquotes and prints Prompt\\n form to the standard output stream. Waits for the user\\n to answer, enquotes the answer and leaves it.\\n\\nIf user answered the prompt, leaves Answer quote followed\\nby boolean true. Otherwise, leaves boolean false.\\n\\n```\\n'What is your name? ' readLine => echo\\n\\n\\\"INPUT: What is your name? John Doe⏎\\\"\\n\\\"STDOUT: John Doe⏎\\\"\\n\\n\\\"INPUT: What is your name?Returns a reading from the monotonic clock, in milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/system.cr","line_number":111,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":""}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":108,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/system.cr","line_number":99,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":""}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/system.cr","line_number":105,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Capabilities/ISystem/PromptConfig","path":"Novika/Capabilities/ISystem/PromptConfig.html","kind":"struct","full_name":"Novika::Capabilities::ISystem::PromptConfig","name":"PromptConfig","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DELIMITERS","name":"DELIMITERS","value":"Word.new(\"delimiters\")"},{"id":"HISTORY","name":"HISTORY","value":"Word.new(\"history\")"},{"id":"MORE","name":"MORE","value":"Word.new(\"more?\")"},{"id":"PROMPT","name":"PROMPT","value":"Word.new(\"prompt\")"},{"id":"SUGGEST","name":"SUGGEST","value":"Word.new(\"suggest\")"}],"namespace":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"doc":"A thin wrapper around the prompt configuration block of `readLine*`.","summary":"A thin wrapper around the prompt configuration block of readLine*
.
Returns word delimiter quote, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":23,"url":null},"def":{"name":"delimiters?","return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(DELIMITERS)\nelse\n return\nend\n(Engine.exhaust(Engine.current.capabilities, entry)).top.a(Quote)\n"}},{"html_id":"history_entry?:Entry|Nil-instance-method","name":"history_entry?","doc":"Returns the history entry in the carrier block, if any.","summary":"Returns the history entry in the carrier block, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":17,"url":null},"def":{"name":"history_entry?","return_type":"Entry | ::Nil","visibility":"Public","body":"@carrier.entry_for?(HISTORY)"}},{"html_id":"more?(expression:String):Form|Nil-instance-method","name":"more?","doc":"Returns `false` or nil if no more input is expected after\n*expression*, otherwise, returns some form that the user\nassigned \"more\" to or that they left on top of the stack\n(interpreted as `true`).","summary":"Returns false
or nil if no more input is expected after expression, otherwise, returns some form that the user assigned "more" to or that they left on top of the stack (interpreted as true
).
Returns the prompt quote for the given line_number, or nil if no prompt should be used.
","abstract":false,"args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"args_string":"(line_number : Int32) : Quote | Nil","args_html":"(line_number : Int32) : Quote | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":43,"url":null},"def":{"name":"prompt?","args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(PROMPT)\nelse\n return\nend\nstack = Block.with(Decimal.new(line_number))\nform = (Engine.exhaust(Engine.current.capabilities, entry, stack)).top\nform.to_quote\n"}},{"html_id":"suggest?(word:String,prior:String):Tuple(Quote,Block)|Nil-instance-method","name":"suggest?","doc":"Returns the title quote followed by suggestions block for\nthe given *word* and input *prior* to *word*.","summary":"Returns the title quote followed by suggestions block for the given word and input prior to word.
","abstract":false,"args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"args_string":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","args_html":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":54,"url":null},"def":{"name":"suggest?","args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"return_type":"::Tuple(Quote, Block) | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(SUGGEST)\nelse\n return\nend\nif entry.opener?\n stack = Block.with(Quote.new(prior), Quote.new(word))\n block = Engine.exhaust(Engine.current.capabilities, entry, stack)\nelse\n block = entry.form.a(Block)\n if block.count == 2\n else\n block.die(\"expected block of the form [ title:quote [ ...suggestion:quote ] ]\")\n end\nend\ntitle, suggestions = block.at(block.count - 2), block.at(block.count - 1)\n{title.a(Quote), suggestions.a(Block)}\n"}}]}]}]},{"html_id":"novika/Novika/Capability","path":"Novika/Capability.html","kind":"module","full_name":"Novika::Capability","name":"Capability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":31,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Merges instance-side and class-side interfaces to a Novika\ncapability. Automatically includes `ICapabilityClass` and\n`ICapability` for you.","summary":"Merges instance-side and class-side interfaces to a Novika capability.
"},{"html_id":"novika/Novika/CapabilityCollection","path":"Novika/CapabilityCollection.html","kind":"class","full_name":"Novika::CapabilityCollection","name":"CapabilityCollection","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capability.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A collection of language capability implementations.\n\nCapability implementations can indirectly (by id) interact\nwith each other by sharing the capability collection they're\nmembers of.\n\n```\n# (!) Compile with -Dnovika_console\n\ncaps = CapabilityCollection.new\n\n# Add capability classes:\ncaps << Capabilities::Impl::Essential\ncaps << Capabilities::Impl::System\ncaps << Capabilities::Impl::Console\n\n# Enable capabilities. At this point you kinda don't know\n# which implementation is used under the hood, so you\n# need to refer to the capability by its id.\ncaps.enable(\"essential\")\ncaps.enable(\"system\")\ncaps.enable(\"console\")\n\nblock = Block.new(caps.block)\nblock.slurp(\"console:on 1000 nap console:off\")\n\nEngine.exhaust(block, caps)\n```","summary":"A collection of language capability implementations.
","class_methods":[{"html_id":"available:Array(ICapabilityClass)-class-method","name":"available","doc":"Lists *all* available (registered) capability classes.\n\nFor a capability class to be registered (available), it\nshould be the last subclass of a `Capability` includer\n(subclass depth is irrelevant), or have no subclasses\nand directly include `Capability`.","summary":"Lists all available (registered) capability classes.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":282,"url":null},"def":{"name":"available","return_type":"Array(ICapabilityClass)","visibility":"Public","body":"{% if true %}\n [{% for capability in Capability.includers %}\n {% subclasses = capability.all_subclasses %}\n {% if (!capability.abstract?) && subclasses.empty? %}\n {{ capability }},\n {% else %}{% if subclass = subclasses.reject(&.abstract?).last %}\n {{ subclass }},\n {% end %}{% end %}\n {% end %}] of ICapabilityClass\n {% end %}"}},{"html_id":"with_available-class-method","name":"with_available","doc":"Creates a capability collection, and adds *all* available\ncapabilities (see `CapabilityCollection.available`). Does\nnot enable any of them.\n\nReturns the resulting capability collection.","summary":"Creates a capability collection, and adds all available capabilities (see CapabilityCollection.available
).
Creates a capability collection, and adds capabilities that are on by default.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":256,"url":null},"def":{"name":"with_default","visibility":"Public","body":"caps = CapabilityCollection.new\navailable.each do |cap|\n if cap.on_by_default?\n else\n next\n end\n caps << cap\nend\ncaps\n"}}],"constructors":[{"html_id":"new(parent:Block|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil = nil)","args_html":"(parent : Block | Nil = nil)","location":{"filename":"src/novika/capability.cr","line_number":72,"url":null},"def":{"name":"new","args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(parent)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(cls:ICapabilityClass)-instance-method","name":"<<","doc":"Adds a capability class *cls* to this collection.","summary":"Adds a capability class cls to this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"args_string":"(cls : ICapabilityClass)","args_html":"(cls : ICapabilityClass)","location":{"filename":"src/novika/capability.cr","line_number":217,"url":null},"def":{"name":"<<","args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"visibility":"Public","body":"@classes[cls.id] = cls"}},{"html_id":"<<(library:Library)-instance-method","name":"<<","doc":"Adds a *library* to this collection. Overwrites any previous\nlibrary with the same id.","summary":"Adds a library to this collection.
","abstract":false,"args":[{"name":"library","external_name":"library","restriction":"Library"}],"args_string":"(library : Library)","args_html":"(library : Library)","location":{"filename":"src/novika/capability.cr","line_number":223,"url":null},"def":{"name":"<<","args":[{"name":"library","external_name":"library","restriction":"Library"}],"visibility":"Public","body":"@libraries[library.id] = library"}},{"html_id":"[]?(cls:T.class):T|NilforallT-instance-method","name":"[]?","doc":"Returns the instance of the given capability class *cls*,\nif such instance can be found in this collection. Otherwise,\nreturns nil.","summary":"Returns the instance of the given capability class cls, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class) : T | Nil forall T","args_html":"(cls : T.class) : T | Nil forall T","location":{"filename":"src/novika/capability.cr","line_number":154,"url":null},"def":{"name":"[]?","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"@objects[cls.id]?.try do |__arg1|\n __arg1.as(T)\nend"}},{"html_id":"block:Block-instance-method","name":"block","doc":"Returns the *capability block*: a block managed by this\ncollection, which includes the vocabulary injected by\nthe enabled capabilities.","summary":"Returns the capability block: a block managed by this collection, which includes the vocabulary injected by the enabled capabilities.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":70,"url":null},"def":{"name":"block","return_type":"Block","visibility":"Public","body":"@block"}},{"html_id":"copy:CapabilityCollection-instance-method","name":"copy","doc":"Copies this capability collection.\n\n* This collection shares library load callbacks (themselves,\n *not* the list of them) with the returned collection.\n\n* This collection shares FFI `Library` instances with the\n returned one, by reference.\n\n* This collection shares capability block parent (see `new`)\n with the returned one, by reference.\n\nEverything else is copied or created anew.","summary":"Copies this capability collection.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":239,"url":null},"def":{"name":"copy","return_type":"CapabilityCollection","visibility":"Public","body":"copy = CapabilityCollection.new\n@classes.each_value do |cls|\n copy << cls\nend\n@objects.each_key do |id|\n copy.enable(id)\nend\n@libraries.each_value do |library|\n copy << library\nend\n@load_library_callbacks.each do |callback|\n copy.on_load_library?(callback)\nend\ncopy\n"}},{"html_id":"enable(id:String):Bool-instance-method","name":"enable","doc":"Enables a capability with the given *id*.\n\nTo enable a capability means to create an instance of the\ncorresponding implementation class, and use that instance\nto inject the capability vocabulary into this collection's\n*capabilities block*, `block`. You can then access `block`\nand e.g. inherit from it to access the vocabulary of the\nenabled capabilities.\n\nDoes nothing if the capability is already enabled.\nDoes nothing if there is no capability with the given id.\n\nReturns whether there is a capability with the given *id*.","summary":"Enables a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Bool","args_html":"(id : String) : Bool","location":{"filename":"src/novika/capability.cr","line_number":116,"url":null},"def":{"name":"enable","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"if @objects.has_key?(id)\n return true\nend\nif cap = get_capability_class?(id)\nelse\n return false\nend\nobject = cap.new(self)\nobject.inject(block)\n@objects[id] = object\ntrue\n"}},{"html_id":"enable_all-instance-method","name":"enable_all","doc":"Enables all capabilities unconditionally.\n\nReturns self.","summary":"Enables all capabilities unconditionally.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":145,"url":null},"def":{"name":"enable_all","visibility":"Public","body":"@classes.each_key do |k|\n enable(k)\nend\nself\n"}},{"html_id":"enable_default-instance-method","name":"enable_default","doc":"Enables all capabilities that respond with true when sent\n`ICapabilityClass#on_by_default?`.\n\nFor capabilities that respond with false, you'll need to\ntarget them explicitly with `enable(id)`, or use `enable_all`\ninstead of `enable_default`.\n\nReturns self.","summary":"Enables all capabilities that respond with true when sent ICapabilityClass#on_by_default?
.
Returns an array of capabilities that are enabled in this collection at the moment.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":81,"url":null},"def":{"name":"enabled","visibility":"Public","body":"@objects.values.map(&.class)"}},{"html_id":"fetch(cls:T.class,&:T->U):U|NilforallT,U-instance-method","name":"fetch","doc":"Yields the capability instance of the given capability\nclass *cls* to the block, if such instance can be found\nin this collection.\n\nReturns the result of the block, or nil.","summary":"Yields the capability instance of the given capability class cls to the block, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class, & : T -> U) : U | Nil forall T, U","args_html":"(cls : T.class, & : T -> U) : U | Nil forall T, U","location":{"filename":"src/novika/capability.cr","line_number":210,"url":null},"def":{"name":"fetch","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> U)"},"return_type":"U | ::Nil","visibility":"Public","body":"if impl = self[cls]?\n yield impl\nend"}},{"html_id":"get_capability_class?(id:String)-instance-method","name":"get_capability_class?","doc":"Returns the capability class with the given *id*. Returns nil\nif there is no such capability class in this collection.","summary":"Returns the capability class with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":166,"url":null},"def":{"name":"get_capability_class?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes[id]?"}},{"html_id":"get_library?(id:String)-instance-method","name":"get_library?","doc":"Returns the library with the given *id*. Returns nil if there\nis no such library in this collection.","summary":"Returns the library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":160,"url":null},"def":{"name":"get_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries[id]?"}},{"html_id":"has_capability?(id:String)-instance-method","name":"has_capability?","doc":"Returns whether this collection includes a capability with\nthe given *id*.","summary":"Returns whether this collection includes a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":93,"url":null},"def":{"name":"has_capability?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes.has_key?(id)"}},{"html_id":"has_capability_enabled?(id:String)-instance-method","name":"has_capability_enabled?","doc":"Returns whether this collection has the capability with\nthe given *id* enabled.","summary":"Returns whether this collection has the capability with the given id enabled.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":87,"url":null},"def":{"name":"has_capability_enabled?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@objects.has_key?(id)"}},{"html_id":"has_library?(id:String)-instance-method","name":"has_library?","doc":"Returns whether this collection includes a library with\nthe given *id*.","summary":"Returns whether this collection includes a library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":99,"url":null},"def":{"name":"has_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries.has_key?(id)"}},{"html_id":"load_library?(id:String):Library|Nil-instance-method","name":"load_library?","doc":"Tries to load a library (aka shared object) with the given\n*id*. Returns the resulting `Library` object, or nil.\n\nThe library object is cached: further calls to `load_library?`\nand `get_library?` will return that library object.","summary":"Tries to load a library (aka shared object) with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Library | Nil","args_html":"(id : String) : Library | Nil","location":{"filename":"src/novika/capability.cr","line_number":195,"url":null},"def":{"name":"load_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Library | ::Nil","visibility":"Public","body":"@libraries.fetch(id) do\n @load_library_callbacks.each do |callback|\n if library = callback.call(id)\n return @libraries[id] = library\n end\n end\nend"}},{"html_id":"on_load_library?(callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"args_string":"(callback : String -> Library | Nil)","args_html":"(callback : String -> Library | Nil)","location":{"filename":"src/novika/capability.cr","line_number":181,"url":null},"def":{"name":"on_load_library?","args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"visibility":"Public","body":"@load_library_callbacks << callback"}},{"html_id":"on_load_library?(&callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":186,"url":null},"def":{"name":"on_load_library?","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"},"visibility":"Public","body":"on_load_library?(callback)"}}]},{"html_id":"novika/Novika/CaptureMode","path":"Novika/CaptureMode.html","kind":"enum","full_name":"Novika::CaptureMode","name":"CaptureMode","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":24,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CaptureAll","name":"CaptureAll","value":"0"},{"id":"CaptureNeighborhood","name":"CaptureNeighborhood","value":"1"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"capture_all?-instance-method","name":"capture_all?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":25,"url":null},"def":{"name":"capture_all?","visibility":"Public","body":"self == CaptureAll"}},{"html_id":"capture_neighborhood?-instance-method","name":"capture_neighborhood?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":26,"url":null},"def":{"name":"capture_neighborhood?","visibility":"Public","body":"self == CaptureNeighborhood"}}]},{"html_id":"novika/Novika/Classifier","path":"Novika/Classifier.html","kind":"struct","full_name":"Novika::Classifier","name":"Classifier","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/classifier.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"`Classifier` brings *unclassified forms* to life.\n\n`Classifier` assigns types to fragments of Novika code\nconveniently called *unclassified forms*: this\nunclassified form is a decimal, this one is a word, that\none is a quote.\n\nUnclassified forms are given to `Classifier` by `Scissors`,\nan object dedicated to cutting a big blob of Novika code\ninto smaller fragments.\n\n`Scissors` and `Classifier` are designed to work in\ntandem. Separating one from the other is possible and will\nwork, but is not recommended unless you have read the source\ncode of both.","summary":"Classifier
brings unclassified forms to life.
Initializes a classifier from the given source string and Novika block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"args_string":"(source : String, block : Novika::Block)","args_html":"(source : String, block : Novika::Block)","location":{"filename":"src/novika/classifier.cr","line_number":29,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source, block)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"block:Novika::Block-instance-method","name":"block","doc":"Returns the block used by this classifier.","summary":"Returns the block used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":21,"url":null},"def":{"name":"block","visibility":"Public","body":"@block"}},{"html_id":"bytes:Pointer(UInt8)-instance-method","name":"bytes","doc":"Returns the source code byte pointer used by this classifier.","summary":"Returns the source code byte pointer used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":18,"url":null},"def":{"name":"bytes","visibility":"Public","body":"@bytes"}},{"html_id":"classify(start,count,dot):Nil-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long. *dot* is the byte index of `'.'`.\n\nThese three arguments are assumed to come from `Scissors#cut`.\n\nThis method does practically no bounds checks, is unsafe\nand must be worked with carefully.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"args_string":"(start, count, dot) : Nil","args_html":"(start, count, dot) : Nil","location":{"filename":"src/novika/classifier.cr","line_number":223,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if count.zero?\n return\nend\nbyte = @bytes[start]\ncase byte\nwhen '['\n nest\nwhen ']'\n unnest\nwhen '#'\n if count > 1\n add(Novika::QuotedWord.new(build_raw(start + 1, count - 1)))\n else\n add(Novika::Word.new(\"#\"))\n end\nwhen '|'\n if count > 1\n add(Novika::Word.new(build_raw(start, count)))\n else\n push_cursor(block.count)\n end\nwhen '\\''\n add(Novika::Quote.new(build_quote(start + 1, count - 2)))\nwhen '\"'\n if block.has_comment?\n return\n end\n if block.count.zero?\n else\n return\n end\n block.describe_with?(build_comment(start + 1, count - 2))\nelse\n e = (start + count) - 1\n if dot\n else\n frag = build_raw(start, count)\n if decimal?(start, e, sign: true)\n add(Novika::Decimal.new(frag))\n else\n if number_with_base = number_with_base?(frag)\n number, base = number_with_base\n add(Novika::Decimal.new(number.to_big_i(base)))\n else\n add(Novika::Word.new(frag))\n end\n end\n return\n end\n if ((start < dot && dot < e) && (decimal?(start, dot - 1, sign: true))) && (decimal?(dot + 1, e))\n add(Novika::Decimal.new(build_raw(start, count)))\n else\n classify(start, dot - start, dot: nil)\n add(Novika::Word.new(\".\"))\n classify(dot + 1, e - dot)\n end\nend\n"}},{"html_id":"classify(start,count)-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"args_string":"(start, count)","args_html":"(start, count)","location":{"filename":"src/novika/classifier.cr","line_number":311,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"visibility":"Public","body":"dot = nil\nstart.upto((start + count) - 1) do |index|\n if @bytes[index] === '.'\n dot = index\n break\n end\nend\nclassify(start, count, dot)\n"}},{"html_id":"end-instance-method","name":"end","doc":"Ends classification. Makes sure all blocks are closed\n(have their corresponding `]`).","summary":"Ends classification.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":324,"url":null},"def":{"name":"end","visibility":"Public","body":"if @ceiling.same?(@block)\nelse\n @block.die(\"missing ']'\")\nend"}}]},{"html_id":"novika/Novika/Color","path":"Novika/Color.html","kind":"struct","full_name":"Novika::Color","name":"Color","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/color.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"rgb(r,g,b)-class-method","name":"rgb","doc":"Creates a `Color` from *r*ed (0 <= h <= 255), *g*reen\n(0 <= g <= 255), *b*lue (0 <= b <= 255) channel values.","summary":"Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and lightness (0 <= l <= 100, percents).
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and value (0 <= v <= 100, percents).
Creates a Color
from lightness (0-100), chroma (0-132), hue (0-360).
Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Holds alpha channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a","return_type":"Decimal","visibility":"Public","body":"@a"}},{"html_id":"a=(a:Decimal)-instance-method","name":"a=","doc":"Holds alpha channel value decimal (0-255).\n\nYou can mutate this to set alpha, but do remember that\n`Color` is a struct.","summary":"Holds alpha channel value decimal (0-255).
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"args_string":"(a : Decimal)","args_html":"(a : Decimal)","location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:Decimal-instance-method","name":"b","doc":"Returns blue channel value decimal (0-255).","summary":"Returns blue channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":14,"url":null},"def":{"name":"b","return_type":"Decimal","visibility":"Public","body":"@b"}},{"html_id":"closest(palette:Array(Color))-instance-method","name":"closest","doc":"Returns the color closest to this color from *palette*.\n\nHow close one color is to another is determined by their\ndistance in an HSV-backed coordinate system.","summary":"Returns the color closest to this color from palette.
","abstract":false,"args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"args_string":"(palette : Array(Color))","args_html":"(palette : Array(Color))","location":{"filename":"src/novika/forms/color.cr","line_number":55,"url":null},"def":{"name":"closest","args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"visibility":"Public","body":"h, s, v = hsv\npalette.min_by do |other|\n h1, s1, v1 = other.hsv\n (((h1 - h).to_f64 ** 2) + ((s1 - s).to_f64 ** 2)) + ((v1 - v).to_f64 ** 2)\nend\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":67,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"g:Decimal-instance-method","name":"g","doc":"Returns green channel value decimal (0-255).","summary":"Returns green channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":11,"url":null},"def":{"name":"g","return_type":"Decimal","visibility":"Public","body":"@g"}},{"html_id":"hsl:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsl","doc":"Returns a tuple with H, S, L of this color.","summary":"Returns a tuple with H, S, L of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":31,"url":null},"def":{"name":"hsl","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, l = Color.rgb2hsl(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(l)}\n"}},{"html_id":"hsv:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsv","doc":"Returns a tuple with H, S, V of this color.","summary":"Returns a tuple with H, S, V of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":38,"url":null},"def":{"name":"hsv","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, v = Color.rgb2hsv(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(v)}\n"}},{"html_id":"lch:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"lch","doc":"Returns a tuple with L, C, H of this color.","summary":"Returns a tuple with L, C, H of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":45,"url":null},"def":{"name":"lch","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"l, c, h = LCH.rgb2lch(r.to_i, g.to_i, b.to_i)\n{Decimal.new(l.round), Decimal.new(c.round), Decimal.new(h.round)}\n"}},{"html_id":"r:Decimal-instance-method","name":"r","doc":"Returns red channel value decimal (0-255).","summary":"Returns red channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":8,"url":null},"def":{"name":"r","return_type":"Decimal","visibility":"Public","body":"@r"}},{"html_id":"rgb:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"rgb","doc":"Returns a tuple of R, G, B channel values.","summary":"Returns a tuple of R, G, B channel values.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":26,"url":null},"def":{"name":"rgb","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"{r, g, b}"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":71,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"a255 = Decimal.new(255)\nio << \"rgb\"\nif a == a255\nelse\n io << \"a\"\nend\n(((((io << \"(\") << r) << \", \") << g) << \", \") << b\nif a == a255\nelse\n (io << \", \") << a\nend\nio << \")\"\n"}}]},{"html_id":"novika/Novika/ColorSnapshot","path":"Novika/ColorSnapshot.html","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":95,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ColorSnapshot]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: r, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: g, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: b, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: a, cls: UInt8, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Color)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Color"}],"args_string":"(form : Color)","args_html":"(form : Color)","location":{"filename":"src/novika/image.cr","line_number":116,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Color"}],"visibility":"Public","body":"color = new\ncolor.r = form.r.to_u8\ncolor.g = form.g.to_u8\ncolor.b = form.b.to_u8\ncolor.a = form.a.to_u8\ncolor\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":96,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"a:UInt8-instance-method","name":"a","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"def":{"name":"a","return_type":"UInt8","visibility":"Public","body":"@a"}},{"html_id":"a=(a:UInt8)-instance-method","name":"a=","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"args_string":"(a : UInt8)","args_html":"(a : UInt8)","def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:UInt8-instance-method","name":"b","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"def":{"name":"b","return_type":"UInt8","visibility":"Public","body":"@b"}},{"html_id":"b=(b:UInt8)-instance-method","name":"b=","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"args_string":"(b : UInt8)","args_html":"(b : UInt8)","def":{"name":"b=","args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"visibility":"Public","body":"@b = b"}},{"html_id":"g:UInt8-instance-method","name":"g","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"def":{"name":"g","return_type":"UInt8","visibility":"Public","body":"@g"}},{"html_id":"g=(g:UInt8)-instance-method","name":"g=","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"args_string":"(g : UInt8)","args_html":"(g : UInt8)","def":{"name":"g=","args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"visibility":"Public","body":"@g = g"}},{"html_id":"r:UInt8-instance-method","name":"r","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"def":{"name":"r","return_type":"UInt8","visibility":"Public","body":"@r"}},{"html_id":"r=(r:UInt8)-instance-method","name":"r=","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"args_string":"(r : UInt8)","args_html":"(r : UInt8)","def":{"name":"r=","args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"visibility":"Public","body":"@r = r"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":110,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"color = Color.rgb(Decimal.new(r), Decimal.new(g), Decimal.new(b))\ncolor.a = Decimal.new(a)\ncolor\n"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Decimal","path":"Novika/Decimal.html","kind":"class","full_name":"Novika::Decimal","name":"Decimal","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/decimal.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A representation for decimal numbers inside Novika.","summary":"A representation for decimal numbers inside Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":27,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"decimal\""}}],"constructors":[{"html_id":"new(val:BigDecimal)-class-method","name":"new","abstract":false,"args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"args_string":"(val : BigDecimal)","args_html":"(val : BigDecimal)","location":{"filename":"src/novika/forms/decimal.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"visibility":"Public","body":"_ = allocate\n_.initialize(val)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(object:String|Number)-class-method","name":"new","abstract":false,"args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"args_string":"(object : String | Number)","args_html":"(object : String | Number)","location":{"filename":"src/novika/forms/decimal.cr","line_number":13,"url":null},"def":{"name":"new","args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"visibility":"Public","body":"_ = allocate\n_.initialize(object)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"%(other:Decimal):Decimal-instance-method","name":"%","doc":"Returns the remainder of this and *other* decimal numbers.","summary":"Returns the remainder of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":75,"url":null},"def":{"name":"%","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val % other.val)"}},{"html_id":"&(other:Decimal):Decimal-instance-method","name":"&","doc":"Combines this and *other* decimals using bitwise and.","summary":"Combines this and other decimals using bitwise and.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":99,"url":null},"def":{"name":"&","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value & other.val.value)"}},{"html_id":"*(other:Decimal):Decimal-instance-method","name":"*","doc":"Returns the product of this and *other* decimal numbers.","summary":"Returns the product of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":65,"url":null},"def":{"name":"*","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val * other.val)"}},{"html_id":"**(other:Decimal):Decimal-instance-method","name":"**","doc":"Raises this decimal to the power of *other*.","summary":"Raises this decimal to the power of other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":80,"url":null},"def":{"name":"**","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"if val.scale.zero? && other.val.scale.zero?\n return Decimal.new(val ** other.val.to_i64)\nend\nDecimal.new(val.to_f64 ** other.to_f64)\n"}},{"html_id":"+(other:Decimal):Decimal-instance-method","name":"+","doc":"Returns the sum of this and *other* decimal numbers.","summary":"Returns the sum of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":55,"url":null},"def":{"name":"+","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val + other.val)"}},{"html_id":"-(other:Decimal):Decimal-instance-method","name":"-","doc":"Returns the difference between this and *other* decimal numbers.","summary":"Returns the difference between this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":60,"url":null},"def":{"name":"-","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val - other.val)"}},{"html_id":"/(other:Decimal):Decimal-instance-method","name":"/","doc":"Returns the quotient of this and *other* decimal numbers.","summary":"Returns the quotient of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":70,"url":null},"def":{"name":"/","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val / other.val)"}},{"html_id":"<(other:Decimal):Bool-instance-method","name":"<","doc":"Returns whether this decimal is smaller than *other*.","summary":"Returns whether this decimal is smaller than other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Bool","args_html":"(other : Decimal) : Bool","location":{"filename":"src/novika/forms/decimal.cr","line_number":94,"url":null},"def":{"name":"<","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Bool","visibility":"Public","body":"val < other.val"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
Combines this and other decimals using bitwise or.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":104,"url":null},"def":{"name":"|","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value | other.val.value)"}},{"html_id":"bitcount:Decimal-instance-method","name":"bitcount","doc":"Returns the number of bits in this decimal.","summary":"Returns the number of bits in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":161,"url":null},"def":{"name":"bitcount","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.bit_length)"}},{"html_id":"ceil:Decimal-instance-method","name":"ceil","doc":"Rounds this decimal up.","summary":"Rounds this decimal up.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":132,"url":null},"def":{"name":"ceil","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.ceil)"}},{"html_id":"chr:Char-instance-method","name":"chr","doc":"Returns the character corresponding to this decimal.","summary":"Returns the character corresponding to this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":32,"url":null},"def":{"name":"chr","return_type":"Char","visibility":"Public","body":"to_i.chr"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/decimal.cr","line_number":21,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"decimal number \"\nto_s(io)\n"}},{"html_id":"each_bit(&:Decimal->)-instance-method","name":"each_bit","doc":"Yields each bit in this decimal.","summary":"Yields each bit in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":109,"url":null},"def":{"name":"each_bit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Decimal ->)"},"visibility":"Public","body":"(val.value.to_s(2)).each_char do |char|\n if char == '-'\n next\n end\n yield Decimal.new(char == '1' ? 1 : 0)\nend"}},{"html_id":"floor:Decimal-instance-method","name":"floor","doc":"Rounds this decimal down.","summary":"Rounds this decimal down.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":127,"url":null},"def":{"name":"floor","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.floor)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns whether this decimal is in the bounds of Int64
.
Asserts this decimal is in one of ranges.
","abstract":false,"args":[{"name":"ranges","external_name":"ranges","restriction":""}],"args_string":"(*ranges) : Decimal","args_html":"(*ranges) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":166,"url":null},"def":{"name":"in","args":[{"name":"ranges","external_name":"ranges","restriction":""}],"splat_index":0,"return_type":"Decimal","visibility":"Public","body":"if ranges.any?(&.includes?(val))\n return self\nend\nmessage = String.build do |io|\n io << \"decimal out of range: expected \"\n if ranges.size > 1\n io << \"any of: \"\n end\n ranges.join(io, \", \") do |range|\n (((io << \"[\") << range.begin) << \"; \") << range.end\n io << (range.exclusive? ? \")\" : \"]\")\n end\nend\ndie(message)\n"}},{"html_id":"int:Decimal-instance-method","name":"int","doc":"Asserts this decimal is an integer. Dies if it isn't.","summary":"Asserts this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":184,"url":null},"def":{"name":"int","return_type":"Decimal","visibility":"Public","body":"if integer?\n return self\nend\ndie(\"decimal is not an integer\")\n"}},{"html_id":"integer?-instance-method","name":"integer?","doc":"Returns whether this decimal is an integer.","summary":"Returns whether this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":199,"url":null},"def":{"name":"integer?","visibility":"Public","body":"val.trunc == val"}},{"html_id":"nth_ls_bit(n:Decimal):Decimal-instance-method","name":"nth_ls_bit","doc":"Returns *n*-th least significant bit","summary":"Returns n-th least significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal","args_html":"(n : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":156,"url":null},"def":{"name":"nth_ls_bit","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.abs.bit(n.to_i))"}},{"html_id":"nth_ms_bit?(n:Decimal):Decimal|Nil-instance-method","name":"nth_ms_bit?","doc":"Returns *n*-th most significant bit","summary":"Returns n-th most significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal | Nil","args_html":"(n : Decimal) : Decimal | Nil","location":{"filename":"src/novika/forms/decimal.cr","line_number":147,"url":null},"def":{"name":"nth_ms_bit?","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal | ::Nil","visibility":"Public","body":"str = val.value.to_s(2)\nnint = n.to_i\nif nint < str.size\nelse\n return\nend\nDecimal.new(str[nint + (val.negative? ? 1 : 0)]? == '1' ? 1 : 0)\n"}},{"html_id":"posint:Decimal-instance-method","name":"posint","doc":"Asserts this decimal is a positive integer (i.e., >= 0).\nDies if it isn't.","summary":"Asserts this decimal is a positive integer (i.e., >= 0).
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":192,"url":null},"def":{"name":"posint","return_type":"Decimal","visibility":"Public","body":"if val >= 0 && integer?\n return self\nend\ndie(\"decimal is not a positive integer\")\n"}},{"html_id":"rad_cos:Decimal-instance-method","name":"rad_cos","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":137,"url":null},"def":{"name":"rad_cos","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.cos(val))"}},{"html_id":"rad_sin:Decimal-instance-method","name":"rad_sin","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":142,"url":null},"def":{"name":"rad_sin","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sin(val))"}},{"html_id":"round:Decimal-instance-method","name":"round","doc":"Rounds this decimal.","summary":"Rounds this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":117,"url":null},"def":{"name":"round","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.round)"}},{"html_id":"sqrt:Decimal-instance-method","name":"sqrt","doc":"Returns the square root of this decimal.","summary":"Returns the square root of this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":89,"url":null},"def":{"name":"sqrt","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sqrt(val))"}},{"html_id":"to_f32(*args,**options)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f32(*args, **options)"}},{"html_id":"to_f32(*args,**options,&)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f32(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_f64(*args,**options)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f64(*args, **options)"}},{"html_id":"to_f64(*args,**options,&)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f64(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_i:Int32-instance-method","name":"to_i","doc":"Downgrades this decimal into an integer (`Int32`). Dies\nif too large.","summary":"Downgrades this decimal into an integer (Int32
).
Truncates this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":122,"url":null},"def":{"name":"trunc","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.trunc)"}},{"html_id":"zero?:Bool-instance-method","name":"zero?","doc":"Returns whether this decimal is zero.","summary":"Returns whether this decimal is zero.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":42,"url":null},"def":{"name":"zero?","return_type":"Bool","visibility":"Public","body":"val.zero?"}}]},{"html_id":"novika/Novika/Dict","path":"Novika/Dict.html","kind":"class","full_name":"Novika::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":55,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Default dictionary protocol implementation: default block\ndictionary implementation. Uses a hash map for storage.\n\nNote: setting or getting with blocks as keys performs a\nlinear scan for now. The semantics for this is unstable.","summary":"Default dictionary protocol implementation: default block dictionary implementation.
","instance_methods":[{"html_id":"==(other:Dict)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Dict"}],"args_string":"(other : Dict)","args_html":"(other : Dict)","location":{"filename":"src/novika/dict.cr","line_number":155,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Dict"}],"visibility":"Public","body":"if @store == (other.@store)\nelse\n return false\nend\nif @blockstore.class == (other.@blockstore).class\nelse\n return false\nend\nif bs_l = @blockstore\nelse\n return true\nend\nbs_r = (other.@blockstore).not_nil!\nif bs_l.size == bs_r.size\nelse\n return false\nend\nbs_l.all? do |k_l, v_l|\n bs_r.any? do |k_r, v_r|\n (k_l == k_r) && (v_l == v_r)\n end\nend\n"}},{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":123,"url":null},"def":{"name":"clear","visibility":"Public","body":"@store.clear\n@blockstore.try(&.clear)\n"}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":142,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":"Dict.new(@store.dup, @blockstore.try(&.dup))"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":138,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"@store.size + (@blockstore.try(&.size) || 0)"}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":119,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":"name.is_a?(Block) ? del_block(name) : @store.delete(name)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":146,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"visibility":"Public","body":"@store.each do |k, v|\n yield k, v\nend\n@blockstore.try(&.each do |k, v|\n yield k, v\nend)\n"}},{"html_id":"get(name:Form,&):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, &) : Entry | Nil","args_html":"(name : Form, &) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":113,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"return_type":"Entry | ::Nil","visibility":"Public","body":"if name.is_a?(Block)\n return get_block(name) do\n yield name\n end\nend\n@store.fetch(name) do\n yield name\nend\n"}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":128,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Block) ? has_block?(name) : @store.has_key?(name)"}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":132,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":"donor.each do |k, v|\n if k.is_a?(Word) && k.private?\n else\n set(k, v)\n end\nend"}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":107,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":"if name.is_a?(Block)\n return set_block(name, entry)\nend\n@store[name] = entry\n"}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Executes a fetcher callback on every visited vertex in the block graph starting from an entrypoint block, until the callback returns T
, or until there are no more blocks to explore.
Executes the fetcher callback on every visited vertex in the block graph starting from an entrypoint block, and until the callback returns T
, or until exhausted all reachable vertices.
Same as #on(entrypoint : Block, ignore : Nil)
, the difference being that immediately adjacent block ignore list is taken into account.
Index of the code block in a continuation block.
"},{"id":"C_STACK_AT","name":"C_STACK_AT","value":"1","doc":"Index of the stack block in a continuation block.","summary":"Index of the stack block in a continuation block.
"},{"id":"MAX_CONTS","name":"MAX_CONTS","value":"1024","doc":"Maximum amount of scheduled continuations in `conts`. After\npassing this number, `Error` is raised to bring attention\nto such dangerous depth.","summary":"Maximum amount of scheduled continuations in #conts
.
Maximum number of engines that can be created.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"An engine object is responsible for managing a *continuations block*.\n\nContinuations block consists of *continuatio**n** blocks*.\n\nCanonical continuation blocks themselves contain two blocks\n(see `Engine.cont`):\n\n- *Code block*, more commonly known as simply the block\n (and as *active* block when its continuation is active,\n i.e., when it's being evaluated),\n\n- *Stack block*, more commonly known as simply the stack\n (and as *active* stack when its continuation is active,\n i.e., when it's being evaluated).\n\n`Engine#schedule` is used to create a continuation block\ngiven a `Schedulable` object (usually a `Form`, and in rarer\ncases an `Entry`) and a stack block. It then adds the\ncontinuation block to the continuations block -- effectively\nscheduling it for execution *on the next exhaust loop cycle*.\n\nNote that there are two other methods linked with execution\nand implemented by all forms: `on_open`, and `on_parent_open`.\nThey *perform* whatever action the form wants rather than\nsimply *scheduling* it to be performed some time in the\nfuture. Namely, `on_open` is invoked whenever the form at\nhand is itself the target of opening (aka execution, aka\nevaluation), and `on_parent_open` is invoked when a block\ncontaining the form at hand (its parent block) is the target\nof opening.\n\nAn engine's *exhaust loop* is where most of the magic happens.\nIt is organized very much like the fetch-decode-execute cycle\nin CPUs.\n\nFor *fetch*, the engine finds the top (see `Block#top`)\ncontinuation block, then finds the top form on the code\nblock, and invokes the `on_parent_open` method on it.\n\nThis method is analogous to *decoding* followed by *execution*.\nThe form is free to choose how it wants to make sense of itself,\ngiven an engine. Some forms (e.g. words) end up scheduling\nnew continuation blocks `on_parent_open`, making the engine\ngo through them first.\n\nAfter the cursor of the active block hits the end, `Engine`\ndrops (see `Block#drop`) the continuation block (thereby\n*closing* the code block).\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\nstack = Block.new\n\nengine = Engine.new(caps)\nengine.schedule(block, stack)\nengine.exhaust\n\nputs stack # [ 3 ]\n\n# Or, shorter:\n\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\n\nputs Engine.exhaust(caps, block) # [ 3 ]\n```","summary":"An engine object is responsible for managing a continuations block.
","class_methods":[{"html_id":"cont(*,block,stack)-class-method","name":"cont","doc":"Creates and returns a canonical continuation block.\n\nA continuation block must include two blocks: the first is\ncalled simply the *block* (found at `C_BLOCK_AT`), and the\nsecond is called the *stack* block (found at `C_STACK_AT`).","summary":"Creates and returns a canonical continuation block.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"args_string":"(*, block, stack)","args_html":"(*, block, stack)","location":{"filename":"src/novika/engine.cr","line_number":170,"url":null},"def":{"name":"cont","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"splat_index":0,"visibility":"Public","body":"Block.with([block, stack] of Form, leaf: false)"}},{"html_id":"current-class-method","name":"current","doc":"Returns the current engine. Raises a BUG exception if\nthere is no current engine.","summary":"Returns the current engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":109,"url":null},"def":{"name":"current","visibility":"Public","body":"@@stack.last? || (raise(\"BUG: there is no current engine\"))"}},{"html_id":"exhaust(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"exhaust!(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust!","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule!`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust!","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule!(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"pop(engine:Engine):Engine|Nil-class-method","name":"pop","doc":"Pops *engine* from the engine stack. Raises a BUG exception\n(and does not pop!) if the current engine is not *engine*\n(or if it is absent).","summary":"Pops engine from the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine | Nil","args_html":"(engine : Engine) : Engine | Nil","location":{"filename":"src/novika/engine.cr","line_number":135,"url":null},"def":{"name":"pop","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine | ::Nil","visibility":"Public","body":"if current.same?(engine)\nelse\n raise(\"BUG: lost track of the engine stack: unexpected engine on top!\")\nend\n@@stack.pop\n"}},{"html_id":"push(caps:CapabilityCollection)-class-method","name":"push","doc":"Pushes a new engine with the given capability collection *caps*.\n\nMake sure that you `pop` it yourself or that you know what\nyou're doing!","summary":"Pushes a new engine with the given capability collection caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/engine.cr","line_number":128,"url":null},"def":{"name":"push","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"push(new(caps))"}},{"html_id":"trackers-class-method","name":"trackers","doc":"Holds an array of exhaust tracker objects associated with\nall instances of `Engine`. These objects intercept forms\nbefore/after opening in `Engine#exhaust`. This e.g. allows\nfrontends to analyze/track forms and/or matching blocks.","summary":"Holds an array of exhaust tracker objects associated with all instances of Engine
.
Yields an instance of Engine
.
Pushes engine onto the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine","args_html":"(engine : Engine) : Engine","location":{"filename":"src/novika/engine.cr","line_number":114,"url":null},"def":{"name":"push","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine","visibility":"Public","body":"if @@stack.size.in?(0..MAX_ENGINES)\nelse\n raise(Error.new(\"bad engine stack depth: deep recursion in a __metaword__?\"))\nend\n@@stack << engine\nengine\n"}}],"instance_methods":[{"html_id":"block-instance-method","name":"block","doc":"Returns the block of the active continuation.","summary":"Returns the block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":204,"url":null},"def":{"name":"block","visibility":"Public","body":"(cont.at(C_BLOCK_AT)).a(Block)"}},{"html_id":"capabilities:CapabilityCollection-instance-method","name":"capabilities","doc":"Returns the capability collection used by this engine.","summary":"Returns the capability collection used by this engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":144,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"cont-instance-method","name":"cont","doc":"Returns the active continuation.","summary":"Returns the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":199,"url":null},"def":{"name":"cont","visibility":"Public","body":"conts.top.a(Block)"}},{"html_id":"conts:Novika::Block-instance-method","name":"conts","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Novika::Block)-instance-method","name":"conts=","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"args_string":"(conts : Novika::Block)","args_html":"(conts : Novika::Block)","location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"die(*args,**options)-instance-method","name":"die","doc":"See `Form#die`.","summary":"See Form#die
.
See Form#die
.
Returns the relevant death handler, or nil.
","abstract":false,"args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"args_string":"(avoid_prototype = nil)","args_html":"(avoid_prototype = nil)","location":{"filename":"src/novika/engine.cr","line_number":279,"url":null},"def":{"name":"drop_until_death_handler?","args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"visibility":"Public","body":"while !conts.tape.empty?\n entry = block.entry_for?(Hook.died)\n conts.drop\n if entry\n else\n next\n end\n handler = entry_to_death_handler_block(entry)\n if avoid_prototype && (handler.prototype.same?(avoid_prototype))\n else\n return handler\n end\nend"}},{"html_id":"each_active_block(&)-instance-method","name":"each_active_block","doc":"Yields active blocks, starting from the oldest active block\nup to the current active block.","summary":"Yields active blocks, starting from the oldest active block up to the current active block.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":215,"url":null},"def":{"name":"each_active_block","yields":1,"block_arity":1,"visibility":"Public","body":"conts.each do |cont|\n yield ((cont.a(Block)).at(C_BLOCK_AT)).a(Block)\nend"}},{"html_id":"execute(form:Form)-instance-method","name":"execute","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form)","args_html":"(form : Form)","location":{"filename":"src/novika/engine.cr","line_number":293,"url":null},"def":{"name":"execute","args":[{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"begin\n form.on_parent_open(self)\nrescue error : Error\n error.conts || (error.conts = conts.instance)\n if handler = drop_until_death_handler?(avoid_prototype: block.prototype)\n else\n raise(error)\n end\n schedule(handler, stack: conts.count.zero? ? Block.with(error) : stack.add(error))\nend"}},{"html_id":"exhaust-instance-method","name":"exhaust","doc":"Exhausts all scheduled continuations, starting from the\ntopmost (see `Block#top`) continuation in `conts`.","summary":"Exhausts all scheduled continuations, starting from the topmost (see Block#top
) continuation in #conts
.
See Schedulable#schedule
.
Main authorized point for adding continuations unsafely.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block)","args_html":"(other : Block)","location":{"filename":"src/novika/engine.cr","line_number":232,"url":null},"def":{"name":"schedule!","args":[{"name":"other","external_name":"other","restriction":"Block"}],"visibility":"Public","body":"if conts.count > MAX_CONTS\n die(\"recursion or block open is too deep (> #{MAX_CONTS})\")\nend\ntap do\n conts.add(other)\nend\n"}},{"html_id":"schedule!(*,block:Block,stack:Block)-instance-method","name":"schedule!","doc":"Schedules a continuation with the given *block* and *stack*.","summary":"Schedules a continuation with the given block and stack.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(*, block : Block, stack : Block)","args_html":"(*, block : Block, stack : Block)","location":{"filename":"src/novika/engine.cr","line_number":241,"url":null},"def":{"name":"schedule!","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"splat_index":0,"visibility":"Public","body":"schedule!(Engine.cont(block: block, stack: stack))"}},{"html_id":"stack-instance-method","name":"stack","doc":"Returns the stack block of the active continuation.","summary":"Returns the stack block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":209,"url":null},"def":{"name":"stack","visibility":"Public","body":"(cont.at(C_STACK_AT)).a(Block)"}}]},{"html_id":"novika/Novika/Entry","path":"Novika/Entry.html","kind":"class","full_name":"Novika::Entry","name":"Entry","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":172,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a dictionary entry. Dictionary entries hold the\nvalue form.","summary":"Represents a dictionary entry.
","constructors":[{"html_id":"new(form:Form,opener:Bool=false)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"args_string":"(form : Form, opener : Bool = false)","args_html":"(form : Form, opener : Bool = false)","location":{"filename":"src/novika/dict.cr","line_number":178,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(form, opener)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
See Object#hash(hasher)
Safe #schedule
.
Unsafe #schedule
.
How many trace entries to display at max.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds and accepts information about an error.\n\nErrors are raised when a certain case is undesired, unhandleable,\nor otherwise inappropriate to some form of computation.\n\nErrors can be *handled* and *unhandled*. *Unhandled* errors\ngenerate an error `report` (generally to STDERR, but this\ndepends on the frontend). They are fatal for the program\nthey occur in.\n\n*Death handlers*, or *death traps*, when set up in code blocks\nand/or their relatives, allow errors to be *handled*. For this\nreason, errors are Novika `Form`s, and can be manipulated,\nreported, and inspected from Novika.","summary":"Holds and accepts information about an error.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"error\""}}],"constructors":[{"html_id":"new(details:String,form:Novika::Form|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"args_string":"(details : String, form : Novika::Form | Nil = nil)","args_html":"(details : String, form : Novika::Form | Nil = nil)","location":{"filename":"src/novika/error.cr","line_number":32,"url":null},"def":{"name":"new","args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(details, form)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"conts:Block|Nil-instance-method","name":"conts","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts","return_type":"Block | ::Nil","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Block|Nil)-instance-method","name":"conts=","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"args_string":"(conts : Block | Nil)","args_html":"(conts : Block | Nil)","location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":35,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"error: '\") << details) << \"'\""}},{"html_id":"details:String-instance-method","name":"details","doc":"Returns a string describing the reasons of this error.","summary":"Returns a string describing the reasons of this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":23,"url":null},"def":{"name":"details","return_type":"String","visibility":"Public","body":"@details"}},{"html_id":"form:Form-instance-method","name":"form","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form","return_type":"Form","visibility":"Public","body":"if (value = @form).nil?\n ::raise(NilAssertionError.new(\"Novika::Error#form cannot be nil\"))\nelse\n value\nend"}},{"html_id":"form?:Form|Nil-instance-method","name":"form?","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form?","return_type":"Form | ::Nil","visibility":"Public","body":"@form"}},{"html_id":"report(io:IO)-instance-method","name":"report","doc":"Reports about this error to *io*.\n\nNote: Colorize is used for colors and emphasis. If you\ndo not want Colorize in *io*, you can temporarily disable\nit by setting `Colorize.enabled = false`.","summary":"Reports about this error to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":48,"url":null},"def":{"name":"report","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"if conts = self.conts\n b = Math.max(0, conts.count - MAX_TRACE)\n e = conts.count\n if b.zero?\n else\n ((io << \" │ … \") << (b - 1)) << \" continuation(s) omitted …\"\n io.puts\n end\n (b...e).each do |index|\n io << \" ╿ due to \"\n cont = (conts.at(index)).as?(Block)\n code = cont.try do |__arg0|\n (__arg0.at?(Engine::C_BLOCK_AT)).as?(Block)\n end\n if cont && code\n else\n io.puts(\"[malformed continuation]\")\n next\n end\n if top = code.top?\n ((io << \"'\") << (top || \"[nothing]\").colorize.bold) << \"', which was opened here:\"\n else\n io << \"the following block:\"\n end\n io.puts\n io << \" │ \"\n code.spot(io)\n io.puts\n end\nend\nif form?\n io.puts(\" ╿ this form is invalid, and is the cause of death:\")\n (io << \" │ \") << form\n io.puts\nend\n(io << \"Sorry: \".colorize.red.bold) << details\ncase details.byte_at?(details.bytesize - 1)\nwhen '!', '?', '.'\nelse\n io << '.'\nend\nio.puts\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/error.cr","line_number":96,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << details) << \"]\""}}]},{"html_id":"novika/Novika/False","path":"Novika/False.html","kind":"struct","full_name":"Novika::False","name":"False","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":63,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a falsey `Boolean`. `False` is the only falsey\nform in Novika.","summary":"Represents a falsey Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":64,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean false\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/boolean.cr","line_number":72,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"b"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/boolean.cr","line_number":76,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"false\""}}]},{"html_id":"novika/Novika/FFI","path":"Novika/FFI.html","kind":"module","full_name":"Novika::FFI","name":"FFI","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/FFI/Cchar","path":"Novika/FFI/Cchar.html","kind":"struct","full_name":"Novika::FFI::Cchar","name":"Cchar","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":368,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C char (a u8).\nIn Novika, char is represented by a single-character quote.","summary":"Type-side and value-side representation of C char (a u8).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":396,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":384,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"form.first_byte?.try do |byte|\n new(byte)\nend"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":388,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form.to_u8)"}},{"html_id":"matches?(value:Cchar)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"args_string":"(value : Cchar)","args_html":"(value : Cchar)","location":{"filename":"src/novika/ffi.cr","line_number":417,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":421,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.uint8"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":400,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"char\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":413,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"new((box.as(::Pointer(UInt8))).value)"}}],"constructors":[{"html_id":"new(char:UInt8)-class-method","name":"new","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"args_string":"(char : UInt8)","args_html":"(char : UInt8)","location":{"filename":"src/novika/ffi.cr","line_number":372,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"visibility":"Public","body":"_ = allocate\n_.initialize(char)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":404,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @char)).as(::Pointer(Void))"}},{"html_id":"to_crystal-instance-method","name":"to_crystal","doc":"Returns the corresponding Crystal character.","summary":"Returns the corresponding Crystal character.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":376,"url":null},"def":{"name":"to_crystal","visibility":"Public","body":"@char.chr"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":380,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":392,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"'\") << to_crystal) << \"'\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":408,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @char\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Cstr","path":"Novika/FFI/Cstr.html","kind":"struct","full_name":"Novika::FFI::Cstr","name":"Cstr","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":428,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C string (a u8 pointer).\nIn Novika, C string is represented by a quote.","summary":"Type-side and value-side representation of C string (a u8 pointer).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":456,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":460,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"new(form.string)"}},{"html_id":"matches?(value:Cstr)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"args_string":"(value : Cstr)","args_html":"(value : Cstr)","location":{"filename":"src/novika/ffi.cr","line_number":486,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":490,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":464,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"cstr\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":481,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"handle = Pointer(UInt8).new((box.as(::Pointer(UInt64))).value)\nhandle.null? ? UntypedPointer.none : new(String.new(handle))\n"}}],"constructors":[{"html_id":"new(string:String)-class-method","name":"new","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/novika/ffi.cr","line_number":432,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @string == (other.@string)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":468,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"write_to!((Pointer(UInt64).malloc(1)).as(::Pointer(Void)))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the corresponding Crystal string.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":436,"url":null},"def":{"name":"to_crystal","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":440,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":452,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"\\\"\") << to_crystal) << \"\\\"\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":472,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"bytes = Pointer(UInt8).malloc(@string.bytesize + 1)\nbytes.copy_from(@string.to_unsafe, @string.bytesize)\nbytes[@string.bytesize + 1] = 0\n(base.as(::Pointer(UInt64))).value = bytes.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/DefaultTypeParser","path":"Novika/FFI/DefaultTypeParser.html","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows all parse-able types, from ints to `nothing` to\nstructs and unions.","summary":"Allows all parse-able types, from ints to nothing
to structs and unions.
Type-side and value-side representation of Float32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/F64","path":"Novika/FFI/F64.html","kind":"struct","full_name":"Novika::FFI::F64","name":"F64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":239,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Float64`.","summary":"Type-side and value-side representation of Float64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/FixedArityFunction","path":"Novika/FFI/FixedArityFunction.html","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},"ancestors":[{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1035,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Calls a fixed-arity C function.","summary":"Calls a fixed-arity C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),argtypes:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1038,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, argtypes, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1056,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"args = Array(ForeignValue).new(@argtypes.size)\n@argtypes.reverse_each do |argtype|\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n args.unshift(arg)\nend\n(call(args)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1036,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]},{"html_id":"novika/Novika/FFI/ForeignType","path":"Novika/FFI/ForeignType.html","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":28,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for Novika FFI types.","summary":"Base type for Novika FFI types.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":30,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"from(form:Form):ForeignValue-instance-method","name":"from","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nDies if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue","args_html":"(form : Form) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":48,"url":null},"def":{"name":"from","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue","visibility":"Public","body":"(from?(form)) || (raise(Error.new(\"could not convert #{form} to foreign type #{self}\")))"}},{"html_id":"from?(form:Form):ForeignValue|Nil-instance-method","name":"from?","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nReturns nil if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue | Nil","args_html":"(form : Form) : ForeignValue | Nil","location":{"filename":"src/novika/ffi.cr","line_number":56,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue | ::Nil","visibility":"Public","body":""}},{"html_id":"matches?(value:ForeignValue):Bool-instance-method","name":"matches?","doc":"Returns whether this type corresponds to the given *value*.","summary":"Returns whether this type corresponds to the given value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(value : ForeignValue) : Bool","args_html":"(value : ForeignValue) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":60,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":40,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"(to_ffi_type.@type).value.size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":37,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Base type for Novika FFI values (both heap & stack allocated).
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":7,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"must_be_of(type:ForeignType)-instance-method","name":"must_be_of","doc":"Raises if this value is not of the given `ForeignType` *type*.","summary":"Raises if this value is not of the given ForeignType
type.
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":17,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":true,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":11,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/Function","path":"Novika/FFI/Function.html","kind":"struct","full_name":"Novika::FFI::Function","name":"Function","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1024,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/FixedArityFunction","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction"},{"html_id":"novika/Novika/FFI/VariadicFunction","kind":"struct","full_name":"Novika::FFI::VariadicFunction","name":"VariadicFunction"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for C function call interfaces.","summary":"Base type for C function call interfaces.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":true,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1031,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":1026,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/I16","path":"Novika/FFI/I16.html","kind":"struct","full_name":"Novika::FFI::I16","name":"I16","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":234,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int16`.","summary":"Type-side and value-side representation of Int16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I32","path":"Novika/FFI/I32.html","kind":"struct","full_name":"Novika::FFI::I32","name":"I32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int32`.","summary":"Type-side and value-side representation of Int32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I64","path":"Novika/FFI/I64.html","kind":"struct","full_name":"Novika::FFI::I64","name":"I64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int64`.","summary":"Type-side and value-side representation of Int64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I8","path":"Novika/FFI/I8.html","kind":"struct","full_name":"Novika::FFI::I8","name":"I8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":233,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int8`.","summary":"Type-side and value-side representation of Int8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/InlineStructType","path":"Novika/FFI/InlineStructType.html","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":785,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of an inline struct, e.g. one returned\nfrom a function or passed as an argument, aka stack-allocated\nstructs (like Crystal `struct`).","summary":"Type-side representation of an inline struct, e.g.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":790,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:InlineStructView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"args_string":"(view : InlineStructView) : Bool","args_html":"(view : InlineStructView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":806,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":786,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"padded_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":802,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.struct(@layout.map_desc_with_index do |__arg2|\n __arg2.type.to_ffi_type\nend)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":810,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":794,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"InlineStructView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/InlineStructView","path":"Novika/FFI/InlineStructView.html","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of an inline struct, aka\nstack-allocated struct. Allows to read and write fields (see\n`StructView`). Similar to the `.` operator in C.","summary":"Value-side representation of an inline struct, aka stack-allocated struct.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":974,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":984,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~⟨\"\nsuper(io)\nio << \"⟩\"\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":978,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.padded_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Nothing","path":"Novika/FFI/Nothing.html","kind":"struct","full_name":"Novika::FFI::Nothing","name":"Nothing","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":330,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of void. All value-side\nmethods raise.","summary":"Type-side and value-side representation of void.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":345,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be allocated\")"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":361,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.void"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":353,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"void\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":357,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"Nothing.new"}}],"constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":334,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be boxed\")"}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":342,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":349,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"(void)\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":338,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be written\")"}}]},{"html_id":"novika/Novika/FFI/StructFieldDesc","path":"Novika/FFI/StructFieldDesc.html","kind":"struct","full_name":"Novika::FFI::StructFieldDesc","name":"StructFieldDesc","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":500,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Holds the description of a struct field: its id (purely for\nconvenience), type (one of `ForeignType`s), and, most\nimportantly, *offset*.","summary":"Holds the description of a struct field: its id (purely for convenience), type (one of ForeignType
s), and, most importantly, offset.
offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : ForeignValue","args_html":"(base : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":507,"url":null},"def":{"name":"fetch!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"type.unbox(Pointer(Void).new(base.address + offset))"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"offset:UInt64-instance-method","name":"offset","abstract":false,"def":{"name":"offset","return_type":"UInt64","visibility":"Public","body":"@offset"}},{"html_id":"put!(base:Pointer(Void),value:ForeignValue)-instance-method","name":"put!","doc":"Writes *value* at *base* plus this field's offset, assuming\n*base* points to the start of the struct this field is a\nmember of.\n\nThe latter is not enforced; therefore, this method is considered\n**unsafe**.","summary":"Writes value at base plus this field's offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(base : Pointer(Void), value : ForeignValue)","args_html":"(base : Pointer(Void), value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":517,"url":null},"def":{"name":"put!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"value.must_be_of(type)\nvalue.write_to!(Pointer(Void).new(base.address + offset))\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":522,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"(\") << type) << \" \") << id) << \")\""}},{"html_id":"type:ForeignType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"ForeignType","visibility":"Public","body":"@type"}}]},{"html_id":"novika/Novika/FFI/StructLayout","path":"Novika/FFI/StructLayout.html","kind":"class","full_name":"Novika::FFI::StructLayout","name":"StructLayout","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":551,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows to describe structs which can then be constructed,\nretrieved, read, and written to.\n\n```\npoint_s = StructLayout.new(\"Point\")\npoint_s.add(\"x\", F64)\npoint_s.add(\"y\", F64)\n\nrect_s = StructLayout.new(\"Rect\")\nrect_s.add(\"origin\", point_s.reference)\nrect_s.add(\"corner\", point_s.inline)\n\norigin = point_s.reference.make!\norigin[\"x\"] = F64.new(123)\norigin[\"y\"] = F64.new(456)\n\ncorner = point_s.inline.make!\ncorner[\"x\"] = F64.new(234)\ncorner[\"y\"] = F64.new(567)\n\nrect = rect_s.reference.make!\nrect[\"origin\"] = origin\nrect[\"corner\"] = corner\n```","summary":"Allows to describe structs which can then be constructed, retrieved, read, and written to.
","constructors":[{"html_id":"new-class-method","name":"new","doc":"Creates an empty struct layout.","summary":"Creates an empty struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":563,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif object_id == other.object_id\nelse\n return false\nend\ntrue\n"}},{"html_id":"add(id,type:ForeignType)-instance-method","name":"add","doc":"Appends a field called *id*, of the given *type*, to this\nstruct's list of fields.\n\nSimilar to struct ids, *id* is irrelevant to FFI and is simply\n*one of* the ways to access struct fields.","summary":"Appends a field called id, of the given type, to this struct's list of fields.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(id, type : ForeignType)","args_html":"(id, type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":605,"url":null},"def":{"name":"add","args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"visibility":"Public","body":"if type.is_a?(InlineStructType)\n offset = add(type.padded_size, type.alignment)\nelse\n offset = add(type.to_ffi_type)\nend\n@fields << (StructFieldDesc.new(id, type, offset))\n"}},{"html_id":"alignment:UInt64-instance-method","name":"alignment","doc":"Returns the alignment of this struct layout.","summary":"Returns the alignment of this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":557,"url":null},"def":{"name":"alignment","return_type":"UInt64","visibility":"Public","body":"@alignment"}},{"html_id":"desc(index:Int32)-instance-method","name":"desc","doc":"Retrieves field description given the field's *index*.","summary":"Retrieves field description given the field's index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/ffi.cr","line_number":642,"url":null},"def":{"name":"desc","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"@fields[index]"}},{"html_id":"desc(id:String)-instance-method","name":"desc","doc":"Retrieves field description given the field's *id*entifier.\nRaises if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":654,"url":null},"def":{"name":"desc","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(desc?(id)) || (raise(\"BUG: no such field: #{id}\"))"}},{"html_id":"desc?(id:String)-instance-method","name":"desc?","doc":"Retrieves field description given the field's *id*entifier.\nReturns nil if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":648,"url":null},"def":{"name":"desc?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)).try do |index|\n @fields.unsafe_fetch(index)\nend"}},{"html_id":"each_desc_with_index(&)-instance-method","name":"each_desc_with_index","doc":"Yields field descriptions and their indices to the block.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":659,"url":null},"def":{"name":"each_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.each_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"field_count-instance-method","name":"field_count","doc":"Returns the amount of fields in this struct layout.","summary":"Returns the amount of fields in this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":619,"url":null},"def":{"name":"field_count","visibility":"Public","body":"@fields.size"}},{"html_id":"has_field?(id:String)-instance-method","name":"has_field?","doc":"Returns whether this layout contains a field with the\ngiven *id*entifier.","summary":"Returns whether this layout contains a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":625,"url":null},"def":{"name":"has_field?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.any? do |__arg0|\n __arg0.id == id\nend"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = object_id.hash(hasher)\nhasher\n"}},{"html_id":"index(id:String)-instance-method","name":"index","doc":"Returns the index of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the index of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":637,"url":null},"def":{"name":"index","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)) || (raise(\"BUG: no such field in struct layout: #{id}\"))"}},{"html_id":"index?(id:String)-instance-method","name":"index?","doc":"Returns the index of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the index of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":631,"url":null},"def":{"name":"index?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.index() do |__arg1|\n __arg1.id == id\nend"}},{"html_id":"inline-instance-method","name":"inline","doc":"Returns an inline struct type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.inline`\ninstead of saving it in a variable and using that variable.","summary":"Returns an inline struct type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":683,"url":null},"def":{"name":"inline","visibility":"Public","body":"InlineStructType.new(self)"}},{"html_id":"map_desc_with_index(&)-instance-method","name":"map_desc_with_index","doc":"Yields field descriptions and their indices to the block.\nReturns an array of block results.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":665,"url":null},"def":{"name":"map_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.map_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"max_field_size:UInt64-instance-method","name":"max_field_size","doc":"Returns the maximum field size in this struct.","summary":"Returns the maximum field size in this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":560,"url":null},"def":{"name":"max_field_size","return_type":"UInt64","visibility":"Public","body":"@max_field_size"}},{"html_id":"padded_size:UInt64-instance-method","name":"padded_size","doc":"Returns the padded size of this struct. Simply put, this is how\nmuch bytes you'd need to allocate for this struct layout.","summary":"Returns the padded size of this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":554,"url":null},"def":{"name":"padded_size","return_type":"UInt64","visibility":"Public","body":"@padded_size"}},{"html_id":"reference-instance-method","name":"reference","doc":"Returns a struct reference type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.reference`\ninstead of saving it in a variable and using that variable.","summary":"Returns a struct reference type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":674,"url":null},"def":{"name":"reference","visibility":"Public","body":"StructReferenceType.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":696,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive(:to_s) do\n io << \"⟪\"\n @fields.join(io, \", \") do |field, io|\n ((io << field.id) << \"=\") << field.type\n end\n io << \"⟫\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"union-instance-method","name":"union","doc":"Returns a union type layed out according to this struct layout.\nYou can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.union`\ninstead of saving it in a variable and using that variable.","summary":"Returns a union type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":692,"url":null},"def":{"name":"union","visibility":"Public","body":"UnionType.new(self)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceType","path":"Novika/FFI/StructReferenceType.html","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":750,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct (like Crystal `class`).","summary":"Type-side representation of a struct reference, aka struct pointer, aka heap-allocated struct (like Crystal class
).
Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":751,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"matches?(pointer:UntypedPointer)-instance-method","name":"matches?","abstract":false,"args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"args_string":"(pointer : UntypedPointer)","args_html":"(pointer : UntypedPointer)","location":{"filename":"src/novika/ffi.cr","line_number":772,"url":null},"def":{"name":"matches?","args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"visibility":"Public","body":"pointer.none?"}},{"html_id":"matches?(view:StructReferenceView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"args_string":"(view : StructReferenceView) : Bool","args_html":"(view : StructReferenceView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":768,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":764,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":776,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"&\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":755,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"StructReferenceView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceView","path":"Novika/FFI/StructReferenceView.html","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":922,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct. Allows to read and write\nfields (see `StructView`). Similar to the `->` operator in C.","summary":"Value-side representation of a struct reference, aka struct pointer, aka heap-allocated struct.
","instance_methods":[{"html_id":"==(other:StructReferenceView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"args_string":"(other : StructReferenceView)","args_html":"(other : StructReferenceView)","location":{"filename":"src/novika/ffi.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"visibility":"Public","body":"if @handle == (other.@handle)\n return true\nend\nif size == other.size\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive_by_handle(:==) do\n result = super(other)\nend\nexecuted && result\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":923,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @handle.address)).as(::Pointer(Void))"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":958,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive_by_handle(:to_s) do\n io << \"&⟨\"\n super(io)\n io << \"⟩\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":927,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @handle.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/StructType","path":"Novika/FFI/StructType.html","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":714,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructType","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType"},{"html_id":"novika/Novika/FFI/StructReferenceType","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType"},{"html_id":"novika/Novika/FFI/UnionType","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *type* side of structs.","summary":"Base type of the type side of structs.
","constructors":[{"html_id":"new(layout:StructLayout)-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"args_string":"(layout : StructLayout)","args_html":"(layout : StructLayout)","location":{"filename":"src/novika/ffi.cr","line_number":717,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alignment(*args,**options)-instance-method","name":"alignment","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
Constructs a struct view for this struct type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":739,"url":null},"def":{"name":"make!","return_type":"StructView","visibility":"Public","body":"view_for(Pointer(Void).malloc(@layout.padded_size))"}},{"html_id":"padded_size(*args,**options)-instance-method","name":"padded_size","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See StructLayout
.
See StructLayout
.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":true,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":725,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/StructView","path":"Novika/FFI/StructView.html","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":853,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructView","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView"},{"html_id":"novika/Novika/FFI/StructReferenceView","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView"},{"html_id":"novika/Novika/FFI/UnionView","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *value* side of structs.\n\nImplements `Indexable` and `Indexable::Mutable` over the fields in\nthe struct, allowing you to iterate, read, and change them (with\nsome casting from and to `ForeignValue` though.)","summary":"Base type of the value side of structs.
","constructors":[{"html_id":"new(layout:Novika::FFI::StructLayout,handle:Pointer(Void))-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","args_html":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","location":{"filename":"src/novika/ffi.cr","line_number":861,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, handle)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:StructView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructView"}],"args_string":"(other : StructView)","args_html":"(other : StructView)","location":{"filename":"src/novika/ffi.cr","line_number":912,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructView"}],"visibility":"Public","body":"equals?(other) do |a, b|\n a == b\nend"}},{"html_id":"[](id:String)-instance-method","name":"[]","doc":"Returns the value of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the value of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":889,"url":null},"def":{"name":"[]","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"unsafe_fetch(@layout.index(id))"}},{"html_id":"[]=(id:String,value:ForeignValue)-instance-method","name":"[]=","doc":"Assigns *value* to a field with the given *id*entifier.","summary":"Assigns value to a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(id : String, value : ForeignValue)","args_html":"(id : String, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":883,"url":null},"def":{"name":"[]=","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"unsafe_put(@layout.index(id), value)"}},{"html_id":"[]?(id:String)-instance-method","name":"[]?","doc":"Returns the value of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the value of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":895,"url":null},"def":{"name":"[]?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"if index = @layout.index?(id)\n unsafe_fetch(index)\nend"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"has_field?(*args,**options)-instance-method","name":"has_field?","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See Object#hash(hasher)
Returns this view's struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":859,"url":null},"def":{"name":"layout","return_type":"StructLayout","visibility":"Public","body":"@layout"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":870,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":901,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"StructViewForm.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":905,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@layout.each_desc_with_index do |desc, index|\n ((io << desc.id) << \"=\") << (unsafe_fetch(index))\n if index == (@layout.field_count - 1)\n else\n io << \", \"\n end\nend"}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":878,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"(@layout.desc(index)).fetch!(@handle)"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":874,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"(@layout.desc(index)).put!(@handle, value)"}}]},{"html_id":"novika/Novika/FFI/TypeParser","path":"Novika/FFI/TypeParser.html","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":67,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/DefaultTypeParser","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser"},{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"An object used to translate `Word`s (representing a foreign type)\ninto actual `ForeignType`s.","summary":"An object used to translate Word
s (representing a foreign type) into actual ForeignType
s.
Initializes a parser object from this, a block that will be asked for word definitions in case they are needed, and typename, which is the word-to-be-parsed itself.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"args_string":"(this : Block, typename : Word)","args_html":"(this : Block, typename : Word)","location":{"filename":"src/novika/ffi.cr","line_number":78,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":92,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.inline"}},{"html_id":"on_primitive(type:ForeignType):ForeignType-instance-method","name":"on_primitive","doc":"Primitive *type* middleware.","summary":"Primitive type middleware.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(type : ForeignType) : ForeignType","args_html":"(type : ForeignType) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":82,"url":null},"def":{"name":"on_primitive","args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"return_type":"ForeignType","visibility":"Public","body":"type"}},{"html_id":"on_struct_reference(form:StructLayoutForm):ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":97,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.reference"}},{"html_id":"on_union(form:StructLayoutForm):ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":87,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.union"}},{"html_id":"parse:ForeignType-instance-method","name":"parse","doc":"Performs the parsing. Returns the resulting type.","summary":"Performs the parsing.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":102,"url":null},"def":{"name":"parse","return_type":"ForeignType","visibility":"Public","body":"case @typename.id\nwhen \"u8\"\n return on_primitive(U8)\nwhen \"u16\"\n return on_primitive(U16)\nwhen \"u32\"\n return on_primitive(U32)\nwhen \"u64\"\n return on_primitive(U64)\nwhen \"i8\"\n return on_primitive(I8)\nwhen \"i16\"\n return on_primitive(I16)\nwhen \"i32\"\n return on_primitive(I32)\nwhen \"i64\"\n return on_primitive(I64)\nwhen \"f32\"\n return on_primitive(F32)\nwhen \"f64\"\n return on_primitive(F64)\nwhen \"cstr\"\n return on_primitive(Cstr)\nwhen \"char\"\n return on_primitive(Cchar)\nwhen \"pointer\"\n return on_primitive(UntypedPointer)\nwhen \"nothing\"\n return on_primitive(Nothing)\nwhen .prefixed_by?('?')\n handler = ->on_union(StructLayoutForm)\nwhen .prefixed_by?('~')\n handler = ->on_inline_struct(StructLayoutForm)\nwhen .prefixed_by?('&')\n handler = ->on_struct_reference(StructLayoutForm)\nelse\n @typename.die(\"could not recognize foreign type. Did you mean ⸢~#{@typename}⸥ (inline struct), ⸢{@typename}⸥ (reference to struct), or ⸢?#{@typename}⸥ (union)?\")\nend\nraw = Word.new(@typename.id.lchop)\nform = @this.form_for(raw)\nif form.is_a?(StructLayoutForm)\nelse\n @typename.die(\"expected struct layout to be value form, not: #{form.class.typedesc}\")\nend\nhandler.call(form)\n"}}],"types":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","path":"Novika/FFI/TypeParser/ForbidsNothing.html","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"doc":"If included, the parser would die upon encountering `nothing`.","summary":"If included, the parser would die upon encountering nothing
.
Type-side and value-side representation of UInt16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U32","path":"Novika/FFI/U32.html","kind":"struct","full_name":"Novika::FFI::U32","name":"U32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":230,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt32`.","summary":"Type-side and value-side representation of UInt32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U64","path":"Novika/FFI/U64.html","kind":"struct","full_name":"Novika::FFI::U64","name":"U64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":231,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt64`.","summary":"Type-side and value-side representation of UInt64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U8","path":"Novika/FFI/U8.html","kind":"struct","full_name":"Novika::FFI::U8","name":"U8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":228,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt8`.","summary":"Type-side and value-side representation of UInt8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UnionType","path":"Novika/FFI/UnionType.html","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a union.","summary":"Type-side representation of a union.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":822,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:UnionView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"args_string":"(view : UnionView) : Bool","args_html":"(view : UnionView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":838,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":818,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"@layout.max_field_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":834,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":842,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"⋃\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":826,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"UnionView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/UnionView","path":"Novika/FFI/UnionView.html","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":992,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a union.","summary":"Value-side representation of a union.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1008,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":993,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":1018,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"(⋃ \") << @layout) << \")\""}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":1003,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"desc = @layout.desc(index)\ndesc.type.unbox(@handle)\n"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":997,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"desc = @layout.desc(index)\nvalue.must_be_of(desc.type)\nvalue.write_to!(@handle)\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":1012,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.max_field_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UntypedPointer","path":"Novika/FFI/UntypedPointer.html","kind":"struct","full_name":"Novika::FFI::UntypedPointer","name":"UntypedPointer","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":242,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of pointers.","summary":"Type-side and value-side representation of pointers.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":264,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Hole)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Hole"}],"args_string":"(form : Hole)","args_html":"(form : Hole)","location":{"filename":"src/novika/ffi.cr","line_number":268,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Hole"}],"visibility":"Public","body":"new(form.address)"}},{"html_id":"from?(form:StructViewForm)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"args_string":"(form : StructViewForm)","args_html":"(form : StructViewForm)","location":{"filename":"src/novika/ffi.cr","line_number":272,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"visibility":"Public","body":"if view = form.view.as?(StructReferenceView)\nelse\n raise(Error.new(\"cannot implicitly take pointer of struct view that is not a reference struct view\"))\nend\nnew(view.address)\n"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":282,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form)"}},{"html_id":"matches?(value:UntypedPointer):Bool-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"args_string":"(value : UntypedPointer) : Bool","args_html":"(value : UntypedPointer) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":317,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"none-class-method","name":"none","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":252,"url":null},"def":{"name":"none","visibility":"Public","body":"new(0)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":321,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":305,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"pointer\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":309,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"if box.null?\n raise(Error.new(\"attempt to unbox none (C nullptr)\"))\nend\nUntypedPointer.new((box.as(::Pointer(UInt64))).value)\n"}}],"constructors":[{"html_id":"new(decimal)-class-method","name":"new","abstract":false,"args":[{"name":"decimal","external_name":"decimal","restriction":""}],"args_string":"(decimal)","args_html":"(decimal)","location":{"filename":"src/novika/ffi.cr","line_number":248,"url":null},"def":{"name":"new","args":[{"name":"decimal","external_name":"decimal","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(decimal)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @address == (other.@address)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":286,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @address)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":260,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(@address)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":295,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if none?\n io << \"(none)\"\nelse\n io << \"(0x\"\n @address.to_s(io, base: 16)\n io << \")\"\nend"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":290,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/ValueTypeParser","path":"Novika/FFI/ValueTypeParser.html","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"},{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":159,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Same as `DefaultTypeParser`, but forbids nothing.\n\n```\n# this : Block\n\nparser = ValueTypeParser.new(this, Word.new(\"i32\"))\nparser.parse # => I32\n\n# ...\n\nparser = ValueTypeParser.new(this, Word.new(\"nothing\"))\nparser.parse # Dies: nothing is not a value type.\n```","summary":"Same as DefaultTypeParser
, but forbids nothing.
Calls a variadic C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),fixed_arg_types:Array(ForeignType),var_arg_allowed:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1071,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, fixed_arg_types, var_arg_allowed, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1080,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"var_args_block = block.drop.a(Block)\nnargs_total = @fixed_arg_types.size + var_args_block.count\nffi_args = Array(ForeignValue).new(nargs_total)\nffi_types = Array(Crystal::FFI::Type).new(nargs_total)\n@fixed_arg_types.reverse_each do |argtype|\n ffi_types.unshift(argtype.to_ffi_type)\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n ffi_args.unshift(arg)\nend\nvar_args_block.each do |form|\n candidates = @var_arg_allowed.map do |type|\n {type, type.from?(form)}\n end.select do |_, value|\n value\n end\n if candidates.size == 1\n else\n form.die(\"unable to convert to foreign value: too many or no type candidates for form. Make sure you've specified the corresponding foreign type in the variadic function's list of allowed types, and no conflicts between types exist (e.g. both i32 and i64; this is currently unsupported)\")\n end\n candidate = candidates[0]\n candidate_type, candidate_value = candidate\n candidate_value = candidate_value.not_nil!\n ffi_types << candidate_type.to_ffi_type\n ffi_args << candidate_value\nend\nffi_args.each do |arg|\n case arg\n when U8, U16, I8, I16\n block.die(\"bad argtype in variadic call: promote to i32 first: #{arg}\")\n when F32\n block.die(\"bad argtype in variadic call: promote to f64 first: #{arg}\")\n end\nend\ncif = Crystal::FFI::CallInterface.variadic(return_type: @return_type.to_ffi_type, arg_types: ffi_types, fixed_args: @fixed_arg_types.size)\ncargs = Pointer(::Pointer(Void)).malloc(ffi_args.size) do |index|\n ffi_args[index].box\nend\ncreturn = Pointer(Void).malloc(@return_type.sizeof)\ncif.call(@handle, cargs, creturn)\n(@return_type.unbox(creturn)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1069,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]}]},{"html_id":"novika/Novika/ForeignFunction","path":"Novika/ForeignFunction.html","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::Function`.","summary":"A thin wrapper around FFI::Function
.
Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":12,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"stack = engine.stack\nvalue = @function.call(stack)\nvalue.try(&.onto(stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":29,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign function: \") << @function.id) << \"]\""}}]},{"html_id":"novika/Novika/Form","path":"Novika/Form.html","kind":"module","full_name":"Novika::Form","name":"Form","abstract":false,"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":98,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Builtin","kind":"struct","full_name":"Novika::Builtin","name":"Builtin"},{"html_id":"novika/Novika/Byteslice","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice"},{"html_id":"novika/Novika/Color","kind":"struct","full_name":"Novika::Color","name":"Color"},{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"},{"html_id":"novika/Novika/Error","kind":"class","full_name":"Novika::Error","name":"Error"},{"html_id":"novika/Novika/ForeignFunction","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction"},{"html_id":"novika/Novika/Hole","kind":"struct","full_name":"Novika::Hole","name":"Hole"},{"html_id":"novika/Novika/Library","kind":"class","full_name":"Novika::Library","name":"Library"},{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/QuotedWord","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord"},{"html_id":"novika/Novika/StructLayoutForm","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"},{"html_id":"novika/Novika/Word","kind":"struct","full_name":"Novika::Word","name":"Word"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Form is an umbrella for words and blocks. Since some words\n(like numbers, quotes) are just too different from words as\nwe know them, they have their own types directly subordinate\nto Form.\n\nMake sure to override `self.typedesc` to avoid weird unrelated\nCrystal errors. Crystal breaks at class-level inheritance.","summary":"Form is an umbrella for words and blocks.
","instance_methods":[{"html_id":"a(type:T.class):TforallT-instance-method","name":"a","doc":"Asserts that this form is of the given *type*. Dies if\nit's not.","summary":"Asserts that this form is of the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : T forall T","args_html":"(type : T.class) : T forall T","location":{"filename":"src/novika/forms/form.cr","line_number":146,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"self.is_a?(T) ? self : afail(T)"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/form.cr","line_number":114,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"a form\""}},{"html_id":"desc:String-instance-method","name":"desc","doc":"Returns a string description of this form.","summary":"Returns a string description of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":119,"url":null},"def":{"name":"desc","return_type":"String","visibility":"Public","body":"String.build do |io|\n desc(io)\nend"}},{"html_id":"die(details:String)-instance-method","name":"die","doc":"Raises an `Error` providing *details*.","summary":"Raises an Error
providing details.
Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/form.cr","line_number":162,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"effect-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":167,"url":null},"def":{"name":"effect","visibility":"Public","body":"String.build do |io|\n effect(io)\nend"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":130,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"on_parent_open(engine)"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":135,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"onto(engine.stack)"}},{"html_id":"onto(block:Block):self-instance-method","name":"onto","doc":"Adds this form to *block*.","summary":"Adds this form to block.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : self","args_html":"(block : Block) : self","location":{"filename":"src/novika/forms/form.cr","line_number":140,"url":null},"def":{"name":"onto","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"tap do\n block.add(self)\nend"}},{"html_id":"sel(a,b)-instance-method","name":"sel","doc":"Selects either *a* or *b*. Novika defines `False` to be the\nonly form selecting *b*. All other forms select *a*.","summary":"Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/form.cr","line_number":125,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"a"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":151,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"Quote.new(to_s)"}}]},{"html_id":"novika/Novika/Frontend","path":"Novika/Frontend.html","kind":"module","full_name":"Novika::Frontend","name":"Frontend","abstract":false,"locations":[{"filename":"src/common.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"err(message,io=STDERR)-instance-method","name":"err","doc":"Appends a \"sorry\" *message* to *io*","summary":"Appends a "sorry" message to io
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"args_string":"(message, io = STDERR)","args_html":"(message, io = STDERR)","location":{"filename":"src/common.cr","line_number":10,"url":null},"def":{"name":"err","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Sorry\".colorize.red.bold) << \": \") << message"}},{"html_id":"errln(message,io=STDERR)-instance-method","name":"errln","doc":"Calls `err`, and appends a newline, both using\nwith *io*.","summary":"Calls #err
, and appends a newline, both using with io.
Appends a "note" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":20,"url":null},"def":{"name":"note","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Note\".colorize.blue.bold) << \": \") << message"}},{"html_id":"noteln(message,io=STDOUT)-instance-method","name":"noteln","doc":"Calls `note`, and appends a newline, both using\nwith *io*.","summary":"Calls #note
, and appends a newline, both using with io.
Appends an "ok" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":15,"url":null},"def":{"name":"ok","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Ok\".colorize.green.bold) << \": \") << message"}},{"html_id":"okln(message,io=STDOUT)-instance-method","name":"okln","doc":"Calls `ok`, and appends a newline, both using\nwith *io*.","summary":"Calls #ok
, and appends a newline, both using with io.
Appends a "wait" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":5,"url":null},"def":{"name":"wait","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Wait\".colorize.bold) << \": \") << message"}},{"html_id":"wait(msg,*,okokmsg,&)-instance-method","name":"wait","doc":"Issues a `wait` message *msg*, yields, then follows with\nan OK message *okmsg*.","summary":"Issues a #wait
message msg, yields, then follows with an OK message okmsg.
Calls #wait
, and appends a newline, both using with io.
Novika command-line frontend entry point.
","abstract":false,"args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"args_string":"(args = ARGV, cwd = Path[ENV[\"NOVIKA_CWD\"]? || Dir.current])","args_html":"(args = ARGV, cwd = Path[ENV["NOVIKA_CWD"]? || Dir.current])","location":{"filename":"src/cli.cr","line_number":408,"url":null},"def":{"name":"start","args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"visibility":"Public","body":"begin\n args = args.dup\n Colorize.enabled = Novika.colorful?\n if args.any?(/^\\-{1,2}:?(?:h(?:elp)?|\\?)$/)\n help(STDOUT)\n exit(0)\n end\n profiler = nil\n dry_list = false\n dry_list_sm = false\n dry_tree = false\n help_mode = false\n abort_on_permission_request = false\n args.reject! do |arg|\n case arg\n when /^\\-:profile(?::([1-9]\\d*))?$/\n profiler = Profiler.new($~[1]?.try(&.to_u64) || 16_u64)\n when /^\\-:dry-list$/\n dry_list = true\n when /^\\-:dry-tree$/\n dry_tree = true\n when /^\\+:dry-list-sm$/\n dry_list_sm = true\n when /^\\-:abort-on-permission-request$/\n abort_on_permission_request = true\n when /^help$/\n help_mode = true\n else\n next false\n end\n true\n end\n profiler.try do |prof|\n Engine.trackers << prof\n end\n resolver = RunnableResolver.new(cwd, args)\n resolver.on_permissions_gets do |string|\n if abort_on_permission_request\n abort\n end\n print(string, \" \")\n gets\n end\n resolver.on_permissions_print do |string|\n print(string)\n end\n resolver.after_container_rewritten do |container|\n if dry_tree\n else\n next\n end\n puts(container)\n end\n resolver.after_response do |hook|\n if dry_tree\n exit(0)\n end\n hook.response.each_ignored_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.note(\"this runnable is not allowed here, and will be ignored: #{runnable}\", io)\n end\n end\n if help_mode\n else\n next\n end\n first = true\n hook.each_queried_for_preamble_with_group do |preamble, group|\n if first\n first = false\n else\n print(\"\\n\\n\")\n end\n puts(preamble)\n end\n if first\n help(STDOUT)\n end\n exit(0)\n end\n resolver.after_program do |hook|\n if dry_list\n else\n next\n end\n if dry_list_sm\n else\n puts(\"--> Showing environment designations (which environment is going to run which file).\\n--> Order matters, and is exactly the execution order.\")\n puts\n end\n hook.each_designation do |designation|\n designation.to_s(STDOUT, sm: dry_list_sm)\n puts\n end\n exit(0)\n end\n resolver.after_permissions do |hook|\n begin\n hook.run\n ensure\n profiler.try do |prof|\n puts(prof.to_table)\n end\n end\n end\n if resolver.resolve?\n else\n help(STDOUT)\n exit(0)\n end\nrescue e : Resolver::RunnableError\n e.runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n exit(1)\nrescue e : Resolver::ResponseRejectedError\n e.response.each_rejected_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n end\n exit(1)\nrescue e : Resolver::MoreThanOneAppError\n e.apps.each do |app|\n app.backtrace(STDERR, indent: 2) do |io|\n Frontend.noteln(\"could not run this app because it's not the only one\", io)\n end\n end\n Frontend.errln(e.message)\n exit(1)\nrescue e : Resolver::ResolverError\n Frontend.errln(e.message)\nrescue e : Error\n e.report(STDERR)\n exit(1)\nend"}}],"types":[{"html_id":"novika/Novika/Frontend/CLI/Profiler","path":"Novika/Frontend/CLI/Profiler.html","kind":"class","full_name":"Novika::Frontend::CLI::Profiler","name":"Profiler","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cli.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"}],"namespace":{"html_id":"novika/Novika/Frontend/CLI","kind":"module","full_name":"Novika::Frontend::CLI","name":"CLI"},"doc":"A crude sample-based profiler which is triggered on every\nform the engine tries to execute.\n\nCounts the amount of times a form was attempted to be open\nby the engine.\n\nYou can use `to_table` to convert a snapshot of data to a\n`Tablo::Table` table.","summary":"A crude sample-based profiler which is triggered on every form the engine tries to execute.
","constructors":[{"html_id":"new(period:UInt64=32_u64)-class-method","name":"new","doc":"Initializes this profiler.\n\n*period* is the period between samples, in Engine loop\nticks. The less the value, the more samples are taken\nand the more precise the results are (but the program\nmay run slower).","summary":"Initializes this profiler.
","abstract":false,"args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"args_string":"(period : UInt64 = 32_u64)","args_html":"(period : UInt64 = 32_u64)","location":{"filename":"src/cli.cr","line_number":48,"url":null},"def":{"name":"new","args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(period)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_form_begin(engine:Engine,form:Form)-instance-method","name":"on_form_begin","doc":"Invoked before *engine* opens the given *form*.","summary":"Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/cli.cr","line_number":64,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if (@ticks - @start) >= @period\nelse\n @ticks = @ticks + 1\n return\nend\nengine.each_active_block do |block|\n profile = @profiles[repr = encode(block)]\n profile.sample\n @profiles[repr] = profile\nend\n@start = @ticks\n@ticks = @ticks + 1\n"}},{"html_id":"to_table(cutoff=0.01)-instance-method","name":"to_table","doc":"Assembles and returns the data from this profiler as\na `Tablo::Table`.\n\n*cutoff* specifies the ratio [0-1] below which profiles\nshould be rejected (i.e., too insignificant).","summary":"Assembles and returns the data from this profiler as a Tablo::Table
.
Represents a profile entry.
","constructors":[{"html_id":"new(str:String)-class-method","name":"new","abstract":false,"args":[{"name":"str","external_name":"str","restriction":"String"}],"args_string":"(str : String)","args_html":"(str : String)","location":{"filename":"src/cli.cr","line_number":21,"url":null},"def":{"name":"new","args":[{"name":"str","external_name":"str","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(str)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<=>(other:Profile)-instance-method","name":"<=>","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Profile"}],"args_string":"(other : Profile)","args_html":"(other : Profile)","location":{"filename":"src/cli.cr","line_number":25,"url":null},"def":{"name":"<=>","args":[{"name":"other","external_name":"other","restriction":"Profile"}],"visibility":"Public","body":"@samples <=> (other.@samples)"}},{"html_id":"ratio(whole:Float64)-instance-method","name":"ratio","abstract":false,"args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"args_string":"(whole : Float64)","args_html":"(whole : Float64)","location":{"filename":"src/cli.cr","line_number":33,"url":null},"def":{"name":"ratio","args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"visibility":"Public","body":"@samples / whole"}},{"html_id":"sample-instance-method","name":"sample","abstract":false,"location":{"filename":"src/cli.cr","line_number":29,"url":null},"def":{"name":"sample","visibility":"Public","body":"@samples = @samples + 1"}},{"html_id":"to_row?(nperiods)-instance-method","name":"to_row?","abstract":false,"args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"args_string":"(nperiods)","args_html":"(nperiods)","location":{"filename":"src/cli.cr","line_number":37,"url":null},"def":{"name":"to_row?","args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"visibility":"Public","body":"[@str, @samples]"}}]}]}]},{"html_id":"novika/Novika/Frontend/Nkas","path":"Novika/Frontend/Nkas.html","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas","abstract":false,"locations":[{"filename":"src/nkas.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend/Nkas","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas"}],"namespace":{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"},"instance_methods":[{"html_id":"help(io)-instance-method","name":"help","doc":"Appends information about the tool to *io*.","summary":"Appends information about the tool to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/nkas.cr","line_number":8,"url":null},"def":{"name":"help","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"nkas - Novika image assembler for Novika #{Novika::VERSION}\\n\\nSyntax:\\n\\n nkas [switches] [queries]Holds all information about a block.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock]","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 2, cls: Novika::FrozenBlock, onlyif: nil, verify: nil}, {type: \"basic\", name: id, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: \"group\", name: tape, cls: Tape, onlyif: -> do\n has_tape\nend, verify: nil, value: nil}, {type: \"group\", name: dict, cls: Dict, onlyif: -> do\n has_dict\nend, verify: nil, value: nil}, {type: \"group\", name: friends, cls: Friends, onlyif: -> do\n has_friends\nend, verify: nil, value: nil}, {type: \"basic\", name: parent, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n has_parent\nend, verify: nil, value: nil}, {type: \"basic\", name: prototype, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n is_instance\nend, verify: nil, value: nil}, {type: \"string\", name: comment, cls: String, onlyif: -> do\n has_comment\nend, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(id,tape,dict,friends,parent,prototype,comment)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"args_string":"(id, tape, dict, friends, parent, prototype, comment)","args_html":"(id, tape, dict, friends, parent, prototype, comment)","location":{"filename":"src/novika/image.cr","line_number":487,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"visibility":"Public","body":"frozen = new\nfrozen.id = id\nfrozen.has_tape = !(!tape)\nif tape\n frozen.tape.cursor = tape.cursor.to_u32\n frozen.tape.substrate = [] of TypedSnapshot\n tape.each do |form|\n if ts = TypedSnapshot.new(form)\n frozen.tape.substrate << ts\n end\n end\nend\nfrozen.has_dict = !(!dict)\nif dict\n frozen.dict.entries = [] of FrozenEntry\n dict.each do |key, entry|\n frozen.dict.entries << (FrozenEntry.new(key, entry))\n end\nend\nfrozen.has_friends = !(!friends)\nif friends\n frozen.friends.refs = [] of BlockRefSnapshot\n friends.each do |friend|\n friend = friend.as(Block)\n frozen.friends.refs << (BlockRefSnapshot.new(friend.object_id))\n end\nend\nfrozen.has_parent = !(!parent)\nif parent\n frozen.parent = BlockRefSnapshot.new(parent.object_id)\nend\nfrozen.is_instance = !(!prototype)\nif prototype\n frozen.prototype = BlockRefSnapshot.new(prototype.object_id)\nend\nfrozen.has_comment = !(!comment)\nif comment\n frozen.comment = comment\nend\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":422,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"comment:String-instance-method","name":"comment","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"def":{"name":"comment","return_type":"String","visibility":"Public","body":"@comment"}},{"html_id":"comment=(comment:String)-instance-method","name":"comment=","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"}],"args_string":"(comment : String)","args_html":"(comment : String)","def":{"name":"comment=","args":[{"name":"comment","external_name":"comment","restriction":"String"}],"visibility":"Public","body":"@comment = comment"}},{"html_id":"dict:Novika::FrozenBlock::Dict-instance-method","name":"dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"dict","visibility":"Public","body":"@dict"}},{"html_id":"dict=(dict:Novika::FrozenBlock::Dict)-instance-method","name":"dict=","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"args_string":"(dict : Novika::FrozenBlock::Dict)","args_html":"(dict : Novika::FrozenBlock::Dict)","def":{"name":"dict=","args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"visibility":"Public","body":"@dict = dict"}},{"html_id":"friends:Novika::FrozenBlock::Friends-instance-method","name":"friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"friends","visibility":"Public","body":"@friends"}},{"html_id":"friends=(friends:Novika::FrozenBlock::Friends)-instance-method","name":"friends=","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"args_string":"(friends : Novika::FrozenBlock::Friends)","args_html":"(friends : Novika::FrozenBlock::Friends)","def":{"name":"friends=","args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"visibility":"Public","body":"@friends = friends"}},{"html_id":"has_comment:Bool-instance-method","name":"has_comment","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment","return_type":"Bool","visibility":"Public","body":"@has_comment == 1"}},{"html_id":"has_comment=(has_comment:UInt8)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"args_string":"(has_comment : UInt8)","args_html":"(has_comment : UInt8)","def":{"name":"has_comment=","args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"visibility":"Public","body":"@has_comment = has_comment"}},{"html_id":"has_comment=(value:Bool)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_comment = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_dict:Bool-instance-method","name":"has_dict","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict","return_type":"Bool","visibility":"Public","body":"@has_dict == 1"}},{"html_id":"has_dict=(has_dict:UInt8)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"args_string":"(has_dict : UInt8)","args_html":"(has_dict : UInt8)","def":{"name":"has_dict=","args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"visibility":"Public","body":"@has_dict = has_dict"}},{"html_id":"has_dict=(value:Bool)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_dict = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_friends:Bool-instance-method","name":"has_friends","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends","return_type":"Bool","visibility":"Public","body":"@has_friends == 1"}},{"html_id":"has_friends=(has_friends:UInt8)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"args_string":"(has_friends : UInt8)","args_html":"(has_friends : UInt8)","def":{"name":"has_friends=","args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"visibility":"Public","body":"@has_friends = has_friends"}},{"html_id":"has_friends=(value:Bool)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_friends = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_parent:Bool-instance-method","name":"has_parent","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent","return_type":"Bool","visibility":"Public","body":"@has_parent == 1"}},{"html_id":"has_parent=(has_parent:UInt8)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"args_string":"(has_parent : UInt8)","args_html":"(has_parent : UInt8)","def":{"name":"has_parent=","args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"visibility":"Public","body":"@has_parent = has_parent"}},{"html_id":"has_parent=(value:Bool)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_parent = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_tape:Bool-instance-method","name":"has_tape","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape","return_type":"Bool","visibility":"Public","body":"@has_tape == 1"}},{"html_id":"has_tape=(has_tape:UInt8)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"args_string":"(has_tape : UInt8)","args_html":"(has_tape : UInt8)","def":{"name":"has_tape=","args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"visibility":"Public","body":"@has_tape = has_tape"}},{"html_id":"has_tape=(value:Bool)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_tape = UInt8.new(value ? 1 : 0)"}},{"html_id":"id:UInt64-instance-method","name":"id","doc":"Block identifier (`BlockRefSnapshot`s will refer to\nthis frozen block by this identifier).","summary":"Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Whether this block is an instance (its prototype is other than itself).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance","return_type":"Bool","visibility":"Public","body":"@is_instance == 1"}},{"html_id":"is_instance=(is_instance:UInt8)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"args_string":"(is_instance : UInt8)","args_html":"(is_instance : UInt8)","def":{"name":"is_instance=","args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"visibility":"Public","body":"@is_instance = is_instance"}},{"html_id":"is_instance=(value:Bool)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@is_instance = UInt8.new(value ? 1 : 0)"}},{"html_id":"parent:BlockRefSnapshot|Nil-instance-method","name":"parent","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"def":{"name":"parent","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"parent=(parent:BlockRefSnapshot|Nil)-instance-method","name":"parent=","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(parent : BlockRefSnapshot | Nil)","args_html":"(parent : BlockRefSnapshot | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"prototype:BlockRefSnapshot|Nil-instance-method","name":"prototype","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"def":{"name":"prototype","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"prototype=(prototype:BlockRefSnapshot|Nil)-instance-method","name":"prototype=","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(prototype : BlockRefSnapshot | Nil)","args_html":"(prototype : BlockRefSnapshot | Nil)","def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"tape:Novika::FrozenBlock::Tape-instance-method","name":"tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"tape","visibility":"Public","body":"@tape"}},{"html_id":"tape=(tape:Novika::FrozenBlock::Tape)-instance-method","name":"tape=","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"args_string":"(tape : Novika::FrozenBlock::Tape)","args_html":"(tape : Novika::FrozenBlock::Tape)","def":{"name":"tape=","args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"visibility":"Public","body":"@tape = tape"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}],"types":[{"html_id":"novika/Novika/FrozenBlock/Dict","path":"Novika/FrozenBlock/Dict.html","kind":"class","full_name":"Novika::FrozenBlock::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":459,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Dict]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n entries.size\nend}, {type: \"array\", name: entries, cls: FrozenEntry, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"entries:Array(FrozenEntry)-instance-method","name":"entries","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"def":{"name":"entries","return_type":"Array(FrozenEntry)","visibility":"Public","body":"@entries"}},{"html_id":"entries=(entries:Array(FrozenEntry))-instance-method","name":"entries=","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"args_string":"(entries : Array(FrozenEntry))","args_html":"(entries : Array(FrozenEntry))","def":{"name":"entries=","args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"visibility":"Public","body":"@entries = entries"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":459,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Friends","path":"Novika/FrozenBlock/Friends.html","kind":"class","full_name":"Novika::FrozenBlock::Friends","name":"Friends","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":469,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Friends]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n refs.size\nend}, {type: \"array\", name: refs, cls: BlockRefSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":469,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"refs:Array(BlockRefSnapshot)-instance-method","name":"refs","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"def":{"name":"refs","return_type":"Array(BlockRefSnapshot)","visibility":"Public","body":"@refs"}},{"html_id":"refs=(refs:Array(BlockRefSnapshot))-instance-method","name":"refs=","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"args_string":"(refs : Array(BlockRefSnapshot))","args_html":"(refs : Array(BlockRefSnapshot))","def":{"name":"refs=","args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"visibility":"Public","body":"@refs = refs"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Tape","path":"Novika/FrozenBlock/Tape.html","kind":"class","full_name":"Novika::FrozenBlock::Tape","name":"Tape","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":448,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Tape]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: cursor, cls: UInt32, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n substrate.size\nend}, {type: \"array\", name: substrate, cls: TypedSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"cursor:UInt32-instance-method","name":"cursor","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"def":{"name":"cursor","return_type":"UInt32","visibility":"Public","body":"@cursor"}},{"html_id":"cursor=(cursor:UInt32)-instance-method","name":"cursor=","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"args_string":"(cursor : UInt32)","args_html":"(cursor : UInt32)","def":{"name":"cursor=","args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"visibility":"Public","body":"@cursor = cursor"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":448,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"substrate:Array(TypedSnapshot)-instance-method","name":"substrate","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"def":{"name":"substrate","return_type":"Array(TypedSnapshot)","visibility":"Public","body":"@substrate"}},{"html_id":"substrate=(substrate:Array(TypedSnapshot))-instance-method","name":"substrate=","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"args_string":"(substrate : Array(TypedSnapshot))","args_html":"(substrate : Array(TypedSnapshot))","def":{"name":"substrate=","args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"visibility":"Public","body":"@substrate = substrate"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/FrozenEntry","path":"Novika/FrozenEntry.html","kind":"class","full_name":"Novika::FrozenEntry","name":"FrozenEntry","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":389,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenEntry]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 1, cls: Novika::FrozenEntry, onlyif: nil, verify: nil}, {type: \"basic\", name: key, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: value, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(key:Form,entry:Entry)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(key : Form, entry : Entry)","args_html":"(key : Form, entry : Entry)","location":{"filename":"src/novika/image.cr","line_number":411,"url":null},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"visibility":"Public","body":"frozen = new\nfrozen.key = TypedSnapshot.new(key)\nfrozen.value = TypedSnapshot.new(entry.form)\nfrozen.opens = entry.opener?\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":390,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"key:TypedSnapshot|Nil-instance-method","name":"key","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"def":{"name":"key","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@key"}},{"html_id":"key=(key:TypedSnapshot|Nil)-instance-method","name":"key=","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(key : TypedSnapshot | Nil)","args_html":"(key : TypedSnapshot | Nil)","def":{"name":"key=","args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@key = key"}},{"html_id":"melt(assembler,block)-instance-method","name":"melt","doc":"Defines the corresponding entry in *block*.","summary":"Defines the corresponding entry in block.
","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"args_string":"(assembler, block)","args_html":"(assembler, block)","location":{"filename":"src/novika/image.cr","line_number":405,"url":null},"def":{"name":"melt","args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"visibility":"Public","body":"k = key.not_nil!.to_form(assembler)\nv = value.not_nil!.to_form(assembler)\nblock.at(k, Entry.new(v, opens))\n"}},{"html_id":"opens:Bool-instance-method","name":"opens","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens","return_type":"Bool","visibility":"Public","body":"@opens == 1"}},{"html_id":"opens=(opens:UInt8)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"args_string":"(opens : UInt8)","args_html":"(opens : UInt8)","def":{"name":"opens=","args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"visibility":"Public","body":"@opens = opens"}},{"html_id":"opens=(value:Bool)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@opens = UInt8.new(value ? 1 : 0)"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"value:TypedSnapshot|Nil-instance-method","name":"value","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"def":{"name":"value","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@value"}},{"html_id":"value=(value:TypedSnapshot|Nil)-instance-method","name":"value=","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(value : TypedSnapshot | Nil)","args_html":"(value : TypedSnapshot | Nil)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Hole","path":"Novika/Hole.html","kind":"struct","full_name":"Novika::Hole","name":"Hole","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":39,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holes are similar to Crystal's `uninitialized` or `out`, in that\nthey allow you to allocate memory for a type, pass a pointer to\nthat memory to e.g. a C function, and let that C function write\ninto the memory. The written value can then be retrieved by\nopening the hole.","summary":"Holes are similar to Crystal's uninitialized
or out
, in that they allow you to allocate memory for a type, pass a pointer to that memory to e.g.
Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of this hole's content in memory.","summary":"Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":69,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"handle:Pointer(Void)-instance-method","name":"handle","doc":"Returns a pointer to this hole's content.","summary":"Returns a pointer to this hole's content.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":44,"url":null},"def":{"name":"handle","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":58,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"form = (@type.unbox(@handle)).to_form?\nform.try(&.onto(engine.stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":73,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << @type) << \" hole: 0x\"\naddress.to_s(io, base: 16)\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Hook","path":"Novika/Hook.html","kind":"module","full_name":"Novika::Hook","name":"Hook","abstract":false,"locations":[{"filename":"src/novika/hook.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Hook","kind":"module","full_name":"Novika::Hook","name":"Hook"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"as_boolean-instance-method","name":"as_boolean","doc":"Returns the block-to-boolean hook name.","summary":"Returns the block-to-boolean hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":70,"url":null},"def":{"name":"as_boolean","visibility":"Public","body":"Word.new(\"__boolean__\")"}},{"html_id":"as_byteslice-instance-method","name":"as_byteslice","doc":"Returns the block-to-byteslice hook name.","summary":"Returns the block-to-byteslice hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":80,"url":null},"def":{"name":"as_byteslice","visibility":"Public","body":"Word.new(\"__byteslice__\")"}},{"html_id":"as_color-instance-method","name":"as_color","doc":"Returns the block-to-color hook name.","summary":"Returns the block-to-color hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":55,"url":null},"def":{"name":"as_color","visibility":"Public","body":"Word.new(\"__color__\")"}},{"html_id":"as_decimal-instance-method","name":"as_decimal","doc":"Returns the block-to-decimal hook name.","summary":"Returns the block-to-decimal hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":65,"url":null},"def":{"name":"as_decimal","visibility":"Public","body":"Word.new(\"__decimal__\")"}},{"html_id":"as_quote-instance-method","name":"as_quote","doc":"Returns the block-to-quote hook name.","summary":"Returns the block-to-quote hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":60,"url":null},"def":{"name":"as_quote","visibility":"Public","body":"Word.new(\"__quote__\")"}},{"html_id":"as_quoted_word-instance-method","name":"as_quoted_word","doc":"Returns the block-to-quoted word hook name.","summary":"Returns the block-to-quoted word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":75,"url":null},"def":{"name":"as_quoted_word","visibility":"Public","body":"Word.new(\"__quotedWord__\")"}},{"html_id":"as_word-instance-method","name":"as_word","doc":"Returns the block-to-word hook name.","summary":"Returns the block-to-word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":50,"url":null},"def":{"name":"as_word","visibility":"Public","body":"Word.new(\"__word__\")"}},{"html_id":"died:Word-instance-method","name":"died","doc":"Returns the death hook name.\n\nDeath hooks are used to catch deaths (known as exceptions\nin other languages) in current block or in blocks below the\ncurrent block (nested blocks).\n\nBy defining a death hook, you are basically wrapping the\ncontents of your block in an uncontrained (catch-all)\n`try ... catch` or `begin ... rescue`.\n\n```novika\n[ getErrorDetails echo ] @: __died__\n\n1 0 / \"STDOUT: division by zero⏎\"\n```","summary":"Returns the death hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":19,"url":null},"def":{"name":"died","return_type":"Word","visibility":"Public","body":"Word.new(\"__died__\")"}},{"html_id":"on_cherry-instance-method","name":"on_cherry","doc":"Returns the on-cherry hook name.\n\nOn-cherry hooks trigger when the user tries to *cherry*\na form out of a block. This doesn't necessarily mean using\nthe word `cherry`, since e.g. the word `drop` and its\nimplicit counterpart *pop* is defined in terms of `cherry`.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and dropped/\npopped from, and how it behaves when it is `cherry`d.\n\nOn-shove hook is complemented by `on_shove` hook. See it\nto learn more.\n\nThe \"Hello, World\" of on-shove/on-cherry is defining a\n*controlled stack*.\n\n```novika\n[\n [ ] $: _controlledStack\n\n [ drop _controlledStack swap bi: ['Shove ' swap ~ echo] shove ] @: __shove__\n [ drop _controlledStack cherry dup 'Cherry ' swap ~ echo ] @: __cherry__\n\n [ _controlledStack echo ] @: print\n] obj $: master\n\nmaster [ 1 2 + ] there\nmaster.print\n\"STDOUT: Shove 1⏎\"\n\"STDOUT: Shove 2⏎\"\n\"STDOUT: Cherry 2⏎\"\n\"STDOUT: Cherry 1⏎\"\n\"STDOUT: Shove 3⏎\"\n\"STDOUT: [ 3 ]⏎\"\n```","summary":"Returns the on-cherry hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":142,"url":null},"def":{"name":"on_cherry","visibility":"Public","body":"Word.new(\"__cherry__\")"}},{"html_id":"on_shove-instance-method","name":"on_shove","doc":"Returns the on-shove hook name.\n\nOn-shove hooks trigger when the user tries to `shove` a\nform into the block the hook is attached to. Note that\nthis doesn't necessarily mean literally using `shove`.\n\nFor instance, simply typing `1 2 3` will shove 1, 2, 3\nconsequtively onto the stack. The latter is known as\n*pushing*, since *shoving* is defined for a block-and-a-\nform pair, while *pushing* is defined for a stack-and-a-\nform-pair, where the stack is implicit.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and pushed\nto, and how it behaves when it is shoved into.\n\nOn-shove hook is complemented by `on_cherry`. See it to\nlearn more.","summary":"Returns the on-shove hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":102,"url":null},"def":{"name":"on_shove","visibility":"Public","body":"Word.new(\"__shove__\")"}},{"html_id":"trap-instance-method","name":"trap","doc":"Returns the word trap hook name.\n\nWord traps catch undefined words. Note that during word\nresolution, word traps run *last*. That is, all parents\nand friends of the block you're trying to resolve a word\nin are searched, and only then traps are triggered in the\nappropriate order.\n\nTraps can be nested: if one trap fails to resolve a word,\nthen an outer trap is triggered.\n\nThe words *outer*, *inner*, *nested* etc. refer to the block\nparent hierarchy. Initially, this means the hierarchy is\nAST-like, but for reparented blocks (or blocks whose parent\nhierarchy is changed otherwise), different traps will be\ntriggered in case of an undefined word.\n\n```novika\n[ 'The following word is undefined: ' swap ~ echo ] @: __trap__\n\n1 2 + frobnicate \"STDOUT: The following word is undefined: frobnicate⏎\"\n```","summary":"Returns the word trap hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":45,"url":null},"def":{"name":"trap","visibility":"Public","body":"Word.new(\"__trap__\")"}}]},{"html_id":"novika/Novika/ICapability","path":"Novika/ICapability.html","kind":"module","full_name":"Novika::ICapability","name":"ICapability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Instance-side (`include`) interface to a Novika capability.\nAll capability instances must be compatible with this module.","summary":"Instance-side (include
) interface to a Novika capability.
Returns the collection this capability is a part of.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":19,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":true,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capability.cr","line_number":25,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ICapabilityClass","path":"Novika/ICapabilityClass.html","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Class-side (`extend`) interface to a Novika capability. All\ncapability classes must be compatible with this module.","summary":"Class-side (extend
) interface to a Novika capability.
Returns the frontend identifier of this capability class.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":6,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"on_by_default?:Bool-instance-method","name":"on_by_default?","doc":"Returns whether this capability class should be enabled automatically.","summary":"Returns whether this capability class should be enabled automatically.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":12,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"purpose:String-instance-method","name":"purpose","doc":"Returns a short description on what this capability class provides.","summary":"Returns a short description on what this capability class provides.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/IDict","path":"Novika/IDict.html","kind":"module","full_name":"Novika::IDict","name":"IDict","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Dict","kind":"class","full_name":"Novika::Dict","name":"Dict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Novika dictionary protocol. Objects or values that want\nto be Block dictionaries can implement this protocol to\nmake that possible.","summary":"Novika dictionary protocol.
","instance_methods":[{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":19,"url":null},"def":{"name":"clear","visibility":"Public","body":""}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":35,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":32,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":16,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"each(&:Form,Form->)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":38,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"block_arg":{"name":"","external_name":"","restriction":"(Form, Form ->)"},"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this dictionary currently stores no entries.","summary":"Returns whether this dictionary currently stores no entries.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":45,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"count.zero?"}},{"html_id":"get(name:Form,&:Form->Entry|Nil):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","args_html":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":12,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Form -> Entry | ::Nil)"},"return_type":"Entry | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":23,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":true,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":29,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":""}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":7,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":""}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":4,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"on_form_end(engine:Engine,form:Form)-instance-method","name":"on_form_end","doc":"Invoked after *engine* opened the given *form*.","summary":"Invoked after engine opened the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":8,"url":null},"def":{"name":"on_form_end","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Image","path":"Novika/Image.html","kind":"class","full_name":"Novika::Image","name":"Image","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":893,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
Returns the Image
formed with this block as the pivot block.
Holds compression method used to compress the payload.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression","return_type":"CompressionType","visibility":"Public","body":"CompressionType.new(@compression.to_i)"}},{"html_id":"compression=(compression:UInt8)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"args_string":"(compression : UInt8)","args_html":"(compression : UInt8)","def":{"name":"compression=","args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"visibility":"Public","body":"@compression = compression"}},{"html_id":"compression=(value:CompressionType)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"args_string":"(value : CompressionType)","args_html":"(value : CompressionType)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression=","args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"visibility":"Public","body":"@compression = (@compression.class.new(0)) | value.to_i"}},{"html_id":"payload:Bytes-instance-method","name":"payload","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"def":{"name":"payload","return_type":"Bytes","visibility":"Public","body":"@payload"}},{"html_id":"payload=(payload:Bytes)-instance-method","name":"payload=","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"args_string":"(payload : Bytes)","args_html":"(payload : Bytes)","def":{"name":"payload=","args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"visibility":"Public","body":"@payload = payload"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"signature:String-instance-method","name":"signature","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"def":{"name":"signature","return_type":"String","visibility":"Public","body":"@signature"}},{"html_id":"signature=(signature:String)-instance-method","name":"signature=","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"args":[{"name":"signature","external_name":"signature","restriction":"String"}],"args_string":"(signature : String)","args_html":"(signature : String)","def":{"name":"signature=","args":[{"name":"signature","external_name":"signature","restriction":"String"}],"visibility":"Public","body":"@signature = signature"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs the pivot block and its hierarchy from this\nimage. Returns the resulting block.\n\nCapability collection *caps* is required to make sure all\nrequired capabilities are enabled/available.","summary":"Reconstructs the pivot block and its hierarchy from this image.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":936,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"buffer = IO::Memory.new(payload)\nreader = case compression\nin .none?\n buffer\nin .gzip_fast?, .gzip_best?\n Compress::Gzip::Reader.new(buffer)\nin .brotli_fast?, .brotli_best?\n Compress::Brotli::Reader.new(buffer)\nend\npayload = reader.read_bytes(ImagePayload)\nreader.close\npayload.to_block(caps)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
No compression.
"},{"id":"GzipFast","name":"GzipFast","value":"1","doc":"Use(s) fast but not best Gzip compression.","summary":"Use(s) fast but not best Gzip compression.
"},{"id":"GzipBest","name":"GzipBest","value":"2","doc":"Use(s) best but not fast Gzip compression.","summary":"Use(s) best but not fast Gzip compression.
"},{"id":"BrotliFast","name":"BrotliFast","value":"3","doc":"Use(s) fast but not best Brotli compression.\nGenerally slower than `GzipFast`, but almost\ncertainly will yield better results.","summary":"Use(s) fast but not best Brotli compression.
"},{"id":"BrotliBest","name":"BrotliBest","value":"4","doc":"Use(s) best but not fast Brotli compression.\nGenerally slower than `GzipBest`, but almost\ncertainly will yield better results.","summary":"Use(s) best but not fast Brotli compression.
"}],"namespace":{"html_id":"novika/Novika/Image","kind":"class","full_name":"Novika::Image","name":"Image"},"doc":"Lists all available payload compression types.","summary":"Lists all available payload compression types.
","instance_methods":[{"html_id":"brotli_best?-instance-method","name":"brotli_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":915,"url":null},"def":{"name":"brotli_best?","visibility":"Public","body":"self == BrotliBest"}},{"html_id":"brotli_fast?-instance-method","name":"brotli_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":910,"url":null},"def":{"name":"brotli_fast?","visibility":"Public","body":"self == BrotliFast"}},{"html_id":"gzip_best?-instance-method","name":"gzip_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":905,"url":null},"def":{"name":"gzip_best?","visibility":"Public","body":"self == GzipBest"}},{"html_id":"gzip_fast?-instance-method","name":"gzip_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":902,"url":null},"def":{"name":"gzip_fast?","visibility":"Public","body":"self == GzipFast"}},{"html_id":"none?-instance-method","name":"none?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":899,"url":null},"def":{"name":"none?","visibility":"Public","body":"self == None"}}]}]},{"html_id":"novika/Novika/ImagePayload","path":"Novika/ImagePayload.html","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":800,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Monthly increment of the current Novika version.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"group\", name: ver, cls: Ver, onlyif: nil, verify: -> do\n (ver.rev == 10) && ({ver.subrev, ver.yearly, ver.monthly} == {SUBREV, YEARLY, MONTHLY})\nend, value: nil}, {type: \"group\", name: capabilities, cls: Capabilities, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: pool, cls: BlockPool | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Subrevision (release) of the current Novika version.
"},{"id":"VERSION_MATCH","name":"VERSION_MATCH","value":"((/(\\d+)\\.(\\d+)\\.(\\d+)/).match(Novika::VERSION)).not_nil!"},{"id":"YEARLY","name":"YEARLY","value":"VERSION_MATCH[2].to_u8","doc":"Yearly increment of the current Novika version.","summary":"Yearly increment of the current Novika version.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"capabilities","visibility":"Public","body":"@capabilities"}},{"html_id":"capabilities=(capabilities:Novika::ImagePayload::Capabilities)-instance-method","name":"capabilities=","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"args_string":"(capabilities : Novika::ImagePayload::Capabilities)","args_html":"(capabilities : Novika::ImagePayload::Capabilities)","def":{"name":"capabilities=","args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"visibility":"Public","body":"@capabilities = capabilities"}},{"html_id":"pool:BlockPool|Nil-instance-method","name":"pool","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"def":{"name":"pool","return_type":"BlockPool | ::Nil","visibility":"Public","body":"@pool"}},{"html_id":"pool=(pool:BlockPool|Nil)-instance-method","name":"pool=","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"args_string":"(pool : BlockPool | Nil)","args_html":"(pool : BlockPool | Nil)","def":{"name":"pool=","args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"visibility":"Public","body":"@pool = pool"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Converts this image payload to a block, aided by *caps*.\n\nSee `Image#to_block`.","summary":"Converts this image payload to a block, aided by caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":865,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"capabilities.required.each do |fid|\n if caps.has_capability?(fid.id)\n else\n raise(Novika::Error.new(\"image requires capability '#{fid.id}', but it isn't available\"))\n end\n caps.enable(fid.id)\nend\npool.not_nil!.to_block(caps)\n"}},{"html_id":"ver:Novika::ImagePayload::Ver-instance-method","name":"ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"ver","visibility":"Public","body":"@ver"}},{"html_id":"ver=(ver:Novika::ImagePayload::Ver)-instance-method","name":"ver=","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"args_string":"(ver : Novika::ImagePayload::Ver)","args_html":"(ver : Novika::ImagePayload::Ver)","def":{"name":"ver=","args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"visibility":"Public","body":"@ver = ver"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Capabilities]","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n required.size\nend}, {type: \"array\", name: required, cls: CapabilityId, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":852,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"required:Array(CapabilityId)-instance-method","name":"required","doc":"Holds IDs of required capabilities (namely `ICapabilityClass.id`).","summary":"Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capabilities(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capabilities","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capabilities","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Capabilities = Novika::ImagePayload::Capabilities.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ImagePayload/Ver","path":"Novika/ImagePayload/Ver.html","kind":"class","full_name":"Novika::ImagePayload::Ver","name":"Ver","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Ver]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: rev, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: subrev, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n SUBREV\nend}, {type: \"basic\", name: yearly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n YEARLY\nend}, {type: \"basic\", name: monthly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n MONTHLY\nend}] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"monthly:UInt8-instance-method","name":"monthly","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"def":{"name":"monthly","return_type":"UInt8","visibility":"Public","body":"@monthly"}},{"html_id":"monthly=(monthly:UInt8)-instance-method","name":"monthly=","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"args_string":"(monthly : UInt8)","args_html":"(monthly : UInt8)","def":{"name":"monthly=","args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"visibility":"Public","body":"@monthly = monthly"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":827,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"rev:UInt8-instance-method","name":"rev","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"def":{"name":"rev","return_type":"UInt8","visibility":"Public","body":"@rev"}},{"html_id":"rev=(rev:UInt8)-instance-method","name":"rev=","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"args_string":"(rev : UInt8)","args_html":"(rev : UInt8)","def":{"name":"rev=","args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"visibility":"Public","body":"@rev = rev"}},{"html_id":"subrev:UInt8-instance-method","name":"subrev","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"def":{"name":"subrev","return_type":"UInt8","visibility":"Public","body":"@subrev"}},{"html_id":"subrev=(subrev:UInt8)-instance-method","name":"subrev=","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"args_string":"(subrev : UInt8)","args_html":"(subrev : UInt8)","def":{"name":"subrev=","args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"visibility":"Public","body":"@subrev = subrev"}},{"html_id":"yearly:UInt8-instance-method","name":"yearly","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"def":{"name":"yearly","return_type":"UInt8","visibility":"Public","body":"@yearly"}},{"html_id":"yearly=(yearly:UInt8)-instance-method","name":"yearly=","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"args_string":"(yearly : UInt8)","args_html":"(yearly : UInt8)","def":{"name":"yearly=","args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"visibility":"Public","body":"@yearly = yearly"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/IReadableStore","path":"Novika/IReadableStore.html","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":208,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors act like a form-to-form mapping where entry\nkind (opens/pushes) is ignored (basically, a read-only,\nrestricted subset of block methods for dictionary access).\n\nImplementors can be targets of `entry:fetch`, `entry:fetch?`,\n`entry:exists?`, `entry:opener?`.","summary":"Implementors act like a form-to-form mapping where entry kind (opens/pushes) is ignored (basically, a read-only, restricted subset of block methods for dictionary access).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":209,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"readable store\""}}],"instance_methods":[{"html_id":"form_for(name:Form):Form-instance-method","name":"form_for","doc":"Returns the value form for an entry with the given *name*, or\ndies if no such entry exists.","summary":"Returns the value form for an entry with the given name, or dies if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form","args_html":"(name : Form) : Form","location":{"filename":"src/novika/dict.cr","line_number":230,"url":null},"def":{"name":"form_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form","visibility":"Public","body":"(form_for?(name)) || (name.die(\"no value form for '#{name}'\"))"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/dict.cr","line_number":218,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":214,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":222,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":226,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ISubmittableStore","path":"Novika/ISubmittableStore.html","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors can be targets of `entry:submit`.","summary":"Implementors can be targets of entry:submit
.
Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":247,"url":null},"def":{"name":"submit","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(submit?(name, form)) || (name.die(\"no entry to submit to\"))"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":243,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/LargeDecimalSnapshot","path":"Novika/LargeDecimalSnapshot.html","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":151,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::LargeDecimalSnapshot]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: repr, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":161,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.repr = form.to_s\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":152,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"repr:String-instance-method","name":"repr","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"def":{"name":"repr","return_type":"String","visibility":"Public","body":"@repr"}},{"html_id":"repr=(repr:String)-instance-method","name":"repr=","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"args":[{"name":"repr","external_name":"repr","restriction":"String"}],"args_string":"(repr : String)","args_html":"(repr : String)","def":{"name":"repr=","args":[{"name":"repr","external_name":"repr","restriction":"String"}],"visibility":"Public","body":"@repr = repr"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":157,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(repr)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Library","path":"Novika/Library.html","kind":"class","full_name":"Novika::Library","name":"Library","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":310,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A library is a collection of foreign functions.\n\nA library form can be opened with a block of *function declarations*\nto be exposed. Each function declaration consists of the function's\nname and type signature. Exposed functions are then defined in the\nopener block.\n\nFor more details, see Novika's `ffi:getLibrary`.\n\nInternally, library objects are created by the frontend and fed\nto the capability collection `caps`. When needed, they are\nretrieved from this capability collection.","summary":"A library is a collection of foreign functions.
","class_methods":[{"html_id":"new?(id:String,cwd:Path,env:Resolver::RunnableEnvironment):Library|Nil-class-method","name":"new?","doc":"Tries to find the library with the given *id* in the system-\nspecific library directories, current working directory *cwd*,\nand in the runnable environment *env*.\n\nReturns nil if the library could not be found or loaded.","summary":"Tries to find the library with the given id in the system- specific library directories, current working directory cwd, and in the runnable environment env.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"args_string":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","args_html":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":329,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"return_type":"Library | ::Nil","visibility":"Public","body":"candidates = [] of String\n{% if flag?(:windows) %}\n candidates << \"#{id}.dll\"\n candidates << \"lib#{id}.dll\"\n {% else %}{% if flag?(:darwin) %}\n candidates << \"#{id}.dylib\"\n candidates << \"lib#{id}.dylib\"\n {% else %}{% if flag?(:unix) %}\n candidates << \"#{id}.so\"\n candidates << \"lib#{id}.so\"\n {% else %}\n return\n {% end %}{% end %}{% end %}\nCrystal::Loader.default_search_paths.each do |search_path|\n candidates.each do |candidate|\n if library = Library.new?(id, Path[search_path] / candidate)\n else\n next\n end\n return library\n end\nend\ncandidates.each do |candidate|\n if path = (env.expand?(Path[candidate])) || (cwd.expand(Path[candidate]))\n else\n next\n end\n if library = Library.new?(id, path)\n else\n next\n end\n return library\nend\n"}},{"html_id":"new?(id:String,path:Path):Library|Nil-class-method","name":"new?","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (it may be chosen arbitrarily).\n\nReturns nil if the library could not be loaded.","summary":"Initializes a library for the dynamic library at path, with the given identifier (it may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library | Nil","args_html":"(id : String, path : Path) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":369,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library | ::Nil","visibility":"Public","body":"if handle = LibDl.dlopen(path.to_s, LibDl::RTLD_NOW)\nelse\n return\nend\nnew(id, path, handle)\n"}},{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":532,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"foreign library\""}}],"constructors":[{"html_id":"new(id:String,path:Path):Library-class-method","name":"new","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (may be chosen arbitrarily).\n\nMay die if LibDL fails to load the library.","summary":"Initializes a library for the dynamic library at path, with the given identifier (may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library","args_html":"(id : String, path : Path) : Library","location":{"filename":"src/novika/forms/foreign.cr","line_number":379,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library","visibility":"Public","body":"(new?(id, path)) || (raise(Error.new(String.new(LibDl.dlerror))))"}}],"instance_methods":[{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":536,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"finalize-instance-method","name":"finalize","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":320,"url":null},"def":{"name":"finalize","visibility":"Public","body":"LibDl.dlclose(@handle)"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this library.","summary":"Returns the identifier of this library.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":315,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":521,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"this = engine.block\nfdecls = engine.stack.drop.a(Block)\nfdecls.each do |fdecl|\n parse_fdecl(this, fdecl.a(Block))\nend\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":540,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign library: \") << id) << \"]\""}}]},{"html_id":"novika/Novika/ObjectPool","path":"Novika/ObjectPool.html","kind":"struct","full_name":"Novika::ObjectPool(T)","name":"ObjectPool","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/object_pool.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A naïve object pool, inspired by:\n\nhttps://gist.github.com/floere/3121579","summary":"A naïve object pool, inspired by:
","constructors":[{"html_id":"new(create:->T,clear:T->T)-class-method","name":"new","abstract":false,"args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"args_string":"(create : -> T, clear : T -> T)","args_html":"(create : -> T, clear : T -> T)","location":{"filename":"src/novika/object_pool.cr","line_number":8,"url":null},"def":{"name":"new","args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"visibility":"Public","body":"_ = ObjectPool(T).allocate\n_.initialize(create, clear)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"acquire:T-instance-method","name":"acquire","doc":"Returns a free/new instance of the object.","summary":"Returns a free/new instance of the object.
","abstract":false,"location":{"filename":"src/novika/object_pool.cr","line_number":18,"url":null},"def":{"name":"acquire","return_type":"T","visibility":"Public","body":"if kv = @free.shift?\nelse\n obj = @create.call\n kv = {id(obj), obj}\nend\n@used[] = *kv\n"}},{"html_id":"release(obj:T)-instance-method","name":"release","doc":"Clears the given *instance* of the object, and releases\nit so that it can be acquired by someone else.","summary":"Clears the given instance of the object, and releases it so that it can be acquired by someone else.
","abstract":false,"args":[{"name":"obj","external_name":"obj","restriction":"T"}],"args_string":"(obj : T)","args_html":"(obj : T)","location":{"filename":"src/novika/object_pool.cr","line_number":28,"url":null},"def":{"name":"release","args":[{"name":"obj","external_name":"obj","restriction":"T"}],"visibility":"Public","body":"@clear.call(obj)\nid = id(obj)\n@free[id] = obj\n@used.delete(id)\n"}}]},{"html_id":"novika/Novika/Quote","path":"Novika/Quote.html","kind":"module","full_name":"Novika::Quote","name":"Quote","abstract":false,"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":18,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EFFECT_BOUND_TAKE","name":"EFFECT_BOUND_TAKE","value":"12","doc":"Specifies how many characters to take from the left and right\nboundaries of the quote for a shorter representation in `effect`.","summary":"Specifies how many characters to take from the left and right boundaries of the quote for a shorter representation in #effect
.
Specifies the maximum amount of characters to display before the quote gets cut off in #effect
(see Form#effect
).
The empty quote.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"including_types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote"},{"html_id":"novika/Novika/Quote/StringQuote","kind":"struct","full_name":"Novika::Quote::StringQuote","name":"StringQuote"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are Novika quotes, which are known as strings\nin most other programming languages.\n\nQuotes are optimized for the ASCII-only case. Also, they\ntreat single `String::Grapheme`s separately from strings\nof those, and cache grapheme counts here and there.\n\nThe slowest operations on quotes are `slice_at` and `at`\nover *non- ASCII* quotes. Both are currently O(N) in terms\nof iterations only; they do a lot of other work besides\niteration as well.\n\nWhen you are slow, being even slower doesn't matter that much\nanymore. This is the case with Novika.\n\nAnd yes, quotes do rely on the experimental grapheme API.","summary":"Includers are Novika quotes, which are known as strings in most other programming languages.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":50,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,count=string.grapheme_size,ascii=string.ascii_only?)-class-method","name":"new","doc":"Creates a quote from *string*.\n\n*count* can be provided if the amount of graphemes in\n*string* is known.","summary":"Creates a quote from string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"args_string":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","args_html":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":28,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"visibility":"Public","body":"if count == 1\n string.each_grapheme do |it|\n return GraphemeQuote.new(it)\n end\nend\nStringQuote.new(string, count, ascii)\n"}},{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","doc":"Creates a quote from *grapheme*.","summary":"Creates a quote from grapheme.
","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":37,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"GraphemeQuote.new(grapheme)"}},{"html_id":"new(char:Char)-class-method","name":"new","doc":"Creates a quote from *char*.","summary":"Creates a quote from char.
","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","args_html":"(char : Char)","location":{"filename":"src/novika/forms/quote.cr","line_number":42,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"Char"}],"visibility":"Public","body":"new(String::Grapheme.new(char))"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":69,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":true,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":65,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"at(index:Int32):GraphemeQuote-instance-method","name":"at","doc":"Returns the grapheme at *index* as `Quote`, or dies.","summary":"Returns the grapheme at index as Quote
, or dies.
Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":76,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":72,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/quote.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quote '\") << string) << \"'\""}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* in this quote.","summary":"Yields occurrences of the given pattern in this quote.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":177,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":188,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"nchars = count\nif nchars <= EFFECT_MAX_CHARS\n return super(io)\nend\nl = at(0, EFFECT_BOUND_TAKE)\nr = at((nchars - EFFECT_BOUND_TAKE) - 1, nchars - 1)\nio << \"'\"\nl.string.dump_unquoted(io)\nio << \"…\"\nr.string.dump_unquoted(io)\nio << \"'\"\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":79,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"first_byte?:UInt8|Nil-instance-method","name":"first_byte?","doc":"Returns the first byte (or nil) in this quote.","summary":"Returns the first byte (or nil) in this quote.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":112,"url":null},"def":{"name":"first_byte?","return_type":"UInt8 | ::Nil","visibility":"Public","body":"string.byte_at?(0)"}},{"html_id":"fit(total:Int,ellipsis:_):Quote-instance-method","name":"fit","doc":"Ensures this quote is of *total* characters or less. In case of\noverflow, truncates with *ellipsis*. If even *ellipsis* cannot\nfit, truncates ellipsis so that it is of *total* characters.\nReturns the resulting quote.","summary":"Ensures this quote is of total characters or less.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"args_string":"(total : Int, ellipsis : _) : Quote","args_html":"(total : Int, ellipsis : _) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":94,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"ord?:Int32|Nil-instance-method","name":"ord?","doc":"Returns the Unicode codepoint for the first character in\nthis quote, or nil if this quote is empty.","summary":"Returns the Unicode codepoint for the first character in this quote, or nil if this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":118,"url":null},"def":{"name":"ord?","return_type":"Int32 | ::Nil","visibility":"Public","body":"if empty?\nelse\n string[0].ord\nend"}},{"html_id":"pad(total:Int,padder:_,side:PadSide):Quote-instance-method","name":"pad","doc":"Pads this quote with *padder* until it becomes *total* perceived\ncharacters long. The side where the padding should apply is specified\nby *side*. Returns the resulting quote.","summary":"Pads this quote with padder until it becomes total perceived characters long.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : _, side : PadSide) : Quote","args_html":"(total : Int, padder : _, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":88,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":true,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":83,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"slice_at(slicept:Int32):Tuple(Quote,Quote)-instance-method","name":"slice_at","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Dies if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote)","args_html":"(slicept : Int32) : Tuple(Quote, Quote)","location":{"filename":"src/novika/forms/quote.cr","line_number":145,"url":null},"def":{"name":"slice_at","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote)","visibility":"Public","body":"(slice_at?(slicept)) || (die(\"slicepoint is out of bounds: #{slicept}\"))"}},{"html_id":"slice_at?(slicept:Int32):Tuple(Quote,Quote)|Nil-instance-method","name":"slice_at?","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Returns nil if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","args_html":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","location":{"filename":"src/novika/forms/quote.cr","line_number":152,"url":null},"def":{"name":"slice_at?","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote) | ::Nil","visibility":"Public","body":"size = count\nif size.zero?\n return\nend\nif slicept.in?(0..size)\nelse\n return\nend\nif slicept.zero?\n {EMPTY, self}\nelse\n if slicept == size\n {self, EMPTY}\n else\n slice_at!(slicept, size)\n end\nend\n"}},{"html_id":"stitch(other:Quote):Quote-instance-method","name":"stitch","doc":"Stitches (concatenates) this and *other* quote variants,\nand returns the resulting quote.","summary":"Stitches (concatenates) this and other quote variants, and returns the resulting quote.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Quote","args_html":"(other : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":124,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if empty?\n return other\nend\nif other.empty?\n return self\nend\na = cached_count?\nb = other.cached_count?\nif a && b\n StringQuote.new(string + other.string, count: a + b)\nelse\n StringQuote.new(res = string + other.string, count: res.grapheme_size)\nend\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Returns an immutable Byteslice
representation of this quote.
Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":172,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"self"}}],"types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","path":"Novika/Quote/GraphemeQuote.html","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":496,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Quote type for a single grapheme (perceived character).","summary":"Quote type for a single grapheme (perceived character).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":505,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":502,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"_ = allocate\n_.initialize(grapheme)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":552,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(GraphemeQuote) && (other.grapheme == grapheme)"}},{"html_id":"as_byte?-instance-method","name":"as_byte?","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":509,"url":null},"def":{"name":"as_byte?","visibility":"Public","body":"if char = (grapheme.@cluster).as?(Char)\nelse\n return\nend\nif char.ascii?\nelse\n return\nend\nchar.ord\n"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":527,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b == e ? self : EMPTY"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":541,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"1"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.\n\nGrapheme quotes always return 1.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":534,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"1"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":606,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"if grapheme == pattern.grapheme\n yield 0\nend"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":612,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.\n\nGrapheme quotes always return false.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":548,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":600,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nself\n"}},{"html_id":"grapheme:String::Grapheme-instance-method","name":"grapheme","doc":"Returns the grapheme.","summary":"Returns the grapheme.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":500,"url":null},"def":{"name":"grapheme","return_type":"String::Grapheme","visibility":"Public","body":"@grapheme"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":556,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total <= 1\n return self\nend\nif total == 2\n padding = padder\nelse\n string = String.build do |io|\n last = padder.grapheme\n (total - 1).times do\n io << last\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":575,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total <= 1\n return self\nend\nif total == 2\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - 1\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":624,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"self == pattern ? repl : self"}},{"html_id":"stitch(other:StringQuote):Quote-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote) : Quote","args_html":"(other : StringQuote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":519,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"return_type":"Quote","visibility":"Public","body":"other.empty? ? self : super(other)"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Apply padding to the left of the quote.
"},{"id":"Right","name":"Right","value":"1","doc":"Apply padding to the right of the quote.","summary":"Apply padding to the right of the quote.
"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Represents the side where padding should apply.\n\nSee `Quote#pad`.","summary":"Represents the side where padding should apply.
","instance_methods":[{"html_id":"apply(quote:Quote,padding:Quote)-instance-method","name":"apply","doc":"Applies padding to the side specified by `self`.","summary":"Applies padding to the side specified by self
.
Quote type for multiple (two or more), or no graphemes.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":241,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,countcached_count:Int32|Nil=nil,ascii_only:Bool=string.ascii_only?)-class-method","name":"new","doc":"Creates a string quote from the given *string*.","summary":"Creates a string quote from the given string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"args_string":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","args_html":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":237,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string, cached_count, ascii_only)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":350,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(StringQuote) && (string == other.string)"}},{"html_id":"ascii_only?:Bool-instance-method","name":"ascii_only?","doc":"Returns whether this string quote consists of ASCII\ncharacters only.","summary":"Returns whether this string quote consists of ASCII characters only.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":234,"url":null},"def":{"name":"ascii_only?","return_type":"Bool","visibility":"Public","body":"@ascii_only"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":298,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nif (b == 0) && (e == (count - 1))\n return self\nend\nif b == e\n return (at?(b)).not_nil!\nend\nif ascii_only?\n StringQuote.new((b..e).join do |index|\n byte = (string.byte_at?(index)).not_nil!\n byte < 128 ? byte.unsafe_chr : Char::REPLACEMENT\n end, count: e - b, ascii_only: true)\nelse\n StringQuote.new(String.build do |io|\n index = 0\n string.each_grapheme do |grapheme|\n if index < b\n index = index + 1\n next\n end\n if index > e\n break\n end\n io << grapheme\n index = index + 1\n end\n end, count: e - b, ascii_only: false)\nend\n"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached perceived character count in this string quote, or nil.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":230,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"@cached_count"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":342,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"cached_count? || string.grapheme_size"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":431,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"kmp(string, pattern.string, ascii: ascii_only? && pattern.ascii_only?) do |index|\n yield index\nend"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":409,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\nif ascii_only? && (pattern_byte = pattern.as_byte?)\n string.each_byte do |byte|\n if byte == pattern_byte\n yield index\n end\n index = index + 1\n end\nelse\n string.each_grapheme do |grapheme|\n if grapheme == pattern.grapheme\n yield index\n end\n index = index + 1\n end\nend\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":346,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"string.empty?"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":397,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nif count <= total\n return self\nend\nnvisible = total - ellipsis.count\nif nvisible <= 0\n return ellipsis.at(0, total - 1)\nend\n(at(0, nvisible - 1)).stitch(ellipsis)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":372,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - count\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":354,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder\nelse\n string = String.build(total) do |io|\n (total - count).times do\n io << padder.grapheme\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":486,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(string.gsub(pattern.string, repl.string))"}},{"html_id":"stitch(other:StringQuote)-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote)","args_html":"(other : StringQuote)","location":{"filename":"src/novika/forms/quote.cr","line_number":333,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"visibility":"Public","body":"if ascii_only? && other.ascii_only?\nelse\n return super(other)\nend\nStringQuote.new(res = string + other.string, count: res.bytesize, ascii_only: true)\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Returns the underlying string.","summary":"Returns the underlying string.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":226,"url":null},"def":{"name":"string","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":490,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"'\"\nstring.dump_unquoted(io)\nio << \"'\"\n"}}]}]},{"html_id":"novika/Novika/QuotedWord","path":"Novika/QuotedWord.html","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":79,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Quoted words are words prefixed by '#': e.g., `#foo`. It\nlets you 'coat' a word: `#foo open` is the same as `foo`,\n`##foo open` is the same as `#foo`, etc. Levels of coating\nare peeled off like in an onion.","summary":"Quoted words are words prefixed by '#': e.g., #foo
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":89,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quoted word '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":84,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine):self-instance-method","name":"on_parent_open","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : self","args_html":"(engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":118,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"self","visibility":"Public","body":"tap do\n peel.onto(engine.stack)\nend"}},{"html_id":"peel-instance-method","name":"peel","doc":"\"Peels\" off a layer of quoting.\n\n```\nQuotedWord.new(\"#foo\").peel # Word.new(\"foo\")\nQuotedWord.new(\"##foo\").peel # QuotedWord.new(\"#foo\")\nQuotedWord.new(\"###foo\").peel # QuotedWord.new(\"##foo\")\n```","summary":""Peels" off a layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":109,"url":null},"def":{"name":"peel","visibility":"Public","body":"id.prefixed_by?('#') ? QuotedWord.new(id.lchop) : Word.new(id)"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds another layer of quoting. Opposite of `peel`.","summary":"Adds another layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":98,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(\"##{@id}\")"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":122,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << '#') << id"}},{"html_id":"to_word:Word-instance-method","name":"to_word","doc":"Converts this quoted word to `Word`.","summary":"Converts this quoted word to Word
.
Snapshot of a quoted word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuotedWordSnapshot]","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:QuotedWord)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"args_string":"(form : QuotedWord)","args_html":"(form : QuotedWord)","location":{"filename":"src/novika/image.cr","line_number":226,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"visibility":"Public","body":"qword = new\nqword.id = form.id\nqword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":217,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":222,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"QuotedWord.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/QuoteSnapshot","path":"Novika/QuoteSnapshot.html","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":173,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuoteSnapshot]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: bytesize, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.bytesize\nend}, {type: \"string\", name: content, cls: String, onlyif: nil, verify: nil, length: -> do\n bytesize\nend, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Quote)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/image.cr","line_number":186,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"quote = new\nquote.content = form.string\nquote\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":174,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"bytesize:UInt64-instance-method","name":"bytesize","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"def":{"name":"bytesize","return_type":"UInt64","visibility":"Public","body":"@bytesize"}},{"html_id":"bytesize=(bytesize:UInt64)-instance-method","name":"bytesize=","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"args_string":"(bytesize : UInt64)","args_html":"(bytesize : UInt64)","def":{"name":"bytesize=","args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"visibility":"Public","body":"@bytesize = bytesize"}},{"html_id":"content:String-instance-method","name":"content","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"def":{"name":"content","return_type":"String","visibility":"Public","body":"@content"}},{"html_id":"content=(content:String)-instance-method","name":"content=","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String)","args_html":"(content : String)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"String"}],"visibility":"Public","body":"@content = content"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":182,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Quote.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Resolver","path":"Novika/Resolver.html","kind":"module","full_name":"Novika::Resolver","name":"Resolver","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENV_GLOBAL_DIRNAME","name":"ENV_GLOBAL_DIRNAME","value":"\".novika\"","doc":"Specifies the name of the global environment directory.","summary":"Specifies the name of the global environment directory.
"},{"id":"ENV_LOCAL_DIRNAME","name":"ENV_LOCAL_DIRNAME","value":"\"env\"","doc":"Specifies the name of the local environment directory.","summary":"Specifies the name of the local environment directory.
"},{"id":"ENV_LOCAL_PROOF_FILENAME","name":"ENV_LOCAL_PROOF_FILENAME","value":"\".nk.env\"","doc":"Specifies the name of the file that is going to be used as the\nproof that the directory at hand is not simply called 'env',\nbut is actually intended as a Novika environment directory.","summary":"Specifies the name of the file that is going to be used as the proof that the directory at hand is not simply called 'env', but is actually intended as a Novika environment directory.
"},{"id":"PERMISSIONS_FILENAME","name":"PERMISSIONS_FILENAME","value":"\"permissions\"","doc":"Specifies the name of the file that will contain saved permissions.","summary":"Specifies the name of the file that will contain saved permissions.
"},{"id":"PREAMBLES_ENTRY_NAME","name":"PREAMBLES_ENTRY_NAME","value":"Word.new(\"__preambles__\")","doc":"Specifies the name of the entry that holds the preambles.","summary":"Specifies the name of the entry that holds the preambles.
"},{"id":"RESOLVER_RECURSION_LIMIT","name":"RESOLVER_RECURSION_LIMIT","value":"64","doc":"Recursion limit for the resolver. Doesn't have to be big, it's\nbasically file system depth which isn't too big most of the time.","summary":"Recursion limit for the resolver.
"}],"including_types":[{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Resolver/ChildSlot","path":"Novika/Resolver/ChildSlot.html","kind":"class","full_name":"Novika::Resolver::ChildSlot","name":"ChildSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1423,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"runnables of whomever\ninherits me\".","summary":"Slot (placeholder) that stands for "runnables of whomever inherits me".
","instance_methods":[{"html_id":"replace(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present,population:RunnableContainer,container:RunnableContainer):RunnableContainer-instance-method","name":"replace","doc":"Replaces any occurences of this slot in *container* with a\ncontainer holding the runnables this slot stands for.\n\n*manifest* is the manifest that contains this slot.\n\n*group* is the `RunnableGroup` of the manifest that contains\nthis slot.\n\nReturns the next population container.","summary":"Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1424,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"content = population.child(transparent: false, ancestor: self)\ncontainer.replace(self, content)\ncontent\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1442,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[<>]\""}}]},{"html_id":"novika/Novika/Resolver/Designation","path":"Novika/Resolver/Designation.html","kind":"struct","full_name":"Novika::Resolver::Designation","name":"Designation","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":768,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Designation objects encapsulate a runnable environment and a set\nof resolutions that should be run within that environment.\n\nThe preferred way to create designations is via `RunnableEnvironment#designate`.\n\nAfter obtaining a designation, you can `run` it as many times as\nyou want.","summary":"Designation objects encapsulate a runnable environment and a set of resolutions that should be run within that environment.
","constructors":[{"html_id":"new(root:RunnableRoot,env:RunnableEnvironment,set:ResolutionSet,caps:CapabilityCollection)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","args_html":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":772,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, env, set, caps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"caps:Novika::CapabilityCollection-instance-method","name":"caps","doc":"Returns this designation's own capability collection.","summary":"Returns this designation's own capability collection.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":770,"url":null},"def":{"name":"caps","visibility":"Public","body":"@caps"}},{"html_id":"label:String-instance-method","name":"label","doc":"Returns the label of this designation. It is formed from the\nbasename of this designation's runnable environment.","summary":"Returns the label of this designation.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":837,"url":null},"def":{"name":"label","return_type":"String","visibility":"Public","body":"if envpath = @env.abspath?\nelse\n return \"unknown\"\nend\nenvpath.basename\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the designated resolutions under a new common toplevel block.","summary":"Runs the designated resolutions under a new common toplevel block.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":861,"url":null},"def":{"name":"run","visibility":"Public","body":"preambles = Block.new\nfill_preambles_block(preambles)\ntoplevel = Block.new(@caps.block)\ntoplevel.at(Word.new(\"__runtime__\"), Quote.new(\"novika\"))\ntoplevel.at(PREAMBLES_ENTRY_NAME, preambles)\nengine = Engine.push(@caps)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(toplevel)).slurp(source)\n instance = resolution.run(engine, script_block: script)\n toplevel.import!(from: instance)\nend\nEngine.pop(engine)\n"}},{"html_id":"slurp(target:Block)-instance-method","name":"slurp","doc":"Parses the designated resolutions and appends the parsed forms to\n*target*. Their order is kept, and matches that of the designated\nresolutions.","summary":"Parses the designated resolutions and appends the parsed forms to target.
","abstract":false,"args":[{"name":"target","external_name":"target","restriction":"Block"}],"args_string":"(target : Block)","args_html":"(target : Block)","location":{"filename":"src/novika/resolver.cr","line_number":846,"url":null},"def":{"name":"slurp","args":[{"name":"target","external_name":"target","restriction":"Block"}],"visibility":"Public","body":"preambles = (target.form_for?(PREAMBLES_ENTRY_NAME)).as?(Block)\npreambles || (preambles = Block.new)\nfill_preambles_block(preambles)\ntarget.at(PREAMBLES_ENTRY_NAME, preambles)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(target)).slurp(source)\n target.paste(script)\nend\n"}},{"html_id":"to_s(io,sm=false)-instance-method","name":"to_s","doc":"Appends the string representation of this designation to *io*.\n\n*sm*, if set to true, enables SMall output mode. In this mode,\nonly relative paths of the designated resolutions are appended\nto *io*, separated by newlines.","summary":"Appends the string representation of this designation to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"args_string":"(io, sm = false)","args_html":"(io, sm = false)","location":{"filename":"src/novika/resolver.cr","line_number":889,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"visibility":"Public","body":"envpath = @env.abspath?\nif sm && envpath\n @set.each do |resolution|\n io.puts((resolution.abspath.relative_to?(envpath)) || resolution.abspath)\n end\n return\nend\nenvpath || (envpath = \"unknown\")\n(io << envpath) << \": [\\n\"\n@set.each do |resolution|\n ((io << \" \") << resolution.abspath) << \",\\n\"\nend\nio << \"]\\n\"\n"}}]},{"html_id":"novika/Novika/Resolver/Disk","path":"Novika/Resolver/Disk.html","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":131,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"InfoAbsent","name":"InfoAbsent","value":"InfoAbsence.new","doc":"Singleton instance of `InfoAbsence`.","summary":"Singleton instance of InfoAbsence
.
A caching, resolver-specific file system access abstraction on top of Crystal's Dir
and File
.
If path (symlink or not) points to a directory, returns the real path to that directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":224,"url":null},"def":{"name":"dir?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.directory?\nelse\n return\nend\npresence.path\n"}},{"html_id":"env?(origin:Path):Path|Nil-instance-method","name":"env?","doc":"Determines and returns the path to the environment directory,\nif any. Otherwise, returns nil.\n\nClimbs up from *origin* until encountering:\n\n- A file named '.nk.env'\n- A directory named 'env' containing a file named '.nk.env'\n- A directory named '.novika'\n\nThe result is cached, recursively, so you can call this method\nas many times as you'd like; your disk won't explode.","summary":"Determines and returns the path to the environment directory, if any.
","abstract":false,"args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"args_string":"(origin : Path) : Path | Nil","args_html":"(origin : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":327,"url":null},"def":{"name":"env?","args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"env : Path | ::Nil\nif env = @envs[origin]?\n return env\nend\nif file?(origin / ENV_LOCAL_PROOF_FILENAME)\n return @envs[origin] = origin\nend\nif env = dir?(origin / ENV_GLOBAL_DIRNAME)\n return @envs[origin] = env\nend\nif (env = dir?(origin / ENV_LOCAL_DIRNAME)) && (file?(env / ENV_LOCAL_PROOF_FILENAME))\n return @envs[origin] = env\nend\nif (origin == origin.root) && (env = dir?(Path.home / ENV_GLOBAL_DIRNAME))\n return @envs[origin] = env\nend\nif origin == origin.anchor\n return\nend\nif env = env?(origin.parent)\nelse\n return\nend\n@envs[origin] = env\n"}},{"html_id":"file?(path:Path):Path|Nil-instance-method","name":"file?","doc":"If *path* (symlink or not) points to a file, returns the real\npath to that file. Otherwise, returns nil.","summary":"If path (symlink or not) points to a file, returns the real path to that file.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":215,"url":null},"def":{"name":"file?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.file?\nelse\n return\nend\npresence.path\n"}},{"html_id":"glob(origin:Path,selector:GlobSelector,&fn:Path->)-instance-method","name":"glob","doc":"A simpler, Novika- and `Disk`-specific globbing mechanism.\n\nCalls *fn* with paths in *origin* directory that match the\ngiven *selector*.","summary":"A simpler, Novika- and Disk
-specific globbing mechanism.
Reads, caches, and returns the InfoPresence
object for the given path.
Returns the content of the file that path points to.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : String | Nil","args_html":"(path : Path) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":234,"url":null},"def":{"name":"read","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"String | ::Nil","visibility":"Public","body":"@content.put_if_absent(path) do\n File.read(path)\nend"}},{"html_id":"write(path:Path,&:IO->)-instance-method","name":"write","doc":"Yields writable `IO` for the file that *path* points to. The\nfile is created if it does not exist; its content is cleared\nif it does.","summary":"Yields writable IO
for the file that path points to.
Represents the absence of the requested file system entry.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/Disk/InfoPresence","path":"Novika/Resolver/Disk/InfoPresence.html","kind":"struct","full_name":"Novika::Resolver::Disk::InfoPresence","name":"InfoPresence","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":137,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Disk","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk"},"doc":"Represents the presence of the requested file system entry\n(directory, file, or symlink) at `path`. Also holds its\n`File::Info` object, `info`.\n\nSee `info?`.","summary":"Represents the presence of the requested file system entry (directory, file, or symlink) at #path
.
Asks signal receivers to load whatever data they can (and should) from disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/DoDiskSave","path":"Novika/Resolver/DoDiskSave.html","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Asks signal receivers to save whatever data they can\n(and should) to disk.","summary":"Asks signal receivers to save whatever data they can (and should) to disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/GlobSelector","path":"Novika/Resolver/GlobSelector.html","kind":"enum","full_name":"Novika::Resolver::GlobSelector","name":"GlobSelector","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Scripts","name":"Scripts","value":"0","doc":"Match all Novika scripts (glob '*.nk')","summary":"Match all Novika scripts (glob '*.nk')
"},{"id":"Directories","name":"Directories","value":"1","doc":"Match all subdirectories (glob '*/')","summary":"Match all subdirectories (glob '*/')
"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selector for `Disk#glob`.","summary":"Selector for Disk#glob
.
Includers are manifests in RunnableGroup
s.
Creates and returns a manifest object if path contains a manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil) : Manifest","args_html":"(disk : Disk, path : Path, ancestor = nil) : Manifest","location":{"filename":"src/novika/resolver.cr","line_number":1560,"url":null},"def":{"name":"find","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"return_type":"Manifest","visibility":"Public","body":"((Lib.find?(disk, path, ancestor)) || (App.find?(disk, path, ancestor))) || Absent.new"}}],"instance_methods":[{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1570,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\n"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","doc":"Populates *container* with runnables from *origin* according\nto the content of the manifest.\n\n* If there is no explicit `*` or `**`, `**` is automatically\n inserted at the very beginning of the manifest regardless\n of whether it is an application manifest or a library manifest.\n\n* A directory with no manifest is laid out directly using `layout`,\n since there is no \"manifest content\" to speak of.","summary":"Populates container with runnables from origin according to the content of the manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1587,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: true, ancestor: origin)\npopulation.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.append(population)\nroot.assign(origin, container: population)\nlayout(population, origin)\n"}}],"types":[{"html_id":"novika/Novika/Resolver/Manifest/Absent","path":"Novika/Resolver/Manifest/Absent.html","kind":"struct","full_name":"Novika::Resolver::Manifest::Absent","name":"Absent","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the absence of a manifest.","summary":"Represents the absence of a manifest.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Manifest/App","path":"Novika/Resolver/Manifest/App.html","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1760,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.app\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents an application manifest.","summary":"Represents an application manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an application manifest object if\n*path* contains an application manifest. Otherwise,\nreturns nil.","summary":"Creates and returns an application manifest object if path contains an application manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1777,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new application manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new application manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1771,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1766,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1783,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","path":"Novika/Resolver/Manifest/CommentPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1520,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off comments from manifest content.","summary":"Strips off comments from manifest content.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1525,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"FlagPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1521,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/^\\s*#[^\\n]*/m, \"\")"}}]},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","path":"Novika/Resolver/Manifest/FlagPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1532,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Expands expressions such as `[windows, ... => dll, so]`, if found\nin manifest content: substitutes each with the appropriate value.","summary":"Expands expressions such as `[windows, ...
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1554,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":""}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1533,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/\\[([^\\]]+)\\]/) do |exp|\n case $~[1]\n when /^\\s*((?:\\w|\\.\\.\\.)+(?:\\s*,\\s*(?:\\w|\\.\\.\\.)+)*)\\s*\\|\\s*(\\w+(?:\\s*,\\s*\\w+)*)$/\n flags = $~[1].split(/\\s*,\\s*/, remove_empty: true)\n blocks = $~[2].split(/\\s*,\\s*/, remove_empty: true)\n if flags.size == blocks.size\n else\n next exp\n end\n branches = Hash.zip(flags, blocks)\n branch = branches[\"...\"]?\n @root.each_set_flag do |flag|\n if block = branches[flag]?\n else\n next\n end\n break branch = block\n end\n branch || \"\"\n end\nend"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Lib","path":"Novika/Resolver/Manifest/Lib.html","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1793,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.lib\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents a library manifest.","summary":"Represents a library manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an library manifest object if *path*\ncontains a library manifest, returns nil.","summary":"Creates and returns an library manifest object if path contains a library manifest, returns nil.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1809,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new library manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new library manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1804,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1799,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}}]},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","path":"Novika/Resolver/Manifest/PreamblePreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1491,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off manifest preamble and makes the manifest acknowledge it.","summary":"Strips off manifest preamble and makes the manifest acknowledge it.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1514,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"CommentPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1492,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"open = content.match(/^\\s*---\\s*$/m)\nif open\nelse\n return content\nend\nclose = content.match(/^\\s*---\\s*$/m, pos: open.end)\nrange_outer = open.begin...(close ? close.end : content.size)\nrange_inner = open.end...(close ? close.begin : content.size)\npreamble = content[range_inner].strip\n@manifest.on_preamble(@root, @group, preamble)\ncontent.sub(range_outer, \"\")\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","path":"Novika/Resolver/Manifest/Preprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1468,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Base class for several *subtractive preprocessors* for\nmanifest content.\n\nThey are *subtractive* because they *discard* stuff, at\nleast from the original content's point of view.\n\nAlso, one might say *subtractive preprocessors* match \"edges\"\nrather than by \"structure\". If done repeatedly and so to speak\nrecursively, one might finally arrive at \"grains\" coarse enough\nfor \"real\" content analysis. In this sense subtractive\npreprocessors are \"noise-friendly\" -- and that's just what we\nwant. Moreover, they may consider each other \"noise\", too.\n\nPreprocessors can be chained, and can programmaticaly select\nthe next preprocessor (or become the terminal one) in `next?`.","summary":"Base class for several subtractive preprocessors for manifest content.
","constructors":[{"html_id":"new(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","location":{"filename":"src/novika/resolver.cr","line_number":1469,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, group, manifest)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1485,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"PreamblePreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1479,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Present","path":"Novika/Resolver/Manifest/Present.html","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present","abstract":false,"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1599,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DIRECTIVES","name":"DIRECTIVES","value":"Set {\"noinherit\", \"nolayout\"}","doc":"A set of allowed manifest directives.","summary":"A set of allowed manifest directives.
"}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/App","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App"},{"html_id":"novika/Novika/Resolver/Manifest/Lib","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the presence of a manifest.","summary":"Represents the presence of a manifest.
","instance_methods":[{"html_id":"directory-instance-method","name":"directory","doc":"Returns a path that points to the directory where this\nmanifest is located.","summary":"Returns a path that points to the directory where this manifest is located.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1607,"url":null},"def":{"name":"directory","visibility":"Public","body":"@path.parent"}},{"html_id":"on_preamble(root:RunnableRoot,group:RunnableGroup,preamble:String)-instance-method","name":"on_preamble","doc":"Invoked when a preamble is found in this manifest. *preamble*\nis the inner content of the preamble (i.e. without `---`s).","summary":"Invoked when a preamble is found in this manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","args_html":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":1613,"url":null},"def":{"name":"on_preamble","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"visibility":"Public","body":"root.assign(group, preamble: preamble)"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1726,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: false, ancestor: self)\ncontainer.append(population)\nroot.assign(origin, container: population)\nmanifests = [] of ::Tuple(Manifest::Present, RunnableGroup, Array(String), Array(String), Bool)\nclimb(root, origin) do |manifest, group, isself|\n directives, fragments = ((manifest.preprocessed_content(root, group)).split(/\\s+/, remove_empty: true)).partition(&.in?(DIRECTIVES))\n manifests << {manifest, group, directives, fragments, !isself}\n if directives.includes?(\"noinherit\")\n break\n end\nend\nmanifests.reverse_each do |manifest, group, directives, fragments, inherited|\n population = manifest.process(root, group, population, directives, fragments, inherited)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1754,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Manifest[\") << @path) << \"]\""}}]}]},{"html_id":"novika/Novika/Resolver/MoreThanOneAppError","path":"Novika/Resolver/MoreThanOneAppError.html","kind":"class","full_name":"Novika::Resolver::MoreThanOneAppError","name":"MoreThanOneAppError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":119,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when the user tries to run more than one app.","summary":"Raised when the user tries to run more than one app.
","constructors":[{"html_id":"new(apps:Array(RunnableGroup))-class-method","name":"new","abstract":false,"args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"args_string":"(apps : Array(RunnableGroup))","args_html":"(apps : Array(RunnableGroup))","location":{"filename":"src/novika/resolver.cr","line_number":124,"url":null},"def":{"name":"new","args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(apps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"apps:Array(Novika::Resolver::RunnableGroup)-instance-method","name":"apps","doc":"Returns the array of apps in the response; more than of\nthem there.","summary":"Returns the array of apps in the response; more than of them there.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":122,"url":null},"def":{"name":"apps","visibility":"Public","body":"@apps"}}]},{"html_id":"novika/Novika/Resolver/Permission","path":"Novika/Resolver/Permission.html","kind":"enum","full_name":"Novika::Resolver::Permission","name":"Permission","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":50,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Undecided","name":"Undecided","value":"0"},{"id":"Allowed","name":"Allowed","value":"1"},{"id":"Denied","name":"Denied","value":"2"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents the permission state of a dependency.","summary":"Represents the permission state of a dependency.
","instance_methods":[{"html_id":"allowed?-instance-method","name":"allowed?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":52,"url":null},"def":{"name":"allowed?","visibility":"Public","body":"self == Allowed"}},{"html_id":"denied?-instance-method","name":"denied?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":53,"url":null},"def":{"name":"denied?","visibility":"Public","body":"self == Denied"}},{"html_id":"undecided?-instance-method","name":"undecided?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":51,"url":null},"def":{"name":"undecided?","visibility":"Public","body":"self == Undecided"}}]},{"html_id":"novika/Novika/Resolver/PermissionServer","path":"Novika/Resolver/PermissionServer.html","kind":"class","full_name":"Novika::Resolver::PermissionServer","name":"PermissionServer","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2715,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Permission server allows to prompt the user for permissions, and\nsave the user's choices in the *permissions file*.","summary":"Permission server allows to prompt the user for permissions, and save the user's choices in the permissions file.
","constructors":[{"html_id":"new(env:RunnableEnvironment,explicit:Array(RunnableQuery))-class-method","name":"new","doc":"Creates a new permission server.\n\n*resolver* is the resolver with which this server will talk about\nresolver-related things.\n\n*explicit* is a list of explicit runnable queries. An explicit\nquery is that query which was specified manually, e.g. via the\narguments. In other words, the user had to *type it* here and\nnow rather than \"acquire\" it from somewhere unknowingly. This\nlist is mainly used to be less annoying when it comes to asking\nfor permissions.","summary":"Creates a new permission server.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"args_string":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","args_html":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","location":{"filename":"src/novika/resolver.cr","line_number":2729,"url":null},"def":{"name":"new","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(env, explicit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"answer(answer:String)-instance-method","name":"answer","doc":"Prints *answer* so that it can be seen by the user.","summary":"Prints answer so that it can be seen by the user.
","abstract":false,"args":[{"name":"answer","external_name":"answer","restriction":"String"}],"args_string":"(answer : String)","args_html":"(answer : String)","location":{"filename":"src/novika/resolver.cr","line_number":2797,"url":null},"def":{"name":"answer","args":[{"name":"answer","external_name":"answer","restriction":"String"}],"visibility":"Public","body":"@answer.call(answer)"}},{"html_id":"ask?(question:String):String|Nil-instance-method","name":"ask?","doc":"Asks user a *question*, and returns the answer or an empty\nstring in case EOF was received.","summary":"Asks user a question, and returns the answer or an empty string in case EOF was received.
","abstract":false,"args":[{"name":"question","external_name":"question","restriction":"String"}],"args_string":"(question : String) : String | Nil","args_html":"(question : String) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2792,"url":null},"def":{"name":"ask?","args":[{"name":"question","external_name":"question","restriction":"String"}],"return_type":"String | ::Nil","visibility":"Public","body":"@ask.call(question)"}},{"html_id":"brief(dependency:RunnableCapability):String-instance-method","name":"brief","doc":"Returns a brief description of *dependency*.","summary":"Returns a brief description of dependency.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"args_string":"(dependency : RunnableCapability) : String","args_html":"(dependency : RunnableCapability) : String","location":{"filename":"src/novika/resolver.cr","line_number":2786,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"return_type":"String","visibility":"Public","body":"@env.brief(dependency)"}},{"html_id":"explicit?(dependency:Resolution::Dependency):Bool-instance-method","name":"explicit?","doc":"Returns whether *dependency* is explicit.\n\nThis is done by checking whether the *first* `RunnableQuery`\nancestor of *dependency* is in the explicit list. See `new`\nto learn what \"explicitness\" means.","summary":"Returns whether dependency is explicit.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency) : Bool","args_html":"(dependency : Resolution::Dependency) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":2806,"url":null},"def":{"name":"explicit?","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"return_type":"Bool","visibility":"Public","body":"dependency.each_ancestor do |ancestor|\n if ancestor.is_a?(RunnableQuery)\n else\n next\n end\n return @explicit.any?(&.same?(ancestor))\nend\nfalse\n"}},{"html_id":"load-instance-method","name":"load","doc":"Fills the permissions hash with saved permissions.","summary":"Fills the permissions hash with saved permissions.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2746,"url":null},"def":{"name":"load","visibility":"Public","body":"if permissions = @env.permissions?\nelse\n return\nend\ncontent, path = permissions\nbegin\n CSV.each_row(content.strip) do |__temp_70|\n dependent, dependency, state = __temp_70\n if id = state.to_i?\n else\n next\n end\n if permission = Permission.from_value?(id)\n else\n next\n end\n @permissions[{dependent, dependency}] = permission\n end\nrescue IndexError\n raise(ResolverError.new(\"malformed 'permissions' file: #{path}\"))\nend\n"}},{"html_id":"query_permission?(container:RunnableContainer,dependency:Resolution::Dependency)-instance-method","name":"query_permission?","doc":"Queries (possibly prompts) and returns the permission state of\n*dependency* for the given *container*.","summary":"Queries (possibly prompts) and returns the permission state of dependency for the given container.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(container : RunnableContainer, dependency : Resolution::Dependency)","args_html":"(container : RunnableContainer, dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":2817,"url":null},"def":{"name":"query_permission?","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"@permissions.put_if_absent(dependency.signature(container)) do\n dependency.prompt?(self, for: container)\nend"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Flushes the internal permissions store to disk.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2768,"url":null},"def":{"name":"save","visibility":"Public","body":"if @permissions.values.any?(&.allowed?)\nelse\n return\nend\n@env.permissions do |io|\n CSV.build(io) do |builder|\n @permissions.each do |__temp_71, permission|\n dependent, dependency = __temp_71\n if permission.undecided? || permission.denied?\n next\n end\n builder.row(dependent, dependency, permission.to_i)\n end\n end\nend\n"}}]},{"html_id":"novika/Novika/Resolver/Query","path":"Novika/Resolver/Query.html","kind":"alias","full_name":"Novika::Resolver::Query","name":"Query","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":1047,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"(Path | String)","aliased_html":"Path | String","const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}},{"html_id":"novika/Novika/Resolver/Resolution","path":"Novika/Resolver/Resolution.html","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":356,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Obtaining a set of resolution objects from an initial list of\nqueries is the central goal of the resolver.\n\nA resolution object points to a script and lists its dependencies.\nFurthermore, a resolution object also stores its so-called\nrunnable *sources*, which are `RunnableScript` objects that it\nwas derived from.","summary":"Obtaining a set of resolution objects from an initial list of queries is the central goal of the resolver.
","constructors":[{"html_id":"new(script:RunnableScript,deps:Set(Dependency))-class-method","name":"new","doc":"Initializes a runnable resolution for the given runnable *script* and a\nset of resolution dependency objects *deps*.","summary":"Initializes a runnable resolution for the given runnable script and a set of resolution dependency objects deps.
","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"args_string":"(script : RunnableScript, deps : Set(Dependency))","args_html":"(script : RunnableScript, deps : Set(Dependency))","location":{"filename":"src/novika/resolver.cr","line_number":362,"url":null},"def":{"name":"new","args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(script, deps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two resolutions are considered equal when they point to the\nsame script on the disk.","summary":"Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath:Path-instance-method","name":"abspath","doc":"Returns the absolute path to this resolution.","summary":"Returns the absolute path to this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":358,"url":null},"def":{"name":"abspath","return_type":"Path","visibility":"Public","body":"@abspath"}},{"html_id":"dump!(deps:Set(Dependency)|Nil=nil,sources:Array(RunnableScript)|Nil=nil)-instance-method","name":"dump!","doc":"Appends the dependencies of this resolution to *deps*, source scripts\nof this resolution to *sources*.","summary":"Appends the dependencies of this resolution to deps, source scripts of this resolution to sources.
","abstract":false,"args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"args_string":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","args_html":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":369,"url":null},"def":{"name":"dump!","args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"visibility":"Public","body":"deps.try(&.concat(@deps))\nsources.try(&.concat(@sources))\n"}},{"html_id":"each_dependency(&:Dependency->)-instance-method","name":"each_dependency","doc":"Yields dependencies of this resolution.","summary":"Yields dependencies of this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":382,"url":null},"def":{"name":"each_dependency","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Dependency ->)"},"visibility":"Public","body":"@deps.each do |dep|\n yield dep\nend"}},{"html_id":"each_source_group(&:RunnableGroup->)-instance-method","name":"each_source_group","doc":"Yields all `RunnableGroup`s from the ancestry of source scripts of\nthis resolution. Does not yield the same group twice (sameness is\ndetermined with `==`/hash).","summary":"Yields all RunnableGroup
s from the ancestry of source scripts of this resolution.
Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"merge!(other:Resolution):self-instance-method","name":"merge!","doc":"Mutably merges this and *other* resolutions.","summary":"Mutably merges this and other resolutions.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"args_string":"(other : Resolution) : self","args_html":"(other : Resolution) : self","location":{"filename":"src/novika/resolver.cr","line_number":375,"url":null},"def":{"name":"merge!","args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"return_type":"self","visibility":"Public","body":"other.dump!(@deps, @sources)\nself\n"}},{"html_id":"run(engine:Engine,script_block:Block):Block-instance-method","name":"run","doc":"Opens an instance of *script block* (aka *file block*) with *engine*.\n\nExtends *script block* itself with `__path__`, `__file__`; therefore,\nmutates *script block*.\n\nReturns the script block instance after evaluation.","summary":"Opens an instance of script block (aka file block) with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"args_string":"(engine : Engine, script_block : Block) : Block","args_html":"(engine : Engine, script_block : Block) : Block","location":{"filename":"src/novika/resolver.cr","line_number":408,"url":null},"def":{"name":"run","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"return_type":"Block","visibility":"Public","body":"script_block.at(Word.new(\"__path__\"), Quote.new(@abspath.parent.to_s))\nscript_block.at(Word.new(\"__file__\"), Quote.new(@abspath.to_s))\ninstance = script_block.instance\ninstance.schedule!(engine, stack: Block.new)\nengine.exhaust\ninstance\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":420,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(((((io << @abspath) << \" (\") << (@deps.join(\", \"))) << \") ← [\") << (@sources.join(\" | \"))) << \"]\""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","path":"Novika/Resolver/Resolution/Dependency.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":430,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution"},"doc":"Includers can be listed as dependencies in a `Resolution`.","summary":"Includers can be listed as dependencies in a Resolution
.
Sets the permission state of this dependency to "allowed".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":459,"url":null},"def":{"name":"allow","visibility":"Public","body":"@permission = Permission::Allowed"}},{"html_id":"allowed?:Bool-instance-method","name":"allowed?","doc":"Returns whether this dependency is allowed. Depends on the permission\nstate of this dependency, which is normally set by `PermissionServer`.","summary":"Returns whether this dependency is allowed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":454,"url":null},"def":{"name":"allowed?","return_type":"Bool","visibility":"Public","body":"@permission.allowed?"}},{"html_id":"deny-instance-method","name":"deny","doc":"Sets the permission state of this dependency to \"denied\".","summary":"Sets the permission state of this dependency to "denied".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":464,"url":null},"def":{"name":"deny","visibility":"Public","body":"@permission = Permission::Denied"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is #allowed?
, enables it in the given capability collection caps.
Promps the user for whether the use of this dependency should be allowed in container's RunnableEnvironment
.
Communicates with the given permission server in order to determine whether the use of this dependency should be allowed or denied to container.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer)","args_html":"(server : PermissionServer, *, for container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":471,"url":null},"def":{"name":"request","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"visibility":"Public","body":"if @permission.undecided?\nelse\n return\nend\nif server.explicit?(self)\n @permission = Permission::Allowed\n return\nend\n@permission = server.query_permission?(container, self)\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":439,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","path":"Novika/Resolver/Resolution/Dependency/DefaultPrompt.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":488,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},"doc":"Provides the includer with an implementation of `Dependency#prompt?`\nin turn requiring it to simply specify a `label`.","summary":"Provides the includer with an implementation of Dependency#prompt?
in turn requiring it to simply specify a #label
.
Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":513,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":""}},{"html_id":"envelope(container:RunnableContainer)-instance-method","name":"envelope","doc":"Returns the string representation of this dependency's envelope\n(its container so to speak). The runtime (not specialize-time!)\n*container* is provided as a fallback option (albeit a *very bad one*).","summary":"Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":501,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":true,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":496,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":""}},{"html_id":"prompt?(server:PermissionServer,*,forcontainer:RunnableContainer):Permission-instance-method","name":"prompt?","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","args_html":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","location":{"filename":"src/novika/resolver.cr","line_number":516,"url":null},"def":{"name":"prompt?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"return_type":"Permission","visibility":"Public","body":"label = label(server)\nprompt = String.build do |io|\n (((io << \"Allow \") << (envelope(container))) << \" to load \") << label\n if description = description?(server)\n (io << \", which \") << description\n end\n ((((io << \"? [\") << \"y\".colorize.underline) << \" yes | \") << \"?\".colorize.underline) << \" help |Represents the signature of a dependency.
"}]}]},{"html_id":"novika/Novika/Resolver/ResolutionSet","path":"Novika/Resolver/ResolutionSet.html","kind":"struct","full_name":"Novika::Resolver::ResolutionSet","name":"ResolutionSet","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":553,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents an ordered set of `Resolution` objects.","summary":"Represents an ordered set of Resolution
objects.
Returns whether all resolutions from this set come from the same RunnableGroup
.
Returns whether all resolutions in this set come from the same application RunnableGroup
.
Appends a resolution to this set.
","abstract":false,"args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"args_string":"(resolution : Resolution)","args_html":"(resolution : Resolution)","location":{"filename":"src/novika/resolver.cr","line_number":571,"url":null},"def":{"name":"append","args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"visibility":"Public","body":"if index = @resolutions.index(resolution)\n @resolutions[index] = @resolutions[index].merge!(resolution)\n return\nend\n@resolutions << resolution\n"}},{"html_id":"append(set:ResolutionSet)-instance-method","name":"append","doc":"Appends an entire resolution *set* at once. Essentially the same\nas appending each `Resolution` from *set*.","summary":"Appends an entire resolution set at once.
","abstract":false,"args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"args_string":"(set : ResolutionSet)","args_html":"(set : ResolutionSet)","location":{"filename":"src/novika/resolver.cr","line_number":582,"url":null},"def":{"name":"append","args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"visibility":"Public","body":"set.each do |resolution|\n append(resolution)\nend"}},{"html_id":"each(&:Resolution->)-instance-method","name":"each","doc":"Yields resolutions in this resolution set.","summary":"Yields resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":587,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Resolution ->)"},"visibility":"Public","body":"@resolutions.each do |resolution|\n yield resolution\nend"}},{"html_id":"each_designation(root:RunnableRoot,&:Designation->)-instance-method","name":"each_designation","doc":"Yields environment designations for the given runnable *root*.\n\n*Environment designations* are resolution sets coupled to an\nenvironment. That is, an environment designation is a \"token\"\nstating *this* environment should handle resolutions out of\n*that* resolution set.","summary":"Yields environment designations for the given runnable root.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"args_string":"(root : RunnableRoot, & : Designation -> )","args_html":"(root : RunnableRoot, & : Designation -> )","location":{"filename":"src/novika/resolver.cr","line_number":713,"url":null},"def":{"name":"each_designation","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"visited = Set(Resolution).new\ndesignations = {} of RunnableEnvironment => ResolutionSet\neach_group do |group, resolution|\n if resolution.in?(visited)\n next\n end\n if container = root.containerof?(group)\n else\n return\n end\n set = designations.put_if_absent(container.env) do\n ResolutionSet.new\n end\n set.append(resolution)\n visited << resolution\nend\ndefault = designations.put_if_absent(root.default_env) do\n ResolutionSet.new\nend\neach do |resolution|\n if resolution.in?(visited)\n next\n end\n default.append(resolution)\nend\ndesignations.each do |env, set|\n yield env.designate(set)\nend\n"}},{"html_id":"each_group(&:RunnableGroup,Resolution->)-instance-method","name":"each_group","doc":"Yields all `RunnableGroup` objects that have contributed to this\nresolution set. The yielded groups can repeat.","summary":"Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields preambles of unique application and library RunnableGroup
s that have contributed to this resolution set, as well as the groups themselves.
Yields unique application RunnableGroup
s that have contributed to this resolution set.
Yields all unique Resolution::Dependency
objects in this resolution set.
Yields each unique Resolution::Dependency
object followed by a ResolutionSet
of its dependents.
Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields unique library RunnableGroup
s that have contributed to this resolution set.
Returns whether there are no resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":564,"url":null},"def":{"name":"empty?","visibility":"Public","body":"size.zero?"}},{"html_id":"groups:Array(RunnableGroup)-instance-method","name":"groups","doc":"Returns an array of `RunnableGroup` objects that have contributed\nto this resolution set. Objects in the array can repeat.","summary":"Returns an array of RunnableGroup
objects that have contributed to this resolution set.
Returns whether all resolutions in this set come from the same library RunnableGroup
.
Returns the amount of resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":559,"url":null},"def":{"name":"size","visibility":"Public","body":"@resolutions.size"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":751,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(\"ResolutionSet\")\neach do |resolution|\n (io << \" | \") << resolution\n io.puts\nend\n"}},{"html_id":"unique_apps:Array(RunnableGroup)-instance-method","name":"unique_apps","doc":"Returns an array of unique application `RunnableGroup`s that have\ncontributed to this resolution set.","summary":"Returns an array of unique application RunnableGroup
s that have contributed to this resolution set.
Base class for resolver and resolver-related exceptions.
"},{"html_id":"novika/Novika/Resolver/Response","path":"Novika/Resolver/Response.html","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A mutable response object which is tightly coupled to `Session`,\ndesigned for reuse throughout multiple (rounds of) queries to\nthe latter.","summary":"A mutable response object which is tightly coupled to Session
, designed for reuse throughout multiple (rounds of) queries to the latter.
Joins all accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2874,"url":null},"def":{"name":"accepted_set","return_type":"ResolutionSet","visibility":"Public","body":"accepted_set = ResolutionSet.new\n@accepted.each do |__temp_72|\n _, set = __temp_72\n accepted_set.append(set)\nend\naccepted_set\n"}},{"html_id":"drop_wish(&:RunnableQuery->)-instance-method","name":"drop_wish","doc":"Yields wishes from this response's wishlist, then clears\nthe wishlist (so that this response can perhaps be reused).","summary":"Yields wishes from this response's wishlist, then clears the wishlist (so that this response can perhaps be reused).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2908,"url":null},"def":{"name":"drop_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishlist.each do |wish|\n yield wish\nend\n@wishlist.clear\n"}},{"html_id":"each_ignored_runnable(&:Runnable->)-instance-method","name":"each_ignored_runnable","doc":"Yields runnables that were ignored.","summary":"Yields runnables that were ignored.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2902,"url":null},"def":{"name":"each_ignored_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@ignored.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_rejected_runnable(&:Runnable->)-instance-method","name":"each_rejected_runnable","doc":"Yields runnables that were rejected.","summary":"Yields runnables that were rejected.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2897,"url":null},"def":{"name":"each_rejected_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@rejected.each do |runnable|\n yield runnable\nend"}},{"html_id":"queried_for_set:ResolutionSet-instance-method","name":"queried_for_set","doc":"Joins all *queried-for* accepted resolution sets of this response\ninto one large resolution set, and returns it.\n\nSee `AcceptionRoute` to learn about the difference between\n*queried-for* and *wished* routes of set acception.","summary":"Joins all queried-for accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2887,"url":null},"def":{"name":"queried_for_set","return_type":"ResolutionSet","visibility":"Public","body":"queried_for_set = ResolutionSet.new\n@accepted.each do |__temp_73|\n route, set = __temp_73\n if route.query?\n else\n next\n end\n queried_for_set.append(set)\nend\nqueried_for_set\n"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Returns whether this response is successful, in that it has no rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2864,"url":null},"def":{"name":"successful?","return_type":"Bool","visibility":"Public","body":"@rejected.empty?"}},{"html_id":"wishless?:Bool-instance-method","name":"wishless?","doc":"Returns `true` if this response does not \"wish\" to make any more\nqueries before its accepted sets can be inspected.","summary":"Returns true
if this response does not "wish" to make any more queries before its accepted sets can be inspected.
The resolution set was accepted due to a wish: some runnable out there "wished" that runnables from the set were there, and here they are.
"},{"id":"Query","name":"Query","value":"1","doc":"The resolution set was explicitly mentioned by the user\nsomewhere (queried for).","summary":"The resolution set was explicitly mentioned by the user somewhere (queried for).
"}],"namespace":{"html_id":"novika/Novika/Resolver/Response","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response"},"doc":"Represents the way a resolution set was accepted.","summary":"Represents the way a resolution set was accepted.
","instance_methods":[{"html_id":"query?-instance-method","name":"query?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2839,"url":null},"def":{"name":"query?","visibility":"Public","body":"self == Query"}},{"html_id":"wish?-instance-method","name":"wish?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2835,"url":null},"def":{"name":"wish?","visibility":"Public","body":"self == Wish"}}]}]},{"html_id":"novika/Novika/Resolver/ResponseRejectedError","path":"Novika/Resolver/ResponseRejectedError.html","kind":"class","full_name":"Novika::Resolver::ResponseRejectedError","name":"ResponseRejectedError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":109,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when there are rejected runnables in a response.","summary":"Raised when there are rejected runnables in a response.
","constructors":[{"html_id":"new(response:Response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Response"}],"args_string":"(response : Response)","args_html":"(response : Response)","location":{"filename":"src/novika/resolver.cr","line_number":113,"url":null},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Response"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"response:Novika::Resolver::Response-instance-method","name":"response","doc":"Returns the response which contains some rejected runnables.","summary":"Returns the response which contains some rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":111,"url":null},"def":{"name":"response","visibility":"Public","body":"@response"}}]},{"html_id":"novika/Novika/Resolver/Runnable","path":"Novika/Resolver/Runnable.html","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":919,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"subclasses":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableContainer","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of all runnables.\n\nThe main basic property of all runnables is that they can be\n*rewritten* into other runnables, oftentimes of a more specific\nkind. Additionally, runnable objects are the head of their history\nlinked list, allowing clients to observe how the runnable of\ninterest came to be.","summary":"Base class of all runnables.
","constructors":[{"html_id":"new(ancestor:Ancestor|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"args_string":"(ancestor : Ancestor | Nil = nil)","args_html":"(ancestor : Ancestor | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":959,"url":null},"def":{"name":"new","args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this runnable, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this runnable, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":957,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"ancestors:Array(Ancestor)-instance-method","name":"ancestors","doc":"Returns an array of ancestors of this runnable, starting from\nthe most recent ancestor and ending with the oldest one.","summary":"Returns an array of ancestors of this runnable, starting from the most recent ancestor and ending with the oldest one.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":976,"url":null},"def":{"name":"ancestors","return_type":"Array(Ancestor)","visibility":"Public","body":"ancestors = [] of Ancestor\neach_ancestor do |ancestor|\n ancestors << ancestor\nend\nancestors\n"}},{"html_id":"backtrace(io:IO,indent:Int32=0,annex:String|Nil=nil)-instance-method","name":"backtrace","doc":"Appends ancestors of this runnable (its \"history\") to *io*.\n\n*indent* can be used to specify the amount of whitespace\npreceding each line.\n\n*annex* is the additional bit of text displayed below the\nbacktrace. For instance, in case of an error, it can contain\nthe error message.","summary":"Appends ancestors of this runnable (its "history") to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"args_string":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","args_html":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":992,"url":null},"def":{"name":"backtrace","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"visibility":"Public","body":"backtrace = ancestors.reverse\nbacktrace << self\nio << \" ┬\\n\"\nws = \" \" * indent\nbacktrace.each do |runnable|\n (io << ws) << \"╿ in \"\n if runnable.is_a?(RunnableContainer)\n content = String.build do |inner|\n runnable.to_s(inner, lead: 0, indent: indent + 2)\n end\n skip = true\n content.each_line(chomp: true) do |line|\n if skip\n io.puts(line)\n skip = false\n next\n end\n ((io << \" │\") << line) << '\\n'\n end\n else\n (io << runnable) << '\\n'\n end\nend\nif annex\nelse\n return\nend\n((io << \" │\\n ╰┴─ \") << annex) << '\\n'\n"}},{"html_id":"backtrace(*args,**kwargs,&:IO->)-instance-method","name":"backtrace","doc":"Yields an `IO` where you can write the *annex*, otherwise the\nsame as `backtrace`.","summary":"Yields an IO
where you can write the annex, otherwise the same as #backtrace
.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1033,"url":null},"def":{"name":"constituents","return_type":"Array(Runnable)","visibility":"Public","body":"[self] of Runnable"}},{"html_id":"each_ancestor(&:Ancestor->)-instance-method","name":"each_ancestor","doc":"Yields ancestors of this runnable.\n\nBy tracing the ancestry of `self`, you are effectively exploring\nhow it came to be.","summary":"Yields ancestors of this runnable.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":966,"url":null},"def":{"name":"each_ancestor","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Ancestor ->)"},"visibility":"Public","body":"runnable = @ancestor\nwhile runnable\n yield runnable\n runnable = runnable.ancestor?\nend\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1044,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","path":"Novika/Resolver/Runnable/Ancestor.html","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":921,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a `Runnable` ancestor.","summary":"Represents a Runnable
ancestor.
Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":true,"location":{"filename":"src/novika/resolver.cr","line_number":924,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","path":"Novika/Resolver/Runnable/HasDatum.html","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum(T)","name":"HasDatum","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":944,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a runnable with datum of type *T*. This module assigns\nno intrinsic meaning to the word \"datum\" or to its value; includers\nare free to choose that, as well as the type *T*.\n\nThe only real consequence of including this module is that equality\nand hash methods will be defined. These methods will delegate\ncomparison/hashing to the datum(s) at hand.","summary":"Represents a runnable with datum of type T.
","instance_methods":[{"html_id":"==(other:T)-instance-method","name":"==","doc":"Returns whether the datum of this runnable is equal to *other*.","summary":"Returns whether the datum of this runnable is equal to other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"T"}],"args_string":"(other : T)","args_html":"(other : T)","location":{"filename":"src/novika/resolver.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"T"}],"visibility":"Public","body":"@datum == other"}},{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @datum == (other.@datum)\nelse\n return false\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @datum.hash(hasher)\nhasher\n"}}]},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","path":"Novika/Resolver/Runnable/Terminal.html","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":931,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a terminal (as in *terminate*) runnable, that is,\na runnable that cannot be rewritten any further.","summary":"Represents a terminal (as in terminate) runnable, that is, a runnable that cannot be rewritten any further.
","instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":932,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.append(self)"}}]}]},{"html_id":"novika/Novika/Resolver/RunnableCapability","path":"Novika/Resolver/RunnableCapability.html","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1116,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Capabilities represent the requirements of a Novika script, library,\nor application, regarding language features that are needed in order\nfor that script, library, or application to properly work.","summary":"Capabilities represent the requirements of a Novika script, library, or application, regarding language features that are needed in order for that script, library, or application to properly work.
","constructors":[{"html_id":"new(datum:String,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : String, ancestor = nil)","args_html":"(datum : String, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1122,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"description?(server:PermissionServer):String|Nil-instance-method","name":"description?","doc":"Returns a user-friendly description of this dependency, or nil\nif none can be given. The returned description should be suitable\nfor displaying to the user in a prompt, and should read well after\n\"which\", as in \"which [exposes this and that]\", \"which [allows\nthis and that]\", etc., where words in brackets are those of\nthe description.\n\n*server* is the server that will then use the description in\none way or another, in case it is present. You may also choose\nto derive the description with *server*'s help.","summary":"Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1144,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":"server.brief(self)"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1126,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1140,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"capability #{@datum.colorize.bold}\""}},{"html_id":"purpose(*,incaps:CapabilityCollection)-instance-method","name":"purpose","doc":"Returns the purpose of this capability in the given capability\ncollection *caps*.","summary":"Returns the purpose of this capability in the given capability collection caps.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"args_string":"(*, in caps : CapabilityCollection)","args_html":"(*, in caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":1150,"url":null},"def":{"name":"purpose","args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"splat_index":0,"visibility":"Public","body":"if cls = caps.get_capability_class?(@datum)\nelse\n raise(\"BUG: capability runnable for which there is no capability class\")\nend\ncls.purpose\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1132,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted capability\")\nend\n{envelope.abspath.to_s, @datum}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1165,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1171,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Capability[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableContainer","path":"Novika/Resolver/RunnableContainer.html","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2017,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable container is an *ordered*, arbitrarily *filtered*\ncollection of runnables - and a runnable itself. It holds and\nadvances (through rewriting) a *generation* of runnables.","summary":"A runnable container is an ordered, arbitrarily filtered collection of runnables - and a runnable itself.
","constructors":[{"html_id":"new(root:RunnableRoot,dir:Path,env:RunnableEnvironment,parent:RunnableContainer|Nil=nil,transparent:Bool=false,ancestor=nil)-class-method","name":"new","doc":"Initializes a new runnable container for the given *dir*ectory.\n\n*parent* is the parent runnable container. You don't normally need\nto specify it. Prefer to call `child` on the parent instead.\n\n*transparent* specifies whether the container is transparent,\nsee `transparent?`.","summary":"Initializes a new runnable container for the given directory.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","args_html":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":2049,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, dir, env, parent, transparent, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path of the directory of this container.","summary":"Returns the absolute path of the directory of this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2165,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @dir.absolute?\nelse\n raise(\"BUG: container dir path is not an absolute path\")\nend\n@dir\n"}},{"html_id":"allow?(warn=false,&filter:Runnable->Bool)-instance-method","name":"allow?","doc":"Introduces a *filter* for the constituent runnables of this\ncontainer. *filter* should decide whether to accept (true)\nor reject (false) a runnable.\n\n*warn* specifies whether the `RunnableIgnored` signal should be\nsent if *filter* rejects a runnable.","summary":"Introduces a filter for the constituent runnables of this container.
","abstract":false,"args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"args_string":"(warn = false, &filter : Runnable -> Bool)","args_html":"(warn = false, &filter : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2150,"url":null},"def":{"name":"allow?","args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"yields":1,"block_arity":1,"block_arg":{"name":"filter","external_name":"filter","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"push_filter(Filter.new(filter, warn))"}},{"html_id":"append(runnable:Runnable)-instance-method","name":"append","doc":"Inserts *runnable* after all other runnables in this container.","summary":"Inserts runnable after all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2108,"url":null},"def":{"name":"append","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables << runnable"}},{"html_id":"append(runnables:Array(Runnable))-instance-method","name":"append","doc":"Inserts the entire array of *runnables* after all other runnables\nin this container.","summary":"Inserts the entire array of runnables after all other runnables in this container.
","abstract":false,"args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"args_string":"(runnables : Array(Runnable))","args_html":"(runnables : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2114,"url":null},"def":{"name":"append","args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"visibility":"Public","body":"@runnables.concat(runnables)"}},{"html_id":"can_contain?(runnable:Runnable)-instance-method","name":"can_contain?","doc":"Returns whether this container's filters allow it to contain\nthe given *runnable*.","summary":"Returns whether this container's filters allow it to contain the given runnable.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2156,"url":null},"def":{"name":"can_contain?","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"each_filter do |filter|\n if filter.call(runnable)\n else\n return false\n end\nend\ntrue\n"}},{"html_id":"child(dir=@dir,ancestor=self,*,transparent:Bool)-instance-method","name":"child","doc":"Builds and returns a child of this container.\n\nOptionally, the *dir*ectory of the child can be provided.\nOtherwise, the directory of this container will be used.\n\nAdditionally, you can specify whether the child should be\n*transparent* (see `transparent?`).","summary":"Builds and returns a child of this container.
","abstract":false,"args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"args_string":"(dir = @dir, ancestor = self, *, transparent : Bool)","args_html":"(dir = @dir, ancestor = self, *, transparent : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2379,"url":null},"def":{"name":"child","args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"splat_index":2,"visibility":"Public","body":"RunnableContainer.new(@root, dir, env: @root.defenv(@root.disk.env?(dir)), parent: self, ancestor: ancestor, transparent: transparent)"}},{"html_id":"classify?(datum:Path,ancestor:Ancestor|Nil):Runnable|Nil-instance-method","name":"classify?","doc":"Creates a `RunnableDir`, `RunnableScript`, or `RunnableSharedObject`\ndepending on what *datum* points to and on its extension.\n\n*ancestor* is set as the ancestor of the created runnable.\n\nReturns nil if *datum* does not exist, or if there is no\nappropriate classification.","summary":"Creates a RunnableDir
, RunnableScript
, or RunnableSharedObject
depending on what datum points to and on its extension.
If datum is a capability, creates and returns an appropriate RunnableCapability
object.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2103,"url":null},"def":{"name":"constituents","visibility":"Public","body":"transparent? ? @runnables : super()"}},{"html_id":"each(&:Runnable->)-instance-method","name":"each","doc":"Yields constituent runnables.","summary":"Yields constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2135,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@runnables.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_path(fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"args_string":"(fn : Path -> )","args_html":"(fn : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2238,"url":null},"def":{"name":"each_path","args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"visibility":"Public","body":"@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n fn.call(runnable.abspath)\n runnable.each_path(fn)\n else\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableGroup)\n fn.call(runnable.abspath)\n end\n end\nend"}},{"html_id":"each_path(&fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2250,"url":null},"def":{"name":"each_path","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Path ->)"},"visibility":"Public","body":"each_path(fn)"}},{"html_id":"each_sorted_path(selector:GlobSelector,&:Path->)-instance-method","name":"each_sorted_path","doc":"Yields all paths matching *selector* in lexicographic order.\nThe paths are initially taken from the directory of this\ncontainer. See `Disk#glob` for details.","summary":"Yields all paths matching selector in lexicographic order.
","abstract":false,"args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"args_string":"(selector : GlobSelector, & : Path -> )","args_html":"(selector : GlobSelector, & : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2265,"url":null},"def":{"name":"each_sorted_path","args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Path ->)"},"visibility":"Public","body":"paths = [] of Path\n@root.disk.glob(@dir, selector) do |path|\n paths << path\nend\npaths.unstable_sort! do |a, b|\n a.to_s.compare(b.to_s, case_insensitive: true)\nend\npaths.each do |path|\n yield path\nend\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this container is empty, i.e., holds\nhas no constituent runnables.","summary":"Returns whether this container is empty, i.e., holds has no constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2125,"url":null},"def":{"name":"empty?","visibility":"Public","body":"@runnables.empty?"}},{"html_id":"env:Novika::Resolver::RunnableEnvironment-instance-method","name":"env","doc":"Returns the `RunnableEnvironment` assigned to this container.","summary":"Returns the RunnableEnvironment
assigned to this container.
Recursively replaces each runnable in this container with its #constituents
.
Returns whether env is this container's environment.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"args_string":"(env : RunnableEnvironment)","args_html":"(env : RunnableEnvironment)","location":{"filename":"src/novika/resolver.cr","line_number":2172,"url":null},"def":{"name":"from?","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"visibility":"Public","body":"@env == env"}},{"html_id":"includes?(other)-instance-method","name":"includes?","doc":"Returns whether this container includes the given *runnable*.","summary":"Returns whether this container includes the given runnable.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/resolver.cr","line_number":2130,"url":null},"def":{"name":"includes?","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"@runnables.includes?(other)"}},{"html_id":"paths-instance-method","name":"paths","doc":"Returns a set of *all* paths (file, directory, etc. paths) in\nthis container, including those in nested containers.","summary":"Returns a set of all paths (file, directory, etc.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2256,"url":null},"def":{"name":"paths","visibility":"Public","body":"paths = Set(Path).new\neach_path do |path|\n paths << path\nend\npaths\n"}},{"html_id":"prepend(runnable:Runnable)-instance-method","name":"prepend","doc":"Inserts *runnable* before all other runnables in this container.","summary":"Inserts runnable before all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2119,"url":null},"def":{"name":"prepend","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables.unshift(runnable)"}},{"html_id":"recursive_nonterminal_each(fn:Runnable,RunnableContainer->)-instance-method","name":"recursive_nonterminal_each","doc":"Calls *fn* with each nonterminal and the container it's from,\nrecurses into nested `RunnableContainer`s.","summary":"Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"args_string":"(fn : Runnable -> Bool)","args_html":"(fn : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2307,"url":null},"def":{"name":"recursive_select!","args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"visibility":"Public","body":"@runnables.select! do |runnable|\n fn.call(runnable)\nend\n@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n else\n next\n end\n runnable.recursive_select!(fn)\nend\n"}},{"html_id":"recursive_select!(&fn:Runnable->Bool)-instance-method","name":"recursive_select!","doc":"Accepts only those runnable in this container and in all nested\ncontainers for which *fn* returns true.\n\nRunnables for which *fn* returned false are mutably deleted.","summary":"Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2316,"url":null},"def":{"name":"recursive_select!","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"recursive_select!(fn)"}},{"html_id":"replace(pattern:Runnable,replacement:Runnable)-instance-method","name":"replace","doc":"Replaces *pattern* runnable with the *replacement* runnable\nin this container only (i.e., does not recurse).","summary":"Replaces pattern runnable with the replacement runnable in this container only (i.e., does not recurse).
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"args_string":"(pattern : Runnable, replacement : Runnable)","args_html":"(pattern : Runnable, replacement : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2281,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"visibility":"Public","body":"if can_contain?(replacement)\nelse\n return\nend\n@runnables.map! do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"replace(pattern:Runnable,replacement:Array(Runnable))-instance-method","name":"replace","doc":"Replaces *pattern* runnable with multiple *replacement* runnables\nin this container only (i.e. does not recurse). Their order will\nbe the same as that in *replacement*.\n\nRunnables from *replacement* that this container cannot contain\nare left out.","summary":"Replaces pattern runnable with multiple replacement runnables in this container only (i.e.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"args_string":"(pattern : Runnable, replacement : Array(Runnable))","args_html":"(pattern : Runnable, replacement : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2295,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"visibility":"Public","body":"replacement = replacement.select do |runnable|\n can_contain?(runnable)\nend\n@runnables = @runnables.flat_map do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"request(dependency:Resolution::Dependency)-instance-method","name":"request","doc":"Communicates with this container's environment permission\nserver in order to determine whether the use *dependency*\nshould be allowed to `self`.","summary":"Communicates with this container's environment permission server in order to determine whether the use dependency should be allowed to self
.
Rewrites this container until there is no point in doing so.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2430,"url":null},"def":{"name":"rewrite","visibility":"Public","body":"begin\n @root.down(caller: (@ancestor.as?(Runnable)) || self)\n loop do\n previous = @runnables\n @runnables = [] of Runnable\n previous.each(&.specialize(@root, container: self))\n apply_filters!\n if previous == @runnables\n break\n end\n end\nensure\n @root.up\nend"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":2478,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if empty?\n return\nend\nrewrite\ncontainer.append(self)\n"}},{"html_id":"thorough_rewrite-instance-method","name":"thorough_rewrite","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2454,"url":null},"def":{"name":"thorough_rewrite","visibility":"Public","body":"@dir_rewrite = true\nrewrite\n@dir_rewrite = false\nif abspath = @env.abspath?\nelse\n return\nend\nrecursive_nonterminal_map! do |nonterminal, container|\n if container.from?(@env)\n else\n next nonterminal\n end\n child = container.child(abspath, transparent: true)\n child.append(nonterminal)\n child.rewrite\n child\nend\nrewrite\n"}},{"html_id":"to_resolution_set(*,deps=Set(Resolution::Dependency).new,set=ResolutionSet.new)-instance-method","name":"to_resolution_set","doc":"Builds and returns a `ResolutionSet` with resolutions from\nthis container and all nested containers.\n\nYou must call this after `flatten!`. Otherwise, the resulting\n`ResolutionSet` will be underpopulated with dependencies due\nto transparent containers standing in the way.\n\n*deps* is a set of dependencies that *all* resolutions in the\nresulting set should have, regardless of nesting. *Beware that\nit is mutated.*","summary":"Builds and returns a ResolutionSet
with resolutions from this container and all nested containers.
Returns whether this container is transparent.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2037,"url":null},"def":{"name":"transparent?","return_type":"Bool","visibility":"Public","body":"@transparent"}}]},{"html_id":"novika/Novika/Resolver/RunnableDir","path":"Novika/Resolver/RunnableDir.html","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1279,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a directory in the file system. At this point it is still\nunknown whether the directory is a Novika library, application, or\nsimply that - a directory.\n\nRunnable directories get rewritten to `RunnableGroup`s, which are\naware of the presence or absence of manifest(s); and therefore,\nit is `RunnableGroup`s that know whether they are an app, lib,\nor simply a directory.","summary":"Represents a directory in the file system.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1282,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1286,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"group = RunnableGroup.allocate\nmanifest = Manifest.find(root.disk, @datum, ancestor: group)\ngroup.initialize(@datum, manifest, ancestor: @ancestor)\ncontainer.append(group)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1293,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Dir[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableEnvironment","path":"Novika/Resolver/RunnableEnvironment.html","kind":"class","full_name":"Novika::Resolver::RunnableEnvironment","name":"RunnableEnvironment","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1903,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika environment.","summary":"Represents a Novika environment.
","constructors":[{"html_id":"new(root:RunnableRoot,abspath:Path|Nil)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"args_string":"(root : RunnableRoot, abspath : Path | Nil)","args_html":"(root : RunnableRoot, abspath : Path | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1919,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, abspath)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(path:Path)-instance-method","name":"==","doc":"Returns whether *path* points to this environment's directory.","summary":"Returns whether path points to this environment's directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path)","args_html":"(path : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2006,"url":null},"def":{"name":"==","args":[{"name":"path","external_name":"path","restriction":"Path"}],"visibility":"Public","body":"@abspath == path"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if (value = @abspath).nil?\n ::raise(NilAssertionError.new(\"Novika::Resolver::RunnableEnvironment#abspath cannot be nil\"))\nelse\n value\nend"}},{"html_id":"abspath?:Path?-instance-method","name":"abspath?","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath?","visibility":"Public","body":"@abspath"}},{"html_id":"brief(dependency:Resolution::Dependency)-instance-method","name":"brief","doc":"Returns a brief description of *dependency* as per this environment.","summary":"Returns a brief description of dependency as per this environment.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency)","args_html":"(dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":1988,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"dependency.purpose(in: capabilities)"}},{"html_id":"capability?(datum:String):Bool-instance-method","name":"capability?","doc":"Returns whether *datum* is a capability in this environment's\ncapability collection.","summary":"Returns whether datum is a capability in this environment's capability collection.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"String"}],"args_string":"(datum : String) : Bool","args_html":"(datum : String) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1950,"url":null},"def":{"name":"capability?","args":[{"name":"datum","external_name":"datum","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"capabilities.has_capability?(datum)"}},{"html_id":"designate(set:ResolutionSet):Designation-instance-method","name":"designate","doc":"Creates and returns a `Designation` for this environment to\nhandle the given resolution *set*.","summary":"Creates and returns a Designation
for this environment to handle the given resolution set.
Expands datum in this environment's directory.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"args_string":"(datum : Path) : Path | Nil","args_html":"(datum : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1941,"url":null},"def":{"name":"expand?","args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif info = @root.disk.info?(abspath.expand(datum))\nelse\n return\nend\ninfo.path\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"includes?(path:Path):Bool-instance-method","name":"includes?","doc":"Returns whether *path* is part of this environment's subtree,\ni.e. is this environment directory's direct or indirect child.","summary":"Returns whether path is part of this environment's subtree, i.e.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Bool","args_html":"(path : Path) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1994,"url":null},"def":{"name":"includes?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Bool","visibility":"Public","body":"if abspath = @abspath\nelse\n return false\nend\nif abspath == path\n return true\nend\npath.each_parent do |parent|\n if parent == abspath\n return true\n end\nend\nfalse\n"}},{"html_id":"permissions(&:IO->)-instance-method","name":"permissions","doc":"Yields writable `IO` for the content of this environment's\npermissions file. Creates the latter if necessary. Previous\ncontent of the permissions file is cleared.","summary":"Yields writable IO
for the content of this environment's permissions file.
Returns the content of the permissions file of this environment followed by the file's path; or nil if the permissions file does not exist.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1963,"url":null},"def":{"name":"permissions?","return_type":"::Tuple(String, Path) | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif path = @root.disk.file?(abspath / PERMISSIONS_FILENAME)\nelse\n return\nend\n{@root.disk.read(path), path}\n"}},{"html_id":"request(dependency:Resolution::Dependency,forcontainer:RunnableContainer)-instance-method","name":"request","doc":"Emits a dependency request (see `Resolution::Dependency#request`)\nto the permission server of this environment.","summary":"Emits a dependency request (see Resolution::Dependency#request
) to the permission server of this environment.
Raised when there is an error during runnable resolution.
","constructors":[{"html_id":"new(message,runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(message, runnable : Runnable)","args_html":"(message, runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":104,"url":null},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message, runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"runnable:Novika::Resolver::Runnable-instance-method","name":"runnable","doc":"Returns the runnable which is assumed to be the source of\nthis error.","summary":"Returns the runnable which is assumed to be the source of this error.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":102,"url":null},"def":{"name":"runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableGroup","path":"Novika/Resolver/RunnableGroup.html","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1835,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable group is a directory with or without a manifest: that is,\na directory with awareness of whether it is an application, library,\nor simply that - a directory.\n\nRunnable groups, through manifests, are directories with a specific\nrunnable *layout*.\n\nRunnable groups are rewritten to properly ordered (laid out)\n`RunnableContainer`s.\n\nNow to the important bit: since there is never a guaranteed\nlink between a runnable group and the container it was/will\nbe rewritten to, you should manually register it with\n`RunnableRoot#assign` if you ever want the container to *run*.","summary":"A runnable group is a directory with or without a manifest: that is, a directory with awareness of whether it is an application, library, or simply that - a directory.
","constructors":[{"html_id":"new(datum:Path,manifest:Manifest,ancestor=nil)-class-method","name":"new","doc":"Creates a new runnable group.\n\n*manifest* is the manifest of this group. Manifests control\nthe order of runnables in this group.\n\n*datum* is a *normalized* path to the group (a directory).","summary":"Creates a new runnable group.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, manifest : Manifest, ancestor = nil)","args_html":"(datum : Path, manifest : Manifest, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1844,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, manifest, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns an absolute path to this group.","summary":"Returns an absolute path to this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1874,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: group datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"app?:Bool-instance-method","name":"app?","doc":"Returns whether this group represents an app (is laid out\naccording to a '.nk.app' manifest).","summary":"Returns whether this group represents an app (is laid out according to a '.nk.app' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1850,"url":null},"def":{"name":"app?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::App)"}},{"html_id":"entry_name:String-instance-method","name":"entry_name","doc":"Constructs and returns entry filename for this group.\n\nFor instance, if this group's directory is '/path/to/foo', then\nits entry filename will be 'foo.nk'.","summary":"Constructs and returns entry filename for this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1869,"url":null},"def":{"name":"entry_name","return_type":"String","visibility":"Public","body":"\"#{name}.nk\""}},{"html_id":"lib?:Bool-instance-method","name":"lib?","doc":"Returns whether this group represents a lib (is laid out\naccording to a '.nk.lib' manifest).","summary":"Returns whether this group represents a lib (is laid out according to a '.nk.lib' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1856,"url":null},"def":{"name":"lib?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::Lib)"}},{"html_id":"name:String-instance-method","name":"name","doc":"Returns the name of this group.","summary":"Returns the name of this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1861,"url":null},"def":{"name":"name","return_type":"String","visibility":"Public","body":"@datum.stem"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1880,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"child = container.child(@datum, transparent: true, ancestor: self)\ncontainer.append(child)\n@manifest.populate(root, child, origin: self)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1890,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"case\nwhen app?\n io << \"App\"\nwhen lib?\n io << \"Lib\"\nelse\n io << \"Group\"\nend\n((io << \"[\") << @datum) << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableIgnored","path":"Novika/Resolver/RunnableIgnored.html","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Lets signal receivers acknowledge that a runnable was ignored.","summary":"Lets signal receivers acknowledge that a runnable was ignored.
","constructors":[{"html_id":"new(runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"new","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@runnable.clone)"}},{"html_id":"copy_with(runnable_runnable=@runnable)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"args_string":"(runnable _runnable = @runnable)","args_html":"(runnable _runnable = @runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"copy_with","args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"visibility":"Public","body":"self.class.new(_runnable)"}},{"html_id":"runnable:Runnable-instance-method","name":"runnable","abstract":false,"def":{"name":"runnable","return_type":"Runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableQuery","path":"Novika/Resolver/RunnableQuery.html","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1051,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable queries are one of the most generic kinds of runnables.\nThey specialize themselves through `RunnableContainer#classify?`.","summary":"Runnable queries are one of the most generic kinds of runnables.
","constructors":[{"html_id":"new(datum:Path|String,ancestor=nil,else:Runnable|Nil=self)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"args_string":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","args_html":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","location":{"filename":"src/novika/resolver.cr","line_number":1054,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor, else)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1058,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if runnable = container.classify?(@datum, ancestor: self)\n container.append(runnable)\n return\nend\nif alt = @else\nelse\n return\nend\ncontainer.append(alt)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1069,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Query[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableRoot","path":"Novika/Resolver/RunnableRoot.html","kind":"class","full_name":"Novika::Resolver::RunnableRoot","name":"RunnableRoot","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2516,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable root is available to all containers, and therefore allows\nany runnable to escape deep nesting if need be.\n\nRunnable root stores a pointer to the `Disk` object, used throughout\nthe resolver to cache file system requests (the resolver is quite\nample in making them). It also stores the set of flags, which help\nmaking OS-specific decisions using flag conditions in manifests.\n\nAdditionally, runnable root allows runnables to `wish` queries\nto be resolved later, as requirements, and to talk to each other\nvia `Signal`s and the `SignalReceiver` interface (see `send`).\n\nThere's a lot more, but that's the gist.","summary":"Runnable root is available to all containers, and therefore allows any runnable to escape deep nesting if need be.
","constructors":[{"html_id":"new(disk:Disk,cwd:Path)-class-method","name":"new","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"args_string":"(disk : Disk, cwd : Path)","args_html":"(disk : Disk, cwd : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2525,"url":null},"def":{"name":"new","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"visibility":"Public","body":"_ = allocate\n_.initialize(disk, cwd)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"assign(group:RunnableGroup,*,container:RunnableContainer,overwrite=true):RunnableContainer-instance-method","name":"assign","doc":"Assigns *container* to the given *group*.\n\nThis is the only way someone from the outside can (reliably)\nget the container of a group.\n\n*overwrite* specifies whether the existing container for *group*\nshould be overwritten with *container*.\n\nReturns the container that was assigned to *group*.","summary":"Assigns container to the given group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"args_string":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","args_html":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2606,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"splat_index":1,"return_type":"RunnableContainer","visibility":"Public","body":"if overwrite\n @containers[group] = container\nelse\n @containers.put_if_absent(group, container)\nend"}},{"html_id":"assign(group:RunnableGroup,*,preamble:String)-instance-method","name":"assign","doc":"Assigns *preamble* to the given runnable *group*.","summary":"Assigns preamble to the given runnable group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(group : RunnableGroup, *, preamble : String)","args_html":"(group : RunnableGroup, *, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":2615,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"@preambles[group] = preamble"}},{"html_id":"containerof(group:RunnableGroup):RunnableContainer-instance-method","name":"containerof","doc":"Returns the container assigned to *group*.\n\nRaises if *group* is neither an application nor a library.","summary":"Returns the container assigned to group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer","args_html":"(group : RunnableGroup) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2622,"url":null},"def":{"name":"containerof","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer","visibility":"Public","body":"(containerof?(group)) || (raise(\"BUG: container was not assigned to #{group}\"))"}},{"html_id":"containerof?(group:RunnableGroup):RunnableContainer|Nil-instance-method","name":"containerof?","doc":"Returns the container of an application or library *group*, or\nnil if *group* is neither an application nor a library.","summary":"Returns the container of an application or library group, or nil if group is neither an application nor a library.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer | Nil","args_html":"(group : RunnableGroup) : RunnableContainer | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2628,"url":null},"def":{"name":"containerof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer | ::Nil","visibility":"Public","body":"@containers[group]?"}},{"html_id":"cwd:Path-instance-method","name":"cwd","doc":"Returns the user's current working directory. It is also\nsometimes referred to as the \"primary origin\", \"origin\" as\nin \"primary origin (source) of files\".","summary":"Returns the user's current working directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2523,"url":null},"def":{"name":"cwd","visibility":"Public","body":"@cwd"}},{"html_id":"default_env:RunnableEnvironment-instance-method","name":"default_env","doc":"Returns the default runnable environment.\n\nCurrently, current working directory environment is used as the\ndefault runnable environment.\n\nNote that if the current working directory does not have an\nenvironment, a \"virtual\", pathless environment is returned\n(see `defenv`).","summary":"Returns the default runnable environment.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2590,"url":null},"def":{"name":"default_env","return_type":"RunnableEnvironment","visibility":"Public","body":"@envs[nil]"}},{"html_id":"defenv(path:Path|Nil)-instance-method","name":"defenv","doc":"Returns the `RunnableEnvironment` for *path*, creating one if\nit does not exist.\n\nNote that *path* can be nil, which means the created/returned\nenvironment will be so to speak \"virtual\". The only difference\nbeing the \"virtual\" environment's response to disk-related\nquestions. Namely it'll answer does-not-exist (or something\nlike that) to any disk-related question.\n\nNote also, that only one pathless environment can ever created;\nas a consequence, all runnable containers that have no environments\nwill share one pathless runnable environment.","summary":"Returns the RunnableEnvironment
for path, creating one if it does not exist.
Marks query as explicit ("hand-written") within this runnable root.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2558,"url":null},"def":{"name":"defexplicit","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@explicit)\n return\nend\n@explicit << query\n"}},{"html_id":"disk:Novika::Resolver::Disk-instance-method","name":"disk","doc":"Returns the disk used by this runnable root.","summary":"Returns the disk used by this runnable root.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2518,"url":null},"def":{"name":"disk","visibility":"Public","body":"@disk"}},{"html_id":"each_set_flag(&:String->)-instance-method","name":"each_set_flag","doc":"Yields all set (true) flags.","summary":"Yields all set (true) flags.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2708,"url":null},"def":{"name":"each_set_flag","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(String ->)"},"visibility":"Public","body":"@flags.each do |flag|\n yield flag\nend"}},{"html_id":"each_wish(&:RunnableQuery->)-instance-method","name":"each_wish","doc":"Yields queries from this runnable root's wishlist of queries.\n\nSee `wish`.","summary":"Yields queries from this runnable root's wishlist of queries.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2550,"url":null},"def":{"name":"each_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishes.each do |wish|\n yield wish\nend"}},{"html_id":"new_primary_container:RunnableContainer-instance-method","name":"new_primary_container","doc":"Creates and returns a new primary `RunnableContainer`.","summary":"Creates and returns a new primary RunnableContainer
.
Returns the preamble of group, or nil if it has none.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : String | Nil","args_html":"(group : RunnableGroup) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2633,"url":null},"def":{"name":"preambleof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"String | ::Nil","visibility":"Public","body":"@preambles[group]?"}},{"html_id":"send(signal:Signal)-instance-method","name":"send","doc":"Sends *signal* to all `SignalReceiver`s subscribed to this\nrunnable root.","summary":"Sends signal to all SignalReceiver
s subscribed to this runnable root.
Creates and returns a permission server in the given runnable environment env and capability collection caps.
","abstract":false,"args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"args_string":"(to env : RunnableEnvironment) : PermissionServer","args_html":"(to env : RunnableEnvironment) : PermissionServer","location":{"filename":"src/novika/resolver.cr","line_number":2662,"url":null},"def":{"name":"serve_permissions","args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"return_type":"PermissionServer","visibility":"Public","body":"(PermissionServer.new(env, @explicit)).tap do |server|\n subscribe(server)\nend"}},{"html_id":"set_flag(name:String,state:Bool)-instance-method","name":"set_flag","doc":"Assigns *state* to a boolean flag with the given *name*.\n\nNote that by design, an unset flag is a false flag, and\nvice versa: if *state* is false, the flag is either not\ncreated, or removed.\n\n```\nroot.set_flag(\"happy\", true)\nroot.set_flag(\"sad\", false)\n```","summary":"Assigns state to a boolean flag with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"args_string":"(name : String, state : Bool)","args_html":"(name : String, state : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2694,"url":null},"def":{"name":"set_flag","args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"visibility":"Public","body":"if state\n @flags << name\n return\nend\nif name.in?(@flags)\n @flags.delete(name)\nend\n"}},{"html_id":"subscribe(receiver:SignalReceiver)-instance-method","name":"subscribe","doc":"Subscribes *receiver* to this runnable root.","summary":"Subscribes receiver to this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2640,"url":null},"def":{"name":"subscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers << receiver"}},{"html_id":"unsubscribe(receiver:SignalReceiver)-instance-method","name":"unsubscribe","doc":"Unsubscribes *receiver* from this runnable root.","summary":"Unsubscribes receiver from this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2645,"url":null},"def":{"name":"unsubscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers.delete(receiver)"}},{"html_id":"wish(query:RunnableQuery)-instance-method","name":"wish","doc":"Appends *query* to the wishlist of this runnable root (the\nwishlist is like \"outbound queries\" or \"preload requests\").\n\nWishes are picked up from the wishlist by outer infrastructure\nand loaded distinctly. The only guarantee is that they will\nindeed be *pre*loaded relative to the query that made the wish,\nmeaning loaded some time before it.\n\nDoes nothing if *query* is already in the wishlist.","summary":"Appends query to the wishlist of this runnable root (the wishlist is like "outbound queries" or "preload requests").
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2541,"url":null},"def":{"name":"wish","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@wishes)\n return\nend\n@wishes << query\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableScript","path":"Novika/Resolver/RunnableScript.html","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".nk\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika script, specifically a '.nk' file.","summary":"Represents a Novika script, specifically a '.nk' file.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1251,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path to this script.","summary":"Returns the absolute path to this script.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1256,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: script datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1262,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << \"Script[\") << @datum\neach_ancestor do |ancestor|\n (io << \" ← \") << ancestor\nend\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableSelector","path":"Novika/Resolver/RunnableSelector.html","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1076,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selectors match, and are rewritten to, file system entries in the\ndirectory of the container that is doing the rewriting.","summary":"Selectors match, and are rewritten to, file system entries in the directory of the container that is doing the rewriting.
","constructors":[{"html_id":"new(datum:Novika::Resolver::GlobSelector,reject:Set(String)=Set(String).new,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","args_html":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1079,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, reject, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1083,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.each_sorted_path(@datum) do |path|\n basename = path.basename\n if basename.in?(@reject)\n next\n end\n if basename.starts_with?('_')\n next\n end\n case @datum\n in .scripts?\n if path.extension == RunnableScript::EXTENSION\n else\n next\n end\n runnable = RunnableScript.new(path, ancestor: self)\n in .directories?\n runnable = RunnableDir.new(path, ancestor: self)\n if basename == \"core\"\n container.prepend(runnable)\n next\n end\n end\n container.append(runnable)\nend"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1108,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"Forall[\") << @datum) << \" ∉ {\") << (@reject.join(','))) << \"}]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","path":"Novika/Resolver/RunnableSharedObject.html","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1178,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".so\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable representation of a shared object. Shared objects are\naccessed via FFI Novika-side.","summary":"Runnable representation of a shared object.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1194,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1208,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"id-instance-method","name":"id","doc":"Returns the id of this shared object.\n\nThe id is made by taking the stem of the path to the object and\nstripping it of the lib prefix, if it has one. For example, given\n`/lib/libmath.so` or `/lib/math.so`, the id would be `math` in\nboth cases.","summary":"Returns the id of this shared object.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1204,"url":null},"def":{"name":"id","visibility":"Public","body":"@datum.stem.lchop(\"lib\")"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1222,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"shared object #{@datum.colorize.bold}\""}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1214,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted shared object\")\nend\n{envelope.abspath.to_s, @datum.to_s}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1233,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"SharedObject[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/ScriptsSlot","path":"Novika/Resolver/ScriptsSlot.html","kind":"class","full_name":"Novika::Resolver::ScriptsSlot","name":"ScriptsSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1336,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts\" in the container's directory, represented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts" in the container's directory, represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1337,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\nroot.disk.glob(manifest.directory, GlobSelector::Scripts) do |datum|\n if datum.in?(mentioned)\n next\n end\n content.append(RunnableScript.new(datum, ancestor: self))\nend\ncontainer.replace(self, content)\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1361,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[*]\""}}]},{"html_id":"novika/Novika/Resolver/Session","path":"Novika/Resolver/Session.html","kind":"class","full_name":"Novika::Resolver::Session","name":"Session","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A resolver session interacts with a `RunnableRoot` in a way that\nallows you to *query*. Querying is done by `push`ing some queries,\nand then `pop`ping them \"into\" a `Response` object which you should\ncreate beforehand, and which you own.\n\n```\nsession = Resolver::Session.new(root)\nsession.push(\"foo\")\nsession.push(\"bar\")\nsession.push(\"baz\")\n\nresponse1 = Resolver::Response.new\nsession.pop(response1)\n\n# Re-use the same session. Queries were popped, so the session\n# is clean.\nsession.push(\"xyzzy\")\nsession.push(\"byzzy\")\n\nresponse2 = Resolver::Response.new\nsession.pop(response2)\n\n# Run the accepted stuff from the responses...\nresponse1.accepted_set.each_designation(root, &.run)\nresponse2.accepted_set.each_designation(root, &.run)\n```","summary":"A resolver session interacts with a RunnableRoot
in a way that allows you to query.
Yields only those queries from the query list that were marked as explicit.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2999,"url":null},"def":{"name":"each_explicit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@explicit.each do |query|\n yield query\nend"}},{"html_id":"each_query(&:RunnableQuery->)-instance-method","name":"each_query","doc":"Yields all queries from the query list.","summary":"Yields all queries from the query list.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3006,"url":null},"def":{"name":"each_query","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@queries.each do |query|\n yield query\nend"}},{"html_id":"on_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2981,"url":null},"def":{"name":"on_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"on_container_rewritten(callback)"}},{"html_id":"on_container_rewritten(callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"args_string":"(callback : RunnableContainer -> )","args_html":"(callback : RunnableContainer -> )","location":{"filename":"src/novika/resolver.cr","line_number":2986,"url":null},"def":{"name":"on_container_rewritten","args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"visibility":"Public","body":"@on_container_rewritten << callback"}},{"html_id":"pop(response:Response):ResolutionSet-instance-method","name":"pop","doc":"Resolves the list of queries that were `push`ed, returns the single\nresolution set comprised of resolutions for those queries that\nwere accepted by the resolver.\n\nAlso fills *response*, see `Response` for what you can get out of it.","summary":"Resolves the list of queries that were #push
ed, returns the single resolution set comprised of resolutions for those queries that were accepted by the resolver.
Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : RunnableQuery, explicit = false)","args_html":"(query : RunnableQuery, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3013,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries << query\nif explicit\n @explicit << query\nend\n"}},{"html_id":"push(query:Query,explicit=false)-instance-method","name":"push","doc":"Appends *query* to the list of queries to be resolved during\nthis session; allows to mark it as *explicit* (\"hand-written\")\nif necessary.","summary":"Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : Query, explicit = false)","args_html":"(query : Query, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3019,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(RunnableQuery.new(query), explicit)"}},{"html_id":"push(queries:Array(RunnableQuery),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(RunnableQuery), explicit = false)","args_html":"(queries : Array(RunnableQuery), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3026,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries.concat(queries)\nif explicit\n @explicit.concat(queries)\nend\n"}},{"html_id":"push(queries:Array(Query)|Array(String)|Array(Path),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","args_html":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3032,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(queries.map do |query|\n RunnableQuery.new(query)\nend, explicit)"}}]},{"html_id":"novika/Novika/Resolver/Signal","path":"Novika/Resolver/Signal.html","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":57,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/DoDiskLoad","kind":"struct","full_name":"Novika::Resolver::DoDiskLoad","name":"DoDiskLoad"},{"html_id":"novika/Novika/Resolver/DoDiskSave","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave"},{"html_id":"novika/Novika/Resolver/RunnableIgnored","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored"},{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"},{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of signals received by `SignalReceiver`s","summary":"Base class of signals received by SignalReceiver
s
SignalReceiver
s can receive signals sent by the RunnableRoot
.
Receives and reacts to a signal sent by RunnableRoot
.
Base class of ScriptsSlot
(known to the user as *
), SubtreeSlot
(known to the user as **
), and ChildSlot
(<>
).
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1325,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/SubtreeSlot","path":"Novika/Resolver/SubtreeSlot.html","kind":"class","full_name":"Novika::Resolver::SubtreeSlot","name":"SubtreeSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1370,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts and directories in the subtree (recursively),\nexcept for Novika application and library directories\",\nrepresented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts and directories in the subtree (recursively), except for Novika application and library directories", represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1371,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\ncontent.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.replace(self, content)\nmanifest.layout(content, group)\ncontent.rewrite\ncontent.recursive_select! do |runnable|\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableContainer)\n else\n next false\n end\n !(runnable.abspath.in?(mentioned))\nend\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1416,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[**]\""}}]},{"html_id":"novika/Novika/Resolver/ToAnswerDo","path":"Novika/Resolver/ToAnswerDo.html","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":80,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to answer a question, gives them\na Proc which will allow them to do that.","summary":"If signal receivers want to answer a question, gives them a Proc which will allow them to do that.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAnswerDo/Fn","path":"Novika/Resolver/ToAnswerDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAnswerDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":81,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, Nil)","aliased_html":"String -> Nil","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"}}]},{"html_id":"novika/Novika/Resolver/ToAskDo","path":"Novika/Resolver/ToAskDo.html","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":74,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to ask a question, gives them\na Proc which will do that and return a string answer, or\nnil if the user discarded the question.","summary":"If signal receivers want to ask a question, gives them a Proc which will do that and return a string answer, or nil if the user discarded the question.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAskDo/Fn","path":"Novika/Resolver/ToAskDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAskDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":75,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, (String | Nil))","aliased_html":"String -> String?","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}}]}]},{"html_id":"novika/Novika/RunnableResolver","path":"Novika/RunnableResolver.html","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3095,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A very high-level interface to the Novika resolver. Designed as one-\nshot, meaning you shouldn't reuse the same object twice or call\n`resolve?` twice. In this regard, as a protection, calling `resolve?`\ntwice will raise.\n\nSee `Session` and `Response` if you want a lower-level interface.\n\n```\nresolver = Novika::RunnableResolver.new(cwd: Path[Dir.current], args: [\"repl\"])\n\n# Define 'gets' and 'print' to ask for permissions.\n\nresolver.on_permissions_gets do |string|\n print string\n gets\nend\n\nresolver.on_permissions_print do |string|\n print string\nend\n\n# Run \"repl\" and everything it requested.\n\nresolver.after_permissions(&.run)\nresolver.resolve?\n```","summary":"A very high-level interface to the Novika resolver.
","constructors":[{"html_id":"new(cwd:Path,args:Array(Query))-class-method","name":"new","doc":"Creates a new resolver for the given current working directory\n*cwd* and query arguments *args*.\n\nSee `RunnableResolver`.","summary":"Creates a new resolver for the given current working directory cwd and query arguments args.
","abstract":false,"args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"args_string":"(cwd : Path, args : Array(Query))","args_html":"(cwd : Path, args : Array(Query))","location":{"filename":"src/novika/resolver.cr","line_number":3166,"url":null},"def":{"name":"new","args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(cwd, args)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"after_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"after_container_rewritten","doc":"Called when some container under this resolver was thoroughly rewritten.\n\nYou'll have to do additional checks to figure out where the\ncontainer came from. This is mainly an inspection method.","summary":"Called when some container under this resolver was thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3210,"url":null},"def":{"name":"after_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"@session.on_container_rewritten(callback)"}},{"html_id":"after_permissions(&callback:PermissionsHook->)-instance-method","name":"after_permissions","doc":"Registers *callback* to run after a valid Novika program is formed,\nand permissions are given.","summary":"Registers callback to run after a valid Novika program is formed, and permissions are given.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3245,"url":null},"def":{"name":"after_permissions","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(PermissionsHook ->)"},"visibility":"Public","body":"@after_permissions << callback"}},{"html_id":"after_program(&callback:ProgramHook->)-instance-method","name":"after_program","doc":"Registers *callback* to run after a valid Novika program is formed.\nSee `ProgramHook` to learn what is considered a Novika program.","summary":"Registers callback to run after a valid Novika program is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3231,"url":null},"def":{"name":"after_program","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ProgramHook ->)"},"visibility":"Public","body":"@after_program << callback"}},{"html_id":"after_response(&callback:ResponseHook->)-instance-method","name":"after_response","doc":"Registers *callback* to run after a valid response is formed.","summary":"Registers callback to run after a valid response is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3217,"url":null},"def":{"name":"after_response","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ResponseHook ->)"},"visibility":"Public","body":"@after_response << callback"}},{"html_id":"argument?(query:RunnableQuery)-instance-method","name":"argument?","doc":"Returns whether *query* was passed as an argument to this resolver.","summary":"Returns whether query was passed as an argument to this resolver.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":3193,"url":null},"def":{"name":"argument?","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"@args.any?(&.same?(query))"}},{"html_id":"on_permissions_gets(&on_permissions_gets:String->String|Nil)-instance-method","name":"on_permissions_gets","doc":"Registers a handler for permissions `gets`. Overrides the previous\nhandler, if any.","summary":"Registers a handler for permissions gets
.
Registers a handler for permissions print
.
Performs resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3296,"url":null},"def":{"name":"resolve?","return_type":"Bool","visibility":"Public","body":"if @resolved\n raise(\"BUG: attempt to RunnableResolver#resolve? twice\")\nend\nif @args.empty?\n manifest = Manifest.find(@root.disk, @cwd)\n if resolve_cwd?(manifest)\n else\n return false\n end\nelse\n sched?(@args, explicit: true)\nend\nif @response.successful?\nelse\n raise(ResponseRejectedError.new(@response))\nend\non_response(@response)\nprogram = @response.accepted_set\napps = program.unique_apps\nif apps.size > 1\n raise(MoreThanOneAppError.new(apps))\nend\non_program(program)\n@root.send(DoDiskLoad.new)\n@root.send(ToAskDo.new(@on_permissions_gets))\n@root.send(ToAnswerDo.new(@on_permissions_print))\nprogram.each_unique_dependency_with_dependents do |dependency, dependents|\n skiplist = Set(Resolution).new\n visited = Set(RunnableGroup).new\n dependents.each_group do |group, resolution|\n if group.app? || group.lib?\n else\n next\n end\n if group.in?(visited)\n skiplist << resolution\n next\n end\n container = @root.containerof(group)\n container.request(dependency)\n visited << group\n skiplist << resolution\n end\n dependents.each do |resolution|\n if resolution.in?(skiplist)\n next\n end\n resolution.each_dependency(&.allow)\n end\nend\n@root.send(DoDiskSave.new)\non_permissions(program)\n@resolved = true\ntrue\n"}}],"types":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","path":"Novika/RunnableResolver/PermissionsHook.html","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook","abstract":false,"superclass":{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},"ancestors":[{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"Same as `ProgramHook` but also allows you to run the program.","summary":"Same as ProgramHook
but also allows you to run the program.
Returns the list of designations in the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3145,"url":null},"def":{"name":"designations","return_type":"Array(Designation)","visibility":"Public","body":"designations = [] of Designation\n@program.each_designation(@root) do |designation|\n designations << designation\nend\ndesignations\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the program.","summary":"Runs the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3154,"url":null},"def":{"name":"run","visibility":"Public","body":"@program.each_designation(@root, &.run)"}}]},{"html_id":"novika/Novika/RunnableResolver/ProgramHook","path":"Novika/RunnableResolver/ProgramHook.html","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3127,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook"}],"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"An object that helps you do high-level things with a `ResolutionSet`\nfor the entire *program*.\n\nA Novika program is basically a collection of properly arranged\nNovika scripts. This is represented by a single `ResolutionSet`,\nwhich is an ordered set. It being a set means that you cannot\nexecute a single script twice in one session of the resolver,\nthat is, globally.","summary":"An object that helps you do high-level things with a ResolutionSet
for the entire program.
Makes and yields designations for the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3137,"url":null},"def":{"name":"each_designation","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"@program.each_designation(@root) do |designation|\n yield designation\nend"}},{"html_id":"program:Novika::Resolver::ResolutionSet-instance-method","name":"program","doc":"Returns the program `ResolutionSet`.","summary":"Returns the program ResolutionSet
.
An object that helps you do high-level things with a Response
.
Yields preambles of apps and libs that were queried for in arguments to RunnableResolver#new
specifically, followed by their corresponding runnable groups.
Returns the Response
object.
Marks this object as schedulable in Engine
.
Safe #schedule
.
Unsafe #schedule
.
The includer should be a Form
.
Scissors deal with cutting a source string into fragments, known as unclassified forms.
","class_methods":[{"html_id":"cut(source:String,&:Int32,Int32,Int32|Nil->)-class-method","name":"cut","doc":"Cuts *source* into a series of *unclassified forms*; yields\nstart byte index and byte length of each to the block.","summary":"Cuts source into a series of unclassified forms; yields start byte index and byte length of each to the block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String, & : Int32, Int32, Int32 | Nil -> )","args_html":"(source : String, & : Int32, Int32, Int32 | Nil -> )","location":{"filename":"src/novika/scissors.cr","line_number":215,"url":null},"def":{"name":"cut","args":[{"name":"source","external_name":"source","restriction":"String"}],"yields":3,"block_arity":3,"block_arg":{"name":"","external_name":"","restriction":"(Int32, Int32, Int32 | ::Nil ->)"},"visibility":"Public","body":"slicer = new(source)\nslicer.each do |start, count, dot|\n yield start, count, dot\nend\n"}}],"constructors":[{"html_id":"new(source:String)-class-method","name":"new","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String)","args_html":"(source : String)","location":{"filename":"src/novika/scissors.cr","line_number":14,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"each(&)-instance-method","name":"each","doc":"Cuts the source string into a series of *unclassified forms*;\nyields start byte index, byte length, and first dot `'.'` byte\nindex of each to the block.\n\nDot byte index is yielded to save an O(N) search, which would\nbe otherwise required since '.' is handled specially by several\nforms in Novika.","summary":"Cuts the source string into a series of unclassified forms; yields start byte index, byte length, and first dot '.'
byte index of each to the block.
Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::SmallDecimalSnapshot]","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: value, cls: Int64, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":140,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.value = form.to_i64\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":131,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":136,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(value)"}},{"html_id":"value:Int64-instance-method","name":"value","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"def":{"name":"value","return_type":"Int64","visibility":"Public","body":"@value"}},{"html_id":"value=(value:Int64)-instance-method","name":"value=","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Int64"}],"args_string":"(value : Int64)","args_html":"(value : Int64)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"Int64"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Snapshot","path":"Novika/Snapshot.html","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot","abstract":true,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":38,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"system\"]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::Snapshot]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"PARTS","name":"PARTS","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"}],"subclasses":[{"html_id":"novika/Novika/BlockRefSnapshot","kind":"class","full_name":"Novika::BlockRefSnapshot","name":"BlockRefSnapshot"},{"html_id":"novika/Novika/BooleanSnapshot","kind":"class","full_name":"Novika::BooleanSnapshot","name":"BooleanSnapshot"},{"html_id":"novika/Novika/BuiltinSnapshot","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot"},{"html_id":"novika/Novika/BytesliceSnapshot","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot"},{"html_id":"novika/Novika/ColorSnapshot","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot"},{"html_id":"novika/Novika/LargeDecimalSnapshot","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot"},{"html_id":"novika/Novika/QuotedWordSnapshot","kind":"class","full_name":"Novika::QuotedWordSnapshot","name":"QuotedWordSnapshot"},{"html_id":"novika/Novika/QuoteSnapshot","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot"},{"html_id":"novika/Novika/SmallDecimalSnapshot","kind":"class","full_name":"Novika::SmallDecimalSnapshot","name":"SmallDecimalSnapshot"},{"html_id":"novika/Novika/WordSnapshot","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"to_form(assembler:BlockAssembler)-instance-method","name":"to_form","doc":"Converts this snapshot to the corresponding form.","summary":"Converts this snapshot to the corresponding form.
","abstract":true,"args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"args_string":"(assembler : BlockAssembler)","args_html":"(assembler : BlockAssembler)","location":{"filename":"src/novika/image.cr","line_number":40,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"visibility":"Public","body":""}}],"macros":[{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/SnapshotType","path":"Novika/SnapshotType.html","kind":"enum","full_name":"Novika::SnapshotType","name":"SnapshotType","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Word","name":"Word","value":"0_u8"},{"id":"BlockRef","name":"BlockRef","value":"1_u8"},{"id":"SmallDecimal","name":"SmallDecimal","value":"2_u8"},{"id":"LargeDecimal","name":"LargeDecimal","value":"3_u8"},{"id":"Quote","name":"Quote","value":"4_u8"},{"id":"QuotedWord","name":"QuotedWord","value":"5_u8"},{"id":"Boolean","name":"Boolean","value":"6_u8"},{"id":"Color","name":"Color","value":"7_u8"},{"id":"Builtin","name":"Builtin","value":"8_u8"},{"id":"Byteslice","name":"Byteslice","value":"9_u8"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds the type of a snapshot.\n\nMembers are sorted by their frequency in code (eyeballed),\nnot to say that it matters.","summary":"Holds the type of a snapshot.
","instance_methods":[{"html_id":"block_ref?-instance-method","name":"block_ref?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":13,"url":null},"def":{"name":"block_ref?","visibility":"Public","body":"self == BlockRef"}},{"html_id":"boolean?-instance-method","name":"boolean?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":18,"url":null},"def":{"name":"boolean?","visibility":"Public","body":"self == Boolean"}},{"html_id":"builtin?-instance-method","name":"builtin?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":20,"url":null},"def":{"name":"builtin?","visibility":"Public","body":"self == Builtin"}},{"html_id":"byteslice?-instance-method","name":"byteslice?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":21,"url":null},"def":{"name":"byteslice?","visibility":"Public","body":"self == Byteslice"}},{"html_id":"color?-instance-method","name":"color?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":19,"url":null},"def":{"name":"color?","visibility":"Public","body":"self == Color"}},{"html_id":"large_decimal?-instance-method","name":"large_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":15,"url":null},"def":{"name":"large_decimal?","visibility":"Public","body":"self == LargeDecimal"}},{"html_id":"quote?-instance-method","name":"quote?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":16,"url":null},"def":{"name":"quote?","visibility":"Public","body":"self == Quote"}},{"html_id":"quoted_word?-instance-method","name":"quoted_word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":17,"url":null},"def":{"name":"quoted_word?","visibility":"Public","body":"self == QuotedWord"}},{"html_id":"small_decimal?-instance-method","name":"small_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":14,"url":null},"def":{"name":"small_decimal?","visibility":"Public","body":"self == SmallDecimal"}},{"html_id":"word?-instance-method","name":"word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":12,"url":null},"def":{"name":"word?","visibility":"Public","body":"self == Word"}}]},{"html_id":"novika/Novika/StructLayoutForm","path":"Novika/StructLayoutForm.html","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin form wrapper around `FFI::StructLayout`. Lazily parses\na struct layout definition and keeps the corresponding\n`FFI::StructLayout` in sync.","summary":"A thin form wrapper around FFI::StructLayout
.
Initializes a struct layout form.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","args_html":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":250,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, names, types, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(layout:Novika::FFI::StructLayout,comment:Nil|String)-class-method","name":"new","doc":"Initializes a struct layout form from the given *layout*.\nThe layout must contain at least one field.","summary":"Initializes a struct layout form from the given layout.
","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","args_html":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":295,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if layout == other.layout\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":287,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@comment ? io << @comment : to_s(io)"}},{"html_id":"layout(outerset=nil)-instance-method","name":"layout","doc":"Returns the underlying layout.","summary":"Returns the underlying layout.
","abstract":false,"args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"args_string":"(outerset = nil)","args_html":"(outerset = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":268,"url":null},"def":{"name":"layout","args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"visibility":"Public","body":"if @layout.field_count > 0 || outerset.try(&.includes?(object_id))\n return @layout\nend\nif this = @this\nelse\n return @layout\nend\nif names = @names\nelse\n return @layout\nend\nif types = @types\nelse\n return @layout\nend\nnames.zip(types) do |name, typename|\n parser = StructLayoutParser.new(this, typename, name, self, outerset)\n @layout.add(name.id, parser.parse)\nend\n@layout\n"}},{"html_id":"object_id(*args,**options)-instance-method","name":"object_id","doc":"Since `StructLayoutForm` is a struct, it doesn't have its own\nobject id, and instead borrows it from the names array, which\nis assumed to be created personally for this struct layout form.","summary":"Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Parses types in struct layouts.
","constructors":[{"html_id":"new(this,typename,field:Word,current:StructLayoutForm,outerset:Set(UInt64)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"args_string":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","args_html":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":171,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename, field, current, outerset)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":219,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).inline\n"}},{"html_id":"on_struct_reference(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":225,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"add_to_outerset\n(form.layout(@outerset)).reference\n"}},{"html_id":"on_union(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":213,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).union\n"}}]},{"html_id":"novika/Novika/StructViewForm","path":"Novika/StructViewForm.html","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":85,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::StructView` and its descendants.\n\nThis form is a readable and submittable store, which means you\ncan read (e.g. `entry:fetch`) and submit (e.g. `entry:submit`)\nto exsisting entries.","summary":"A thin wrapper around FFI::StructView
and its descendants.
Returns whether this and other struct views are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":162,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @view == (other.@view)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"view.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"view.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":151,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":108,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"if name.is_a?(Word)\n @view[name.id]?.try(&.to_form?)\nend"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":104,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Word) ? @view.has_field?(name.id) : false"}},{"html_id":"inline?-instance-method","name":"inline?","doc":"Returns whether this view is an inline struct view.","summary":"Returns whether this view is an inline struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":138,"url":null},"def":{"name":"inline?","visibility":"Public","body":"view.is_a?(FFI::InlineStructView)"}},{"html_id":"layout:StructLayoutForm-instance-method","name":"layout","doc":"Returns the struct layout of the underlying struct view.","summary":"Returns the struct layout of the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":100,"url":null},"def":{"name":"layout","return_type":"StructLayoutForm","visibility":"Public","body":"StructLayoutForm.new(view.layout, comment: nil)"}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":120,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\nfalse\n"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":126,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\ntrue\n"}},{"html_id":"reference?-instance-method","name":"reference?","doc":"Returns whether this view is a struct reference view.","summary":"Returns whether this view is a struct reference view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":133,"url":null},"def":{"name":"reference?","visibility":"Public","body":"view.is_a?(FFI::StructReferenceView)"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/foreign.cr","line_number":112,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if name.is_a?(Word)\nelse\n return\nend\n(@view.layout.desc?(name.id)).try do |desc|\n @view[name.id] = desc.type.from(form)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":155,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << @view"}},{"html_id":"union?-instance-method","name":"union?","doc":"Returns whether this view is a union view.","summary":"Returns whether this view is a union view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":143,"url":null},"def":{"name":"union?","visibility":"Public","body":"view.is_a?(FFI::UnionView)"}},{"html_id":"view:FFI::StructView-instance-method","name":"view","doc":"Returns the underlying struct view.","summary":"Returns the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":91,"url":null},"def":{"name":"view","return_type":"FFI::StructView","visibility":"Public","body":"@view"}}]},{"html_id":"novika/Novika/Substrate","path":"Novika/Substrate.html","kind":"module","full_name":"Novika::Substrate(T)","name":"Substrate","abstract":false,"locations":[{"filename":"src/novika/substrate.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Substrate is a fast, low-level copy-on-write wrapper for\nan array.","summary":"Substrate is a fast, low-level copy-on-write wrapper for an array.
","class_methods":[{"html_id":"[]-class-method","name":"[]","doc":"Initializes an empty substrate.","summary":"Initializes an empty substrate.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":19,"url":null},"def":{"name":"[]","visibility":"Public","body":"RealSubstrate(T).new"}},{"html_id":"[](*elements)-class-method","name":"[]","doc":"Initializes a substrate with *elements*.","summary":"Initializes a substrate with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/substrate.cr","line_number":24,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"for(elements.to_a)"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Initializes a substrate with *elements* as the underlying array.","summary":"Initializes a substrate with elements as the underlying array.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"args_string":"(elements : Array(T))","args_html":"(elements : Array(T))","location":{"filename":"src/novika/substrate.cr","line_number":29,"url":null},"def":{"name":"for","args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"visibility":"Public","body":"RealSubstrate.new(elements)"}}],"instance_methods":[{"html_id":"==(other)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/substrate.cr","line_number":96,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"other.is_a?(Substrate) && (array == other.array)"}},{"html_id":"at!(index)-instance-method","name":"at!","doc":"Unsafely fetches the element at *index*.","summary":"Unsafely fetches the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":37,"url":null},"def":{"name":"at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"array.unsafe_fetch(index)"}},{"html_id":"at?(index)-instance-method","name":"at?","doc":"Returns the element at *index*. Returns nil if *index* is\nout of bounds, i.e., *not* in `0 <= index < count`.","summary":"Returns the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":48,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if index.in?(0...count)\n at!(index)\nend"}},{"html_id":"copy-instance-method","name":"copy","doc":"Returns a copy of this substrate.","summary":"Returns a copy of this substrate.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":79,"url":null},"def":{"name":"copy","visibility":"Public","body":""}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of elements in the array.","summary":"Returns the amount of elements in the array.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":42,"url":null},"def":{"name":"count","visibility":"Public","body":"array.size"}},{"html_id":"delete?(atindex)-instance-method","name":"delete?","doc":"Deletes the element at *index*. Returns nil if *index* is\nout of bounds (see `at?`).","summary":"Deletes the element at index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""}],"args_string":"(at index)","args_html":"(at index)","location":{"filename":"src/novika/substrate.cr","line_number":73,"url":null},"def":{"name":"delete?","args":[{"name":"index","external_name":"at","restriction":""}],"visibility":"Public","body":""}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"Same as `Array#each`.","summary":"Same as Array#each
.
Same as Array#each
.
Adds element before index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"args_string":"(at index, element)","args_html":"(at index, element)","location":{"filename":"src/novika/substrate.cr","line_number":69,"url":null},"def":{"name":"insert?","args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":""}},{"html_id":"map!(&:T->T|Nil)-instance-method","name":"map!","doc":"Replaces elements of this substrate with the result of the\nblock. If the result is nil, leaves the original element.","summary":"Replaces elements of this substrate with the result of the block.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":90,"url":null},"def":{"name":"map!","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> T | ::Nil)"},"visibility":"Public","body":""}},{"html_id":"slice_at!(index)-instance-method","name":"slice_at!","doc":"Splits this substrate in two at *index*. Returns the two\nresulting substrates.\n\nThis method is unsafe: it does not check whether *index*\nis in bounds.","summary":"Splits this substrate in two at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":57,"url":null},"def":{"name":"slice_at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"lhs = Array(T).new(index) do |i|\n at!(i)\nend\nrhs = Array(T).new(count - index) do |j|\n at!(index + j)\nend\n{RealSubstrate.new(lhs), RealSubstrate.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"Sorts elements of this substrate inplace, using a *cmp*\ncomparator proc for comparing two elements.","summary":"Sorts elements of this substrate inplace, using a cmp comparator proc for comparing two elements.
","abstract":true,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/substrate.cr","line_number":94,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":""}},{"html_id":"unsafe_paste(other:Substrate(T),index,other_start,other_insert_count)-instance-method","name":"unsafe_paste","doc":"Pastes *count* elements of other starting at *b*egin, to\n*dest* index in self, without doing any checks whatsoever.\n\nA lot of undefined behavior unless you are sure all\nnumbers are good.","summary":"Pastes count elements of other starting at begin, to dest index in self, without doing any checks whatsoever.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"args_string":"(other : Substrate(T), index, other_start, other_insert_count)","args_html":"(other : Substrate(T), index, other_start, other_insert_count)","location":{"filename":"src/novika/substrate.cr","line_number":86,"url":null},"def":{"name":"unsafe_paste","args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Tape","path":"Novika/Tape.html","kind":"struct","full_name":"Novika::Tape(T)","name":"Tape","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/tape.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A `Substrate` with an integer cursor.","summary":"A Substrate
with an integer cursor.
Initializes a tape with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/tape.cr","line_number":23,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"Tape.new(Substrate[*elements])"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Creates a tape from an existing array of *elements*, which\nwill be used as the underlying container for `Substrate`.\nThis means that all mutations of substrate will be performed\non the *elements* array, and vice versa.","summary":"Creates a tape from an existing array of elements, which will be used as the underlying container for Substrate
.
Adds element before the cursor, and advances the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":57,"url":null},"def":{"name":"add","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor + 1)"}},{"html_id":"at!(*args,**options)-instance-method","name":"at!","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
Returns a shallow copy of this tape.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":133,"url":null},"def":{"name":"copy","visibility":"Public","body":"Tape.new(substrate.copy, cursor)"}},{"html_id":"count(*args,**options)-instance-method","name":"count","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Returns the cursor position.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":9,"url":null},"def":{"name":"cursor","return_type":"Int32","visibility":"Public","body":"@cursor"}},{"html_id":"drop?-instance-method","name":"drop?","doc":"Removes the element before the cursor, and moves the cursor\nback once. Returns the resulting tape.","summary":"Removes the element before the cursor, and moves the cursor back once.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":82,"url":null},"def":{"name":"drop?","visibility":"Public","body":"Tape.new((substrate.delete?(cursor - 1)) || (return), cursor - 1)"}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Drops and returns the element after cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":92,"url":null},"def":{"name":"eject?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new((substrate.delete?(cursor)).not_nil!, cursor), element}\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this tape is empty (has no elements).","summary":"Returns whether this tape is empty (has no elements).
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":31,"url":null},"def":{"name":"empty?","visibility":"Public","body":"count.zero?"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Adds element after cursor without moving the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":87,"url":null},"def":{"name":"inject","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor)"}},{"html_id":"map!(&)-instance-method","name":"map!","doc":"See `Substrate#map!`.","summary":"See Substrate#map!
.
Fetches the top element, and advances the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":51,"url":null},"def":{"name":"next?","visibility":"Public","body":"if cursor < count\n {Tape.new(substrate, cursor + 1), substrate.at!(cursor)}\nend"}},{"html_id":"paste(elements:Tape(T))-instance-method","name":"paste","doc":"Adds elements before cursor in *elements* to this tape.\nAdvances the cursor.","summary":"Adds elements before cursor in elements to this tape.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"args_string":"(elements : Tape(T))","args_html":"(elements : Tape(T))","location":{"filename":"src/novika/tape.cr","line_number":63,"url":null},"def":{"name":"paste","args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"visibility":"Public","body":"Tape.new(substrate.unsafe_paste(elements.substrate, index: cursor, other_start: 0, other_insert_count: elements.cursor), cursor + elements.cursor)"}},{"html_id":"resub(other)-instance-method","name":"resub","doc":"Replaces this tape's substrate with other. *cursor* is\nleft where it was in self if it fits, else is moved to\nthe end.","summary":"Replaces this tape's substrate with other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/tape.cr","line_number":108,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"substrate.deref\nTape.new(other.substrate.copy, Math.min(cursor, other.count))\n"}},{"html_id":"slice:Tuple(Tape(T),Tape(T))-instance-method","name":"slice","doc":"Slices this tape's substrate at cursor, returns the\ntwo resulting tape halves.","summary":"Slices this tape's substrate at cursor, returns the two resulting tape halves.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":126,"url":null},"def":{"name":"slice","return_type":"::Tuple(Tape(T), Tape(T))","visibility":"Public","body":"lhs, rhs = substrate.slice_at!(cursor)\n{Tape.new(lhs), Tape.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"See `Substrate#sort_using!`","summary":"","abstract":false,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/tape.cr","line_number":120,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":"Tape.new(substrate.sort_using!(cmp), cursor)"}},{"html_id":"swap?-instance-method","name":"swap?","doc":"Swaps two elements before the cursor.","summary":"Swaps two elements before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":74,"url":null},"def":{"name":"swap?","visibility":"Public","body":"if cursor < 2\n return\nend\nTape.new(substrate.unsafe_swap(cursor - 2, cursor - 1), cursor)\n"}},{"html_id":"thru?-instance-method","name":"thru?","doc":"Returns the element after cursor and moves the cursor forward.","summary":"Returns the element after cursor and moves the cursor forward.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":99,"url":null},"def":{"name":"thru?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new(substrate, cursor + 1), element}\n"}},{"html_id":"to?(cursorposition)-instance-method","name":"to?","doc":"Moves the cursor to *position*. Returns the resulting tape\non success, nil if position is out of bounds (see `Substrate#at?`).","summary":"Moves the cursor to position.
","abstract":false,"args":[{"name":"position","external_name":"cursor","restriction":""}],"args_string":"(cursor position)","args_html":"(cursor position)","location":{"filename":"src/novika/tape.cr","line_number":44,"url":null},"def":{"name":"to?","args":[{"name":"position","external_name":"cursor","restriction":""}],"visibility":"Public","body":"if position.in?(0..count)\n Tape.new(substrate, position)\nend"}},{"html_id":"top?-instance-method","name":"top?","doc":"Returns the element before the cursor.","summary":"Returns the element before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":36,"url":null},"def":{"name":"top?","visibility":"Public","body":"if cursor.zero?\n return\nend\nsubstrate.at!(cursor - 1)\n"}}]},{"html_id":"novika/Novika/True","path":"Novika/True.html","kind":"struct","full_name":"Novika::True","name":"True","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":45,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a truthy `Boolean`.","summary":"Represents a truthy Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean true\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::TypedSnapshot]","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"enum\", name: type, cls: UInt8, onlyif: nil, verify: nil, value: nil, encoding: SnapshotType}, {type: \"basic\", name: snapshot, cls: Snapshot, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}},{"html_id":"from_io(io:IO,format:IO::ByteFormat=IO::ByteFormat::BigEndian)-class-method","name":"from_io","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"args_string":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","args_html":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","location":{"filename":"src/novika/image.cr","line_number":304,"url":null},"def":{"name":"from_io","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"visibility":"Public","body":"type = SnapshotType.new(io.read_bytes(UInt8, format))\nsnapshot = case type\nin .block_ref?\n io.read_bytes(BlockRefSnapshot, format)\nin .boolean?\n io.read_bytes(BooleanSnapshot, format)\nin .color?\n io.read_bytes(ColorSnapshot, format)\nin .small_decimal?\n io.read_bytes(SmallDecimalSnapshot, format)\nin .large_decimal?\n io.read_bytes(LargeDecimalSnapshot, format)\nin .quote?\n io.read_bytes(QuoteSnapshot, format)\nin .word?\n io.read_bytes(WordSnapshot, format)\nin .quoted_word?\n io.read_bytes(QuotedWordSnapshot, format)\nin .builtin?\n io.read_bytes(BuiltinSnapshot, format)\nin .byteslice?\n io.read_bytes(BytesliceSnapshot, format)\nend\nnew(type, snapshot)\n"}}],"constructors":[{"html_id":"new(type:Novika::SnapshotType,snapshot:Novika::Snapshot)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"args_string":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","args_html":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","location":{"filename":"src/novika/image.cr","line_number":296,"url":null},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, snapshot)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(form:Block)-class-method","name":"new","doc":"Creates the corresponding `TypedSnapshot` for *form*.","summary":"Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Raises: no overload for form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":""}],"args_string":"(form)","args_html":"(form)","location":{"filename":"src/novika/image.cr","line_number":382,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":""}],"visibility":"Public","body":"raise(\"no overload for #{form.class}\")"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":288,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"snapshot:Snapshot-instance-method","name":"snapshot","doc":"Holds the `Snapshot` object.","summary":"Holds the Snapshot
object.
Holds the Snapshot
object.
See Snapshot#to_form
.
Holds the type of the #snapshot
.
Holds the type of the #snapshot
.
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ValueForm","path":"Novika/ValueForm.html","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm","abstract":false,"locations":[{"filename":"src/novika/forms/form.cr","line_number":88,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are classes (that is, reference types) that want\nto pretend they're value forms, i.e., value types.","summary":"Includers are classes (that is, reference types) that want to pretend they're value forms, i.e., value types.
"},{"html_id":"novika/Novika/Word","path":"Novika/Word.html","kind":"struct","full_name":"Novika::Word","name":"Word","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Words open entries they're assigned to in the dictionary\nof their enclosing block.","summary":"Words open entries they're assigned to in the dictionary of their enclosing block.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":17,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"word\""}}],"constructors":[{"html_id":"new(id:String)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/forms/words.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if id == other.id\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":13,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"word named '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":8,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":31,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"if entry = engine.block.entry_for?(self)\n entry.on_open(engine)\n return self\nend\nblock = current = engine.block\nwhile block && (trap = block.entry_for?(Hook.trap))\n form = trap.form\n if form.is_a?(Block) && (form.prototype.same?(current.prototype))\n block = block.parent?\n next\n end\n engine.stack.add(Word.new(id))\n trap.on_open(engine)\n return self\nend\ndie(\"definition for #{self} not found in the enclosing block(s)\")\nself\n"}},{"html_id":"private?-instance-method","name":"private?","doc":"Returns whether this word is private (by convention).","summary":"Returns whether this word is private (by convention).
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":22,"url":null},"def":{"name":"private?","visibility":"Public","body":"(id.prefixed_by?('_')) && (!(id.ends_with?('_')))"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds a level of quoting so this word becomes a quoted word.","summary":"Adds a level of quoting so this word becomes a quoted word.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":27,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(@id)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":67,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if id.in?(\"true\", \"false\")\n io << \"#\"\nend\nio << id\n"}}]},{"html_id":"novika/Novika/WordSnapshot","path":"Novika/WordSnapshot.html","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":196,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::WordSnapshot]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Word)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Word"}],"args_string":"(form : Word)","args_html":"(form : Word)","location":{"filename":"src/novika/image.cr","line_number":206,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Word"}],"visibility":"Public","body":"word = new\nword.id = form.id\nword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":197,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":202,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Word.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Set","path":"Set.html","kind":"struct","full_name":"Set(T)","name":"Set","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika.cr","line_number":19,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"}],"doc":"`Set` implements a collection of unordered values with no duplicates.\n\nAn `Enumerable` object can be converted to `Set` using the `#to_set` method.\n\n`Set` uses `Hash` as storage, so you must note the following points:\n\n* Equality of elements is determined according to `Object#==` and `Object#hash`.\n* `Set` assumes that the identity of each element does not change while it is stored. Modifying an element of a set will render the set to an unreliable state.\n\n### Example\n\n```\ns1 = Set{1, 2}\ns2 = [1, 2].to_set\ns3 = Set.new [1, 2]\ns1 == s2 # => true\ns1 == s3 # => true\ns1.add(2)\ns1.concat([6, 8])\ns1.subset_of? s2 # => false\ns2.subset_of? s1 # => true\n```","summary":"Set
implements a collection of unordered values with no duplicates.
A String
represents an immutable sequence of UTF-8 characters.
Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"args_string":"(prefix : String) : Bool","args_html":"(prefix : String) : Bool","location":{"filename":"src/novika.cr","line_number":9,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"bytesize > prefix.bytesize && (starts_with?(prefix))"}},{"html_id":"prefixed_by?(prefix:Char):Bool-instance-method","name":"prefixed_by?","doc":"Returns whether this string starts with *prefix* but also\nhas other characters after it.","summary":"Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"args_string":"(prefix : Char) : Bool","args_html":"(prefix : Char) : Bool","location":{"filename":"src/novika.cr","line_number":14,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"return_type":"Bool","visibility":"Public","body":"bytesize > 1 && (starts_with?(prefix))"}}]},{"html_id":"novika/Union","path":"Union.html","kind":"struct","full_name":"Union(*T)","name":"Union","abstract":false,"superclass":{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},"ancestors":[{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"doc":"A union type represents the possibility of a variable or an expression\nhaving more than one possible type at compile time.\n\nWhen invoking a method on a union type, the language checks that the\nmethod exists and can be resolved (typed) for each type in the union.\nFor this reason, adding instance methods to `Union` makes no sense and\nhas no effect. However, adding class method to `Union` is possible\nand can be useful. One example is parsing `JSON` into one of many\npossible types.\n\nUnion is special in that it is a generic type but instantiating it\nmight not return a union type:\n\n```\nUnion(Int32 | String) # => (Int32 | String)\nUnion(Int32) # => Int32\nUnion(Int32, Int32, Int32) # => Int32\n```","summary":"A union type represents the possibility of a variable or an expression having more than one possible type at compile time.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","doc":"Joins union members' `Form#typedesc`.","summary":"Joins union members' Form#typedesc
.
An Array
is an ordered, integer-indexed collection of objects of type T.
A pool of BlockIdMap
objects.
Regex that can be used to search for a pattern in Block
comments.
Returns whether the output of Novika should be colorful.
","abstract":false,"location":{"filename":"src/novika.cr","line_number":58,"url":null},"def":{"name":"colorful?","return_type":"Bool","visibility":"Public","body":"((STDOUT.tty? && STDERR.tty?) && (ENV[\"TERM\"]? != \"dumb\")) && (!(ENV.has_key?(\"NO_COLOR\")))"}}],"types":[{"html_id":"novika/Novika/Block","path":"Novika/Block.html","kind":"class","full_name":"Novika::Block","name":"Block","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/block.cr","line_number":338,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"MAX_COUNT_TO_S","name":"MAX_COUNT_TO_S","value":"128","doc":"Maximum amount of forms to display in block string representation.","summary":"Maximum amount of forms to display in block string representation.
"},{"id":"MAX_NESTED_COUNT_TO_S","name":"MAX_NESTED_COUNT_TO_S","value":"12","doc":"Maximum amount of forms to display in string representation\nof *nested* blocks.","summary":"Maximum amount of forms to display in string representation of nested blocks.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Blocks are fundamental to Novika.\n\nThey are a kind of AST node, they hold continuations and\nare continuations, they are arrays, stacks, and hash tables,\nall at the same time.\n\nIn this sense, blocks have *roles*. But any block can be\nany role, and change its role as often and whenever it\nwants or needs to.","summary":"Blocks are fundamental to Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":441,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"block\""}},{"html_id":"with(array:Array(Form),leaf:Bool|Nil=nil)-class-method","name":"with","doc":"Creates and returns an orphan block with *array* being\nits tape substrate's container. See `Tape.for`.","summary":"Creates and returns an orphan block with array being its tape substrate's container.
","abstract":false,"args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"args_string":"(array : Array(Form), leaf : Bool | Nil = nil)","args_html":"(array : Array(Form), leaf : Bool | Nil = nil)","location":{"filename":"src/novika/forms/block.cr","line_number":411,"url":null},"def":{"name":"with","args":[{"name":"array","external_name":"array","restriction":"Array(Form)"},{"name":"leaf","default_value":"nil","external_name":"leaf","restriction":"Bool | ::Nil"}],"visibility":"Public","body":"new(parent: nil, tape: Tape.for(array), leaf: leaf.nil? ? array.includes?(Block) : leaf)"}},{"html_id":"with(form1:Form,form2:Form)-class-method","name":"with","doc":"Double-*form* optimized version of `Block.with`.","summary":"Double-form optimized version of Block.with
.
Single-form optimized version of Block.with
.
Loose equality: for two blocks to be loosely equal, their tapes and their dictionaries must be loosely equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other) : Bool","args_html":"(other) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":1136,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"return_type":"Bool","visibility":"Public","body":"if other.is_a?(self)\nelse\n return false\nend\nif same?(other)\n return true\nend\nif count == other.count\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive(:==) do\n result = true\n if has_tape? || other.has_tape?\n result && (result = tape == other.tape)\n end\n if has_dict? || other.has_dict?\n result && (result = dict == other.dict)\n end\nend\nexecuted && result\n"}},{"html_id":"a(type:T.class,_depth=0):TforallT-instance-method","name":"a","doc":"Converts this block into the given *type*. Code execution\nmay be required, hence the need for *engine*. If failed,\nsame as `Form#a`.","summary":"Converts this block into the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"args_string":"(type : T.class, _depth = 0) : T forall T","args_html":"(type : T.class, _depth = 0) : T forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1237,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"},{"name":"_depth","default_value":"0","external_name":"_depth","restriction":""}],"return_type":"T","visibility":"Public","body":"if self.is_a?(T)\n return self\nend\n(case T\nwhen Decimal.class\n a?(Hook.as_decimal, type, _depth)\nwhen Quote.class\n a?(Hook.as_quote, type, _depth)\nwhen Word.class\n a?(Hook.as_word, type, _depth)\nwhen Color.class\n a?(Hook.as_color, type, _depth)\nwhen Boolean.class\n a?(Hook.as_boolean, type, _depth)\nwhen QuotedWord.class\n a?(Hook.as_quoted_word, type, _depth)\nwhen Byteslice.class\n a?(Hook.as_byteslice, type, _depth)\nend) || (afail(T))\n"}},{"html_id":"add(form:Form):self-instance-method","name":"add","doc":"Adds *form* to the tape.","summary":"Adds form to the tape.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":628,"url":null},"def":{"name":"add","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"impl = ->(other : Form) do\n if other.is_a?(Block)\n self.leaf = false\n end\n self.tape = tape.add(other)\nend\nif hook = flat_at?(Hook.on_shove)\n default = Builtin.new(\"__shove__\", desc: \"( F -- ): default __shove__ implementation. Pushes Form to\\n the block it was captured in.\") do |_, stack|\n impl.call(stack.drop)\n end\n stack = Block.with(form, default)\n Engine.exhaust(Engine.current.capabilities, hook, stack)\nelse\n impl.call(form)\nend\nself\n"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a block of forms between *b* and *e*, both\ninclusive. Clamps *b* and *e* to bounds.","summary":"Returns a block of forms between b and e, both inclusive.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/block.cr","line_number":568,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"if has_tape?\nelse\n return Block.new\nend\nb = Math.max(b, 0)\ne = Math.min(e, count - 1)\nBlock.with((b..e).map do |index|\n at(index)\nend)\n"}},{"html_id":"at(name:Form,entry:Entry):self-instance-method","name":"at","doc":"Binds *name* to *entry* in this block's dictionary.","summary":"Binds name to entry in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : self","args_html":"(name : Form, entry : Entry) : self","location":{"filename":"src/novika/forms/block.cr","line_number":995,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"self","visibility":"Public","body":"tap do\n dict.set(name, entry)\nend"}},{"html_id":"at(name:Form,form:Form):self-instance-method","name":"at","doc":"Binds *name* to *form* in this block's dictionary.","summary":"Binds name to form in this block's dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form) : self","args_html":"(name : Form, form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1000,"url":null},"def":{"name":"at","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"at(name, Entry.new(form))"}},{"html_id":"at(index:Int32):Form-instance-method","name":"at","doc":"Returns the form at *index* in the tape. Dies if *index*\nis out of bounds. See `Tape#at?`.","summary":"Returns the form at index in the tape.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : Form","args_html":"(index : Int32) : Form","location":{"filename":"src/novika/forms/block.cr","line_number":560,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"index out of bounds\")\nend\n(tape.at?(index)) || (die(\"index out of bounds\"))\n"}},{"html_id":"at(name:String,desc=\"abuiltin\",&code:Engine,Block->):self-instance-method","name":"at","doc":"Makes an `OpenEntry` called *name* for *code* wrapped\nin `Builtin`.","summary":"Makes an OpenEntry
called name for code wrapped in Builtin
.
Makes an OpenEntry
called name for code wrapped in Builtin
.
Returns the form at index, or nil.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/forms/block.cr","line_number":552,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.at?(index)\n"}},{"html_id":"befriend(other:Block):self-instance-method","name":"befriend","doc":"Adds *other* to the friendlist of this block.","summary":"Adds other to the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":747,"url":null},"def":{"name":"befriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"friends.add(other)\nself\n"}},{"html_id":"can_be?(type:T.class):BoolforallT-instance-method","name":"can_be?","doc":"Returns whether this block implements hook(s) needed\nfor behaving like *type*. See also: `a(type)`.","summary":"Returns whether this block implements hook(s) needed for behaving like type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : Bool forall T","args_html":"(type : T.class) : Bool forall T","location":{"filename":"src/novika/forms/block.cr","line_number":1253,"url":null},"def":{"name":"can_be?","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"Bool","visibility":"Public","body":"if self.is_a?(T)\n return true\nend\ncase T\nwhen Decimal.class\n flat_has?(Hook.as_decimal)\nwhen Quote.class\n flat_has?(Hook.as_quote)\nwhen Word.class\n flat_has?(Hook.as_word)\nwhen Color.class\n flat_has?(Hook.as_color)\nwhen Boolean.class\n flat_has?(Hook.as_boolean)\nwhen QuotedWord.class\n flat_has?(Hook.as_quoted_word)\nwhen Byteslice.class\n flat_has?(Hook.as_byteslice)\nelse\n false\nend\n"}},{"html_id":"clear_entries:self-instance-method","name":"clear_entries","doc":"Removes all owned dictionary entries in this block.","summary":"Removes all owned dictionary entries in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1052,"url":null},"def":{"name":"clear_entries","return_type":"self","visibility":"Public","body":"dict.clear\nself\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of forms in this block.","summary":"Returns the amount of forms in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":526,"url":null},"def":{"name":"count","visibility":"Public","body":"has_tape? ? tape.count : 0"}},{"html_id":"cursor-instance-method","name":"cursor","doc":"Returns the cursor position in this block.","summary":"Returns the cursor position in this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":521,"url":null},"def":{"name":"cursor","visibility":"Public","body":"has_tape? ? tape.cursor : 0"}},{"html_id":"delete_at(index:Int32):self-instance-method","name":"delete_at","doc":"Deletes the form at *index*. Does nothing if index is out\nof bounds.","summary":"Deletes the form at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1034,"url":null},"def":{"name":"delete_at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if delpt = tape.to?(index + 1)\nelse\n return self\nend\nif delpt.drop?\nelse\n return self\nend\nself.tape = (tape.to?(Math.min(cursor, delpt.count))).not_nil!\nself\n"}},{"html_id":"delete_entry(name:Form):self-instance-method","name":"delete_entry","doc":"Deletes the entry corresponding to *name* form from the\ndictionary of this block if it exists there. Otherwise,\ndoes nothing.","summary":"Deletes the entry corresponding to name form from the dictionary of this block if it exists there.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : self","args_html":"(name : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1045,"url":null},"def":{"name":"delete_entry","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"dict.del(name)\nself\n"}},{"html_id":"delete_if(&:Form->Bool):self-instance-method","name":"delete_if","doc":"Yields forms from left to right until the block returns `true`\nfor one, then deletes that form. If the block does not return\n`true` for any form, does nothing.","summary":"Yields forms from left to right until the block returns true
for one, then deletes that form.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/block.cr","line_number":437,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << (prototype.comment? || \"a block\")"}},{"html_id":"describe_with?(comment:String,force=false):String|Nil-instance-method","name":"describe_with?","doc":"Sets the block comment of this block to *comment* in\ncase it doesn't have a comment already.\n\nSetting the comment can also be forced by making *force* true.","summary":"Sets the block comment of this block to comment in case it doesn't have a comment already.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"args_string":"(comment : String, force = false) : String | Nil","args_html":"(comment : String, force = false) : String | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":463,"url":null},"def":{"name":"describe_with?","args":[{"name":"comment","external_name":"comment","restriction":"String"},{"name":"force","default_value":"false","external_name":"force","restriction":""}],"return_type":"String | ::Nil","visibility":"Public","body":"if force || (!comment?)\n @comment = dedent(comment)\nend"}},{"html_id":"drop:Form-instance-method","name":"drop","doc":"Removes and returns the top form. Dies if none.","summary":"Removes and returns the top form.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":695,"url":null},"def":{"name":"drop","return_type":"Form","visibility":"Public","body":"impl = -> do\n top.tap do\n self.tape = tape.drop? || (raise(\"unreachable\"))\n end\nend\nif hook = flat_at?(Hook.on_cherry)\n default = Builtin.new(\"__cherry__\", desc: \"( -- ): default __cherry__ implementation.\") do\n impl.call\n end\n stack = Block.with(default)\n (Engine.exhaust(Engine.current.capabilities, hook, stack)).top\nelse\n impl.call\nend\n"}},{"html_id":"dupe:self-instance-method","name":"dupe","doc":"Duplicates the form before the cursor, dies if none.","summary":"Duplicates the form before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":673,"url":null},"def":{"name":"dupe","return_type":"self","visibility":"Public","body":"add(top)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields all forms in this block, *going from left to right*.","summary":"Yields all forms in this block, going from left to right.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":536,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\ntape.each do |form|\n yield form\nend\n"}},{"html_id":"each_entry(&)-instance-method","name":"each_entry","doc":"Yields entry names and `Entry` objects from the dictionary\nof this block.","summary":"Yields entry names and Entry
objects from the dictionary of this block.
Yields entry name forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":908,"url":null},"def":{"name":"each_entry_name","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |name, _|\n yield name\nend"}},{"html_id":"each_entry_value(&)-instance-method","name":"each_entry_value","doc":"Yields entry value forms in this block's dictionary.","summary":"Yields entry value forms in this block's dictionary.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":915,"url":null},"def":{"name":"each_entry_value","yields":1,"block_arity":1,"visibility":"Public","body":"each_entry do |_, entry|\n yield entry.form\nend"}},{"html_id":"each_friend(&)-instance-method","name":"each_friend","doc":"Yields friends of this block. Asserts each is a block,\notherwise, dies (e.g. the user may have mistakenly\nadded some other form).","summary":"Yields friends of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":735,"url":null},"def":{"name":"each_friend","yields":1,"block_arity":1,"visibility":"Public","body":"if has_friends?\nelse\n return\nend\nfriends.reverse_each do |friend|\n if friend.is_a?(Block)\n else\n die(\"expected a block, got #{friend.class.typedesc} for a friend\")\n end\n yield friend\nend\n"}},{"html_id":"each_neighbor(payload:Block->T|Nil,visited:BlockIdMap|Nil=nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","args_html":"(payload : Block -> T | Nil, visited : BlockIdMap | Nil = nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":856,"url":null},"def":{"name":"each_neighbor","args":[{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"visibility":"Public","body":"each do |form|\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\nif has_dict?\nelse\n return\nend\ndict.each do |_, entry|\n form = entry.form\n if form.is_a?(Block)\n else\n next\n end\n if visited.try(&.has_key?(form.object_id))\n next\n end\n visited || (visited = BlockIdMap.new)\n visited[form.object_id] = form\n if payload.call(form)\n return\n end\n form.each_neighbor(payload, visited)\nend\n"}},{"html_id":"each_neighbor(visited:BlockIdMap|Nil=nil,&payload:Block->T|Nil)forallT-instance-method","name":"each_neighbor","doc":"Explores neighbor blocks of this block, calls *payload* with\neach such neighbor block. Records all neighbors it visited in\n*visited*.\n\n*Explicitly nested* (marked as *ExN1-2* in the diagram below)\nneighbor blocks are blocks found in the dictionary and tape of\nthis block (marked as *B* in the diagram below).\n\n*Implicitly nested* (marked as *ImN1-4* in the diagram below)\nneighbor blocks are blocks in the tapes and dictionaries of\nexplicitly nested neighbor blocks, and so on, recursively.\n\n```text\n┌───────────────────────────────────────┐\n│ B │\n│ ┌───────────────┐ ┌───────────────┐ │\n│ │ ExN1 │ │ ExN2 │ │\n│ │ ┌────┐ ┌────┐ │ │ ┌────┐ ┌────┐ │ │\n│ │ │ImN1│ │ImN2│ │ │ │ImN3│ │ImN4│ │ │\n│ │ └────┘ └────┘ │ │ └────┘ └────┘ │ │\n│ │ ... ... │ │ ... ... │ │\n│ └───────────────┘ └───────────────┘ │\n│ │\n└───────────────────────────────────────┘\n```","summary":"Explores neighbor blocks of this block, calls payload with each such neighbor block.
","abstract":false,"args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"args_string":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","args_html":"(visited : BlockIdMap | Nil = nil, &payload : Block -> T | Nil) forall T","location":{"filename":"src/novika/forms/block.cr","line_number":893,"url":null},"def":{"name":"each_neighbor","args":[{"name":"visited","default_value":"nil","external_name":"visited","restriction":"BlockIdMap | ::Nil"}],"yields":1,"block_arity":1,"block_arg":{"name":"payload","external_name":"payload","restriction":"(Block -> T | ::Nil)"},"visibility":"Public","body":"each_neighbor(payload, visited)"}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* found in this\nblock. Matching is done using loose equality `==(other)`.","summary":"Yields occurrences of the given pattern found in this block.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/block.cr","line_number":1159,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\neach do |form|\n if pattern == form\n yield index\n end\n index = index + 1\nend\n"}},{"html_id":"each_relative_fetch(fetcher:Block->T|Nil,seen:BlockIdMap|Nil=nil,skip_self:Bool=false,history:Block|Nil=nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"args_string":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","args_html":"(fetcher : Block -> T | Nil, seen : BlockIdMap | Nil = nil, skip_self : Bool = false, history : Block | Nil = nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":792,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},{"name":"seen","default_value":"nil","external_name":"seen","restriction":"BlockIdMap | ::Nil"},{"name":"skip_self","default_value":"false","external_name":"skip_self","restriction":"Bool"},{"name":"history","default_value":"nil","external_name":"history","restriction":"Block | ::Nil"}],"return_type":"T | ::Nil","visibility":"Public","body":"if skip_self && (!has_relatives?)\n return\nend\nif history\nelse\n v0 = skip_self ? nil : self\n ilist = PIlist.make(self)\n ilist.each(v0) do |fastpath|\n if value = fetcher.call(fastpath)\n else\n next\n end\n return value\n end\nend\nacquired = seen.nil?\nseen || (seen = BlockMaps.acquire)\nbegin\n fetch = EachRelativeFetch.new(fetcher, seen, history)\n fetch.on(self, ignore: ilist)\nensure\n if acquired\n BlockMaps.release(seen)\n end\nend\n"}},{"html_id":"each_relative_fetch(*args,**kwargs,&fetcher:Block->T|Nil):T|NilforallT-instance-method","name":"each_relative_fetch","doc":"Explores this block's relatives, i.e., its vertical (parent) and\nhorizontal (friend) hierarchy, calls *fetcher* on each relative.\nThis process is also known as the exploration of the block graph,\nwhere this block is the origin of exploration.\n\nIf *fetcher* returns a value of type `T` (a non-nil) for the given\nblock, exploration terminates. If *fetcher* returns nil, exploration\ncontinues.\n\nThe order of exploration is roughly as follows:\n\n- The first echelon is explored: the parents, friends, and friends\n of parents of this block are explored.\n\n- The second echelon is explored: the parents, friends, and\n friends of parents of the blocks in first echelon are explored\n by recursing on each, effectively allowing lookup that is unlimited\n in terms of depth.\n\n*seen* can be used to disable exploration of specific blocks,\nalso blocking off the exploration of their relatives (if they\nwere not otherwise reached already).\n\n*skip_self* can be set to true to disable calling *fetcher* for\nthis block. Note that if this block is reached by other means\n(e.g. as in `self -- other -- self`), *fetcher* is still going\nto be called.\n\n*history*, a block, can optionally be provided. It will hold all\nexplored blocks leading to the \"discovery\" of `T`.","summary":"Explores this block's relatives, i.e., its vertical (parent) and horizontal (friend) hierarchy, calls fetcher on each relative.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","args_html":"(*args, **kwargs, &fetcher : Block -> T | Nil) : T | Nil forall T","location":{"filename":"src/novika/forms/block.cr","line_number":827,"url":null},"def":{"name":"each_relative_fetch","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"kwargs","external_name":"kwargs","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"block_arg":{"name":"fetcher","external_name":"fetcher","restriction":"(Block -> T | ::Nil)"},"return_type":"T | ::Nil","visibility":"Public","body":"each_relative_fetch(fetcher, *args, **kwargs)"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1273,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << (prototype.comment? =~ EFFECT_PATTERN ? $~[1] : \"a block\")"}},{"html_id":"eject:Form-instance-method","name":"eject","doc":"Drops and returns the form after the cursor. Dies if\ncursor is at the end.","summary":"Drops and returns the form after the cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":612,"url":null},"def":{"name":"eject","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"eject out of bounds\")\nend\nself.tape, _ = tape.eject? || (die(\"eject out of bounds\"))\n"}},{"html_id":"entry_count-instance-method","name":"entry_count","doc":"Returns the amount of entries owned by (defined in) this block.","summary":"Returns the amount of entries owned by (defined in) this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":531,"url":null},"def":{"name":"entry_count","visibility":"Public","body":"has_dict? ? dict.count : 0"}},{"html_id":"entry_for(name:Form):Entry-instance-method","name":"entry_for","doc":"Returns the dictionary entry for *name*, or dies.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or dies.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry","args_html":"(name : Form) : Entry","location":{"filename":"src/novika/forms/block.cr","line_number":942,"url":null},"def":{"name":"entry_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry","visibility":"Public","body":"(entry_for?(name)) || (die(\"no value form for '#{name}'\"))"}},{"html_id":"entry_for?(name:Form):Entry|Nil-instance-method","name":"entry_for?","doc":"Returns the dictionary entry for *name*, or nil.\n\nSee `each_relative` for a detailed description of lookup\norder etc.","summary":"Returns the dictionary entry for name, or nil.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":950,"url":null},"def":{"name":"entry_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if entry = flat_at?(name)\n return entry\nend\neach_relative_fetch(skip_self: true, &.flat_at?(name))\n"}},{"html_id":"flat_at?(name:Form):Entry|Nil-instance-method","name":"flat_at?","doc":"Returns the dictionary entry corresponding to *name*.\nDoes not traverse the block hierarchy.","summary":"Returns the dictionary entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Entry | Nil","args_html":"(name : Form) : Entry | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":980,"url":null},"def":{"name":"flat_at?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Entry | ::Nil","visibility":"Public","body":"if has_dict?\nelse\n return\nend\ndict.get(name) do\nend\n"}},{"html_id":"flat_has?(name:Form):Bool-instance-method","name":"flat_has?","doc":"Returns whether this block's (and this block's only)\ndictionary has an entry corresponding to *name*.","summary":"Returns whether this block's (and this block's only) dictionary has an entry corresponding to name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":988,"url":null},"def":{"name":"flat_has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"if has_dict?\nelse\n return false\nend\ndict.has?(name)\n"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":962,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"(entry_for?(name)).try(&.form)"}},{"html_id":"has_comment?:Bool-instance-method","name":"has_comment?","doc":"Returns whether this block has a comment.","summary":"Returns whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":455,"url":null},"def":{"name":"has_comment?","return_type":"Bool","visibility":"Public","body":"!(!comment?)"}},{"html_id":"has_dict?:Bool-instance-method","name":"has_dict?","doc":"Returns whether this block has a dict.","summary":"Returns whether this block has a dict.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":372,"url":null},"def":{"name":"has_dict?","return_type":"Bool","visibility":"Public","body":"!(!@dict)"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":958,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(!each_relative_fetch do |block|\n (block.flat_has?(name)) || nil\nend)"}},{"html_id":"has_friends?:Bool-instance-method","name":"has_friends?","doc":"Returns whether this block has any friends.","summary":"Returns whether this block has any friends.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":723,"url":null},"def":{"name":"has_friends?","return_type":"Bool","visibility":"Public","body":"(!(!@friends)) && (!friends.count.zero?)"}},{"html_id":"has_relatives?:Bool-instance-method","name":"has_relatives?","doc":"Returns whether this block has a parent, friends, or both.","summary":"Returns whether this block has a parent, friends, or both.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":728,"url":null},"def":{"name":"has_relatives?","return_type":"Bool","visibility":"Public","body":"(!(!parent?)) || has_friends?"}},{"html_id":"has_tape?:Bool-instance-method","name":"has_tape?","doc":"Returns whether this block has a tape.","summary":"Returns whether this block has a tape.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":361,"url":null},"def":{"name":"has_tape?","return_type":"Bool","visibility":"Public","body":"!(!@tape)"}},{"html_id":"import!(fromdonor:Block):self-instance-method","name":"import!","doc":"Imports entries from *donor* to this block's dictionary\nby mutating this block's dictionary.","summary":"Imports entries from donor to this block's dictionary by mutating this block's dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"from","restriction":"Block"}],"args_string":"(from donor : Block) : self","args_html":"(from donor : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":578,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"from","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"dict.import!(donor.dict)\nself\n"}},{"html_id":"includes?(other:Form):Bool-instance-method","name":"includes?","doc":"Returns whether the tape of this block includes *other*,\nas per loose equality `==(other)`.","summary":"Returns whether the tape of this block includes other, as per loose equality #==(other)
.
Adds form after the cursor.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : self","args_html":"(form : Form) : self","location":{"filename":"src/novika/forms/block.cr","line_number":605,"url":null},"def":{"name":"inject","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"self","visibility":"Public","body":"self.tape = tape.inject(form)\nself\n"}},{"html_id":"instance(parentnew_parent:Block=self,shallow=false,__tr:BlockIdMap|Nil=nil):Block-instance-method","name":"instance","doc":"Creates and returns an instance of this block, under the\ngiven *parent*.","summary":"Creates and returns an instance of this block, under the given parent.
","abstract":false,"args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"args_string":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","args_html":"(parent new_parent : Block = self, shallow = false, __tr : BlockIdMap | Nil = nil) : Block","location":{"filename":"src/novika/forms/block.cr","line_number":1169,"url":null},"def":{"name":"instance","args":[{"name":"new_parent","default_value":"self","external_name":"parent","restriction":"Block"},{"name":"shallow","default_value":"false","external_name":"shallow","restriction":""},{"name":"__tr","default_value":"nil","external_name":"__tr","restriction":"BlockIdMap | ::Nil"}],"return_type":"Block","visibility":"Public","body":"copy = self.class.new(parent: new_parent, tape: has_tape? ? tape.copy : nil, prototype: prototype)\nif leaf? || shallow\n return copy\nend\n__tr || (__tr = BlockIdMap.new)\n__tr[object_id] = copy\ncopy.tape = copy.tape.map! do |form|\n if form.is_a?(Block)\n else\n next\n end\n __tr[form.object_id]? || (form.instance(same?(form.parent?) ? copy : form, __tr: __tr))\nend\ncopy.leaf = false\ncopy\n"}},{"html_id":"next?:Form|Nil-instance-method","name":"next?","doc":"See `Tape#next?`.","summary":"See Tape#next?
.
Schedules this block for execution in engine using the safe scheduling method (see Engine#schedule
).
Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":970,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"(entry_for(name)).opener?"}},{"html_id":"parent:Block|Nil-instance-method","name":"parent","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent","return_type":"Block | ::Nil","visibility":"Public","body":"if (value = @parent).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#parent cannot be nil\"))\nelse\n value\nend"}},{"html_id":"parent=(parent:Block|Nil)-instance-method","name":"parent=","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil)","args_html":"(parent : Block | Nil)","location":{"filename":"src/novika/forms/block.cr","line_number":388,"url":null},"def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"parent?:Block|Nil|Nil-instance-method","name":"parent?","doc":"Holds a reference to the parent block (them all in a\nlinked list of ancestors).","summary":"Holds a reference to the parent block (them all in a linked list of ancestors).
","abstract":false,"def":{"name":"parent?","return_type":"Block | ::Nil | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"paste(forms:Block)-instance-method","name":"paste","doc":"Mutably adds forms before the cursor in *forms* block's\ntape after the cursor in this block's tape.","summary":"Mutably adds forms before the cursor in forms block's tape after the cursor in this block's tape.
","abstract":false,"args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"args_string":"(forms : Block)","args_html":"(forms : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":654,"url":null},"def":{"name":"paste","args":[{"name":"forms","external_name":"forms","restriction":"Block"}],"visibility":"Public","body":"if forms.count.zero?\n return\nend\nself.tape = tape.paste(forms.tape)\n"}},{"html_id":"path_to_entry?(name:Form):Tuple(Entry,Block)|Nil-instance-method","name":"path_to_entry?","doc":"Returns a tuple that consists of the dictionary entry\ncorresponding to *name*, followed by the path block which\nholds all blocks leading to the entry.\n\nReturns nil if *name* could not be found.\n\nIn general works like `entry_for` and friends, the only\ndifference being that it also tracks and returns the path.\nThe latter makes this method slightly slower that `entry_for`.","summary":"Returns a tuple that consists of the dictionary entry corresponding to name, followed by the path block which holds all blocks leading to the entry.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Tuple(Entry, Block) | Nil","args_html":"(name : Form) : Tuple(Entry, Block) | Nil","location":{"filename":"src/novika/forms/block.cr","line_number":930,"url":null},"def":{"name":"path_to_entry?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"::Tuple(Entry, Block) | ::Nil","visibility":"Public","body":"path = Block.new\nif entry = each_relative_fetch(history: path, &.flat_at?(name))\nelse\n return\nend\n{entry, path}\n"}},{"html_id":"prototype:Block-instance-method","name":"prototype","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype","return_type":"Block","visibility":"Public","body":"if (value = @prototype).nil?\n ::raise(NilAssertionError.new(\"Novika::Block#prototype cannot be nil\"))\nelse\n value\nend"}},{"html_id":"prototype=(prototype:Block)-instance-method","name":"prototype=","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"args_string":"(prototype : Block)","args_html":"(prototype : Block)","location":{"filename":"src/novika/forms/block.cr","line_number":392,"url":null},"def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"Block"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"prototype?:Block|Nil-instance-method","name":"prototype?","doc":"Returns the prototype of this block. Block instances return\ntheir prototype (AST) blocks, AST blocks return themselves.","summary":"Returns the prototype of this block.
","abstract":false,"def":{"name":"prototype?","return_type":"Block | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/block.cr","line_number":974,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"!(opener?(name))"}},{"html_id":"resub(other:Block):self-instance-method","name":"resub","doc":"Replaces this block's tape with *other*'s.","summary":"Replaces this block's tape with other's.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1105,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"self.tape = has_tape? ? tape.resub(other.tape) : Tape.new(other.tape.substrate)\nself\n"}},{"html_id":"reverse_each(&)-instance-method","name":"reverse_each","doc":"Yields all forms in this block, *going from right to left*.","summary":"Yields all forms in this block, going from right to left.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":543,"url":null},"def":{"name":"reverse_each","yields":1,"block_arity":1,"visibility":"Public","body":"if has_tape?\nelse\n return\nend\n(0...tape.count).reverse_each do |index|\n yield tape.at!(index)\nend\n"}},{"html_id":"schedule(engine:Engine,stack:Block):self-instance-method","name":"schedule","doc":"Schedules an instance of this block for execution, with *stack*\nset as the stack that will be used by the instance during\nexecution.\n\nMoves the cursor of the instance before the first form\nso that the entire block will be executed by *engine*.","summary":"Schedules an instance of this block for execution, with stack set as the stack that will be used by the instance during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1087,"url":null},"def":{"name":"schedule","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\ninstance.schedule!(engine, stack)\nself\n"}},{"html_id":"schedule!(engine:Engine,stack:Block):self-instance-method","name":"schedule!","doc":"Schedules this block for execution, with *stack* set as the\nstack that will be used by this block during execution.\n\nMoves the cursor before the first form so that the entire\nblock will be executed by *engine*.","summary":"Schedules this block for execution, with stack set as the stack that will be used by this block during execution.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(engine : Engine, stack : Block) : self","args_html":"(engine : Engine, stack : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":1073,"url":null},"def":{"name":"schedule!","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"stack","external_name":"stack","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if count.zero?\n return self\nend\nengine.schedule!(stack: stack, block: to(0))\nself\n"}},{"html_id":"shallow:Block-instance-method","name":"shallow","doc":"Returns a shallow copy of this block.","summary":"Returns a shallow copy of this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1096,"url":null},"def":{"name":"shallow","return_type":"Block","visibility":"Public","body":"self.class.new(parent: parent?, tape: has_tape? ? tape.copy : nil, dict: has_dict? ? dict.copy : nil, prototype: prototype)"}},{"html_id":"slice:Tuple(Block,Block)-instance-method","name":"slice","doc":"Slices this block at cursor. This results in two halves,\nwhich are consequently returned.","summary":"Slices this block at cursor.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":685,"url":null},"def":{"name":"slice","return_type":"::Tuple(Block, Block)","visibility":"Public","body":"if has_tape?\nelse\n return {Block.new(parent: self), Block.new(parent: self)}\nend\nlhs, rhs = tape.slice\n{Block.new(parent: self, tape: lhs), Block.new(parent: self, tape: rhs)}\n"}},{"html_id":"slurp(source:String):self-instance-method","name":"slurp","doc":"Parses all forms in string *source*, and adds them to\nthis block.","summary":"Parses all forms in string source, and adds them to this block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String) : self","args_html":"(source : String) : self","location":{"filename":"src/novika/forms/block.cr","line_number":508,"url":null},"def":{"name":"slurp","args":[{"name":"source","external_name":"source","restriction":"String"}],"return_type":"self","visibility":"Public","body":"classifier = Classifier.new(source, block: self)\nScissors.cut(source) do |start, count, dot|\n classifier.classify(start, count, dot)\nend\nclassifier.end\nself\n"}},{"html_id":"sort_using!(&cmp:Form,Form->Int32):self-instance-method","name":"sort_using!","doc":"Sorts this block's tape inplace, calls *cmp* comparator proc\nfor each form pair for a comparison integer -1, 0, or 1.","summary":"Sorts this block's tape inplace, calls cmp comparator proc for each form pair for a comparison integer -1, 0, or 1.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":715,"url":null},"def":{"name":"sort_using!","yields":2,"block_arity":2,"block_arg":{"name":"cmp","external_name":"cmp","restriction":"(Form, Form -> Int32)"},"return_type":"self","visibility":"Public","body":"if has_tape?\nelse\n return self\nend\nself.tape = tape.sort_using!(cmp)\nself\n"}},{"html_id":"spot(io,vicinity=10,colorful=true)-instance-method","name":"spot","doc":"Appends a string representation of this block to *io* in\nwhich only forms in the negative and positive *vicinity*\nof this block's cursor are present, and the word before\nthe cursor is emphasized.\n\nDoes not respect `MAX_COUNT_TO_S`. Does not display quotes.\nDoes not display nested blocks.","summary":"Appends a string representation of this block to io in which only forms in the negative and positive vicinity of this block's cursor are present, and the word before the cursor is emphasized.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"args_string":"(io, vicinity = 10, colorful = true)","args_html":"(io, vicinity = 10, colorful = true)","location":{"filename":"src/novika/forms/block.cr","line_number":1284,"url":null},"def":{"name":"spot","args":[{"name":"io","external_name":"io","restriction":""},{"name":"vicinity","default_value":"10","external_name":"vicinity","restriction":""},{"name":"colorful","default_value":"true","external_name":"colorful","restriction":""}],"visibility":"Public","body":"io << \"[\"\nb = (cursor - vicinity).clamp(0..(count - 1))\ne = (cursor + vicinity).clamp(0..(count - 1))\n(b..e).each do |index|\n form = at(index)\n focus = index == (cursor - 1)\n (Colorize.with.bold.toggle(focus && colorful)).surround(io) do\n case form\n when Block\n io << \" […]\"\n when Quote\n io << \" '…'\"\n else\n (io << \" \") << form\n end\n end\n if focus\n io << (\" |\".colorize.toggle(colorful)).red\n end\nend\nio << \" ]\"\n"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/block.cr","line_number":966,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(entry_for?(name)).try(&.submit(form))"}},{"html_id":"swap:self-instance-method","name":"swap","doc":"Swaps two forms before the cursor, dies if none.","summary":"Swaps two forms before the cursor, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":678,"url":null},"def":{"name":"swap","return_type":"self","visibility":"Public","body":"self.tape = tape.swap? || (die(\"at least two forms required before the cursor\"))\nself\n"}},{"html_id":"thru:Form-instance-method","name":"thru","doc":"Returns form after cursor, and moves cursor past it.\n\nSimilar to `eject`, but doesn't modify the block.","summary":"Returns form after cursor, and moves cursor past it.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":621,"url":null},"def":{"name":"thru","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"thru out of bounds\")\nend\nself.tape, _ = tape.thru? || (die(\"thru out of bounds\"))\n"}},{"html_id":"to(index:Int32):self-instance-method","name":"to","doc":"Moves tape cursor to *index*. Dies if *index* is out\nof bounds. See `Tape#to?`.","summary":"Moves tape cursor to index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32) : self","args_html":"(index : Int32) : self","location":{"filename":"src/novika/forms/block.cr","line_number":593,"url":null},"def":{"name":"to","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"return_type":"self","visibility":"Public","body":"if (!has_tape?) && index.zero?\n return self\nend\nif has_tape?\nelse\n die(\"cursor index out of bounds\")\nend\nself.tape = (tape.to?(index)) || (die(\"cursor index out of bounds\"))\nself\n"}},{"html_id":"to_dict_block:Block-instance-method","name":"to_dict_block","doc":"Builds and returns a dictionary block for this block.\n\nDictionary block is an *orphan* block whose dictionary is a shallow\ncopy of this block's dictionary; and whose tape is empty.","summary":"Builds and returns a dictionary block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1122,"url":null},"def":{"name":"to_dict_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, dict: has_dict? ? dict.copy : nil)"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1269,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"(a?(Hook.as_quote, Quote)) || super()"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/block.cr","line_number":1309,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if repr = a?(Hook.as_quote, Quote)\n io << repr.string\n return\nend\nexecuted = exec_recursive(:to_s) do\n io << \"[\"\n if has_tape? && (!tape.empty?)\n (0...cursor).each do |index|\n (io << \" \") << (at(index))\n end\n if cursor == count\n else\n io << \" |\"\n (cursor...count).each do |index|\n (io << \" \") << (at(index))\n end\n end\n end\n if has_dict? && (!dict.empty?)\n io << \" ·\"\n dict.each do |name, entry|\n ((((io << \" \") << (entry.opener? ? \"@\" : \"$\")) << \"{\") << name) << \" :: \"\n entry.effect(io)\n io << \"}\"\n end\n end\n io << \" ]\"\nend\nif executed\nelse\n io << \"⭮\"\nend\n"}},{"html_id":"to_tape_block:Block-instance-method","name":"to_tape_block","doc":"Builds and returns a tape block for this block.\n\nTape block is an *orphan* block whose tape is a shallow copy\nof this block's tape; and whose dictionary is empty.","summary":"Builds and returns a tape block for this block.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":1114,"url":null},"def":{"name":"to_tape_block","return_type":"Block","visibility":"Public","body":"Block.new(parent: nil, tape: has_tape? ? tape.copy : nil, leaf: leaf?)"}},{"html_id":"top:Form-instance-method","name":"top","doc":"Returns the top form, dies if none.","summary":"Returns the top form, dies if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":661,"url":null},"def":{"name":"top","return_type":"Form","visibility":"Public","body":"if has_tape?\nelse\n die(\"no top for block\")\nend\ntop? || (die(\"no top for block\"))\n"}},{"html_id":"top?:Form|Nil-instance-method","name":"top?","doc":"Returns the top form, or nil if none.","summary":"Returns the top form, or nil if none.
","abstract":false,"location":{"filename":"src/novika/forms/block.cr","line_number":668,"url":null},"def":{"name":"top?","return_type":"Form | ::Nil","visibility":"Public","body":"tape.top?"}},{"html_id":"unfriend(other:Block):self-instance-method","name":"unfriend","doc":"Removes *other* from the friendlist of this block.","summary":"Removes other from the friendlist of this block.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block) : self","args_html":"(other : Block) : self","location":{"filename":"src/novika/forms/block.cr","line_number":754,"url":null},"def":{"name":"unfriend","args":[{"name":"other","external_name":"other","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"if has_friends?\nelse\n return self\nend\nfriends.delete_if do |friend|\n friend.is_a?(Block) && (friend.same?(other))\nend\nself\n"}}]},{"html_id":"novika/Novika/BlockIdMap","path":"Novika/BlockIdMap.html","kind":"alias","full_name":"Novika::BlockIdMap","name":"BlockIdMap","abstract":false,"locations":[{"filename":"src/novika/forms/block.cr","line_number":327,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Hash(UInt64, Novika::Block)","aliased_html":"Hash(UInt64, Novika::Block)","const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Maps block unique identifiers (currently, object ids are used as\nsuch) to blocks they identify.\n\nUsed instead of Sets for forcing identity-based lookup rather\nthan hash-based lookup.","summary":"Maps block unique identifiers (currently, object ids are used as such) to blocks they identify.
"},{"html_id":"novika/Novika/BlockPool","path":"Novika/BlockPool.html","kind":"class","full_name":"Novika::BlockPool","name":"BlockPool","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":549,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Creates a block pool by exploring the given pivot block's hierarchy, forms, etc.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"args_string":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","args_html":"(pivot : Block, caps : CapabilityCollection, mode = CaptureMode::CaptureAll)","location":{"filename":"src/novika/image.cr","line_number":777,"url":null},"def":{"name":"new","args":[{"name":"pivot","external_name":"pivot","restriction":"Block"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"},{"name":"mode","default_value":"CaptureMode::CaptureAll","external_name":"mode","restriction":""}],"visibility":"Public","body":"pool = new\nvisitor = BlockVisitor.new(caps.block, mode)\nvisitor.enter(pivot)\npool.cb = caps.block.object_id\npool.pivot = pivot.object_id\npool.blocks = visitor.blocks\npool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":550,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"blocks:Array(FrozenBlock)-instance-method","name":"blocks","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"def":{"name":"blocks","return_type":"Array(FrozenBlock)","visibility":"Public","body":"@blocks"}},{"html_id":"blocks=(blocks:Array(FrozenBlock))-instance-method","name":"blocks=","doc":"Lists the frozen blocks in this pool.","summary":"Lists the frozen blocks in this pool.
","abstract":false,"args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"args_string":"(blocks : Array(FrozenBlock))","args_html":"(blocks : Array(FrozenBlock))","def":{"name":"blocks=","args":[{"name":"blocks","external_name":"blocks","restriction":"Array(FrozenBlock)"}],"visibility":"Public","body":"@blocks = blocks"}},{"html_id":"cb:UInt64-instance-method","name":"cb","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"def":{"name":"cb","return_type":"UInt64","visibility":"Public","body":"@cb"}},{"html_id":"cb=(cb:UInt64)-instance-method","name":"cb=","doc":"Holds the capability block id. Even though during serialization,\ncapability block is skipped (as serializing it would be of no\nparticular use), its id is still stored so that client-side\n(nki-side), it can be replaced with the client capability\nblock, hopefully with all necessary capabilities.","summary":"Holds the capability block id.
","abstract":false,"args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"args_string":"(cb : UInt64)","args_html":"(cb : UInt64)","def":{"name":"cb=","args":[{"name":"cb","external_name":"cb","restriction":"UInt64"}],"visibility":"Public","body":"@cb = cb"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of blocks in this pool.","summary":"Holds the amount of blocks in this pool.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"pivot:UInt64-instance-method","name":"pivot","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"def":{"name":"pivot","return_type":"UInt64","visibility":"Public","body":"@pivot"}},{"html_id":"pivot=(pivot:UInt64)-instance-method","name":"pivot=","doc":"Holds the pivot block id.","summary":"Holds the pivot block id.
","abstract":false,"args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"args_string":"(pivot : UInt64)","args_html":"(pivot : UInt64)","def":{"name":"pivot=","args":[{"name":"pivot","external_name":"pivot","restriction":"UInt64"}],"visibility":"Public","body":"@pivot = pivot"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs (melts if necessary) the pivot block, its\nblock hierarchy, its forms etc. Returns the resulting\n`Block` form.","summary":"Reconstructs (melts if necessary) the pivot block, its block hierarchy, its forms etc.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":764,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"assembler = BlockAssembler.new(blocks, caps.block)\nassembler.resolve!(cb, caps.block)\nassembler.fetch(pivot)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds the block pool: all blocks reachable from the\n`pivot` block, and the pivot block itself.\n\nA block can be reached by the way of hierarchy, and by\nthe way of dictionary/tape content.\n\nConsists of a list of frozen blocks (see `FrozenBlock`)\nand an id reference to the pivot block in that list.\n\nBlock pools can be assembled back into a hierarchy of\nblocks pivoted at `pivot` using `melt`.","summary":"Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
Holds the block pool: all blocks reachable from the #pivot
block, and the pivot block itself.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
Holds unique id of the block this reference points to, in BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
A unique, integer id-based reference to a block found in the one-and-only BlockPool
.
Represents a boolean (true/false) value.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/boolean.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"boolean\""}}],"constructors":[{"html_id":"[](object):Boolean-class-method","name":"[]","doc":"Creates a `Boolean` subclass for the given *object*.","summary":"Creates a Boolean
subclass for the given object.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Returns a Boolean
for whether a and b are the same.
Snapshot of a boolean form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BooleanSnapshot]","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 0, cls: Novika::BooleanSnapshot, onlyif: nil, verify: nil}] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Boolean)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"args_string":"(form : Boolean)","args_html":"(form : Boolean)","location":{"filename":"src/novika/image.cr","line_number":85,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Boolean"}],"visibility":"Public","body":"bool = new\nbool.state = form.is_a?(True)\nbool\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":73,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"state:Bool-instance-method","name":"state","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state","return_type":"Bool","visibility":"Public","body":"@state == 1"}},{"html_id":"state=(state:UInt8)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"args_string":"(state : UInt8)","args_html":"(state : UInt8)","def":{"name":"state=","args":[{"name":"state","external_name":"state","restriction":"UInt8"}],"visibility":"Public","body":"@state = state"}},{"html_id":"state=(value:Bool)-instance-method","name":"state=","doc":"Whether the underlying boolean is true or false.","summary":"Whether the underlying boolean is true or false.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"state=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@state = UInt8.new(value ? 1 : 0)"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":81,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Boolean[state]"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a boolean form.\n\nIts type is `SnapshotType::Boolean`.","summary":"Snapshot of a boolean form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":72,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Builtin","path":"Novika/Builtin.html","kind":"struct","full_name":"Novika::Builtin","name":"Builtin","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/builtin.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Wraps a snippet of Crystal (native) code, namely a Crystal\n`Proc`, for usage in the Novika-land.","summary":"Wraps a snippet of Crystal (native) code, namely a Crystal Proc
, for usage in the Novika-land.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/builtin.cr","line_number":20,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << @desc"}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":33,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@desc =~ EFFECT_PATTERN ? (io << $~[1]) : \"native code\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the identifier of this builtin.
","abstract":false,"location":{"filename":"src/novika/forms/builtin.cr","line_number":9,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/builtin.cr","line_number":28,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"code.call(engine, engine.stack)\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/builtin.cr","line_number":37,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[native code for: '\") << id) << \"']\""}}]},{"html_id":"novika/Novika/BuiltinSnapshot","path":"Novika/BuiltinSnapshot.html","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BuiltinSnapshot]","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Builtin)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"args_string":"(form : Builtin)","args_html":"(form : Builtin)","location":{"filename":"src/novika/image.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Builtin"}],"visibility":"Public","body":"builtin = new\nbuiltin.id = form.id\nbuiltin\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":246,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated unique identifier of this\nbuiltin.","summary":"Holds the 0-terminated unique identifier of this builtin.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":252,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"assembler.cb.form_for(Novika::Word.new(id))"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a builtin form.\n\nNote: builtins aren't actually serialized, only their\nidentifies are. Assuming the contract between the image\nemitter and image consumer is held, that builtin ids in\ncapabilities are the same and unique -- this works.\n\nBut not builtins created dynamically! Such builtins are\nnot easy nor safe to serialize.\n\nTODO: handle builtin serialization and/or provide\nserializable builtin factories.","summary":"Snapshot of a builtin form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":245,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Byteslice","path":"Novika/Byteslice.html","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/byteslice.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DEFAULT_PREVIEW","name":"DEFAULT_PREVIEW","value":"\"byteslice\"","doc":"Holds the default preview string for byteslices.","summary":"Holds the default preview string for byteslices.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":23,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"byteslice\""}}],"constructors":[{"html_id":"new(bytes:Bytes,preview:String=DEFAULT_PREVIEW,mutable:Bool=true)-class-method","name":"new","doc":"Initializes a byteslice from *bytes*.","summary":"Initializes a byteslice from bytes.
","abstract":false,"args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"args_string":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","args_html":"(bytes : Bytes, preview : String = DEFAULT_PREVIEW, mutable : Bool = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":15,"url":null},"def":{"name":"new","args":[{"name":"bytes","external_name":"bytes","restriction":"Bytes"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":"::String"},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(bytes, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(io:IO,preview=DEFAULT_PREVIEW,mutable=true)-class-method","name":"new","doc":"Initializes a byteslice form from the given *io*.","summary":"Initializes a byteslice form from the given io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"args_string":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","args_html":"(io : IO, preview = DEFAULT_PREVIEW, mutable = true)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":19,"url":null},"def":{"name":"new","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"preview","default_value":"DEFAULT_PREVIEW","external_name":"preview","restriction":""},{"name":"mutable","default_value":"true","external_name":"mutable","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(io, preview, mutable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(&)-class-method","name":"new","doc":"Yields an IO to the block, then returns a raw bytes\nform for it.","summary":"Yields an IO to the block, then returns a raw bytes form for it.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":82,"url":null},"def":{"name":"new","yields":1,"block_arity":1,"visibility":"Public","body":"io = IO::Memory.new\nyield io\nnew(io)\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @bytes == (other.@bytes)\nelse\n return false\nend\nif @mutable == (other.@mutable)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address-instance-method","name":"address","doc":"Returns the memory address where this byteslice points to.","summary":"Returns the memory address where this byteslice points to.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":66,"url":null},"def":{"name":"address","visibility":"Public","body":"@bytes.to_unsafe.address"}},{"html_id":"at(b:Int32,e:Int32)-instance-method","name":"at","doc":"Returns a sub-slice starting at *b*-th byte, and\nending at *e*-th byte.\n\nThe resulting byteslice *does not* preserve the\npreview string of this byteslice.","summary":"Returns a sub-slice starting at b-th byte, and ending at e-th byte.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32)","args_html":"(b : Int32, e : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":39,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nByteslice.new(@bytes[b..e], mutable: @mutable)\n"}},{"html_id":"at(index:Int32)-instance-method","name":"at","doc":"Returns the *index*-th byte.","summary":"Returns the index-th byte.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":28,"url":null},"def":{"name":"at","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"byte = @bytes[index]? || (die(\"index out of bounds\"))\nDecimal.new(byte)\n"}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of bytes in this byteslice.","summary":"Returns the amount of bytes in this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":46,"url":null},"def":{"name":"count","visibility":"Public","body":"@bytes.size"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":50,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two byteslices are equal when their content is equal, and\ntheir mutability statuses are equal.","summary":"Two byteslices are equal when their content is equal, and their mutability statuses are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @bytes.hash(hasher)\nhasher = @mutable.hash(hasher)\nhasher\n"}},{"html_id":"mutable?:Bool-instance-method","name":"mutable?","doc":"Returns whether this byteslice is mutable.","summary":"Returns whether this byteslice is mutable.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":12,"url":null},"def":{"name":"mutable?","return_type":"Bool","visibility":"Public","body":"@mutable"}},{"html_id":"points_to?(address:UInt64)-instance-method","name":"points_to?","doc":"Returns whether this byteslice points to the given *address*.","summary":"Returns whether this byteslice points to the given address.
","abstract":false,"args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"args_string":"(address : UInt64)","args_html":"(address : UInt64)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":89,"url":null},"def":{"name":"points_to?","args":[{"name":"address","external_name":"address","restriction":"UInt64"}],"visibility":"Public","body":"address == self.address"}},{"html_id":"preview:String-instance-method","name":"preview","doc":"Returns the preview string of this byteslice.","summary":"Returns the preview string of this byteslice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":9,"url":null},"def":{"name":"preview","return_type":"String","visibility":"Public","body":"@preview"}},{"html_id":"same?(other:Byteslice)-instance-method","name":"same?","doc":"Returns whether this and *other* byteslices point to the same\nlocation in memory, and have the same mutability status.","summary":"Returns whether this and other byteslices point to the same location in memory, and have the same mutability status.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"args_string":"(other : Byteslice)","args_html":"(other : Byteslice)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":95,"url":null},"def":{"name":"same?","args":[{"name":"other","external_name":"other","restriction":"Byteslice"}],"visibility":"Public","body":"(other.points_to?(address)) && (@mutable == other.mutable?)"}},{"html_id":"to_io:IO::Memory-instance-method","name":"to_io","doc":"Wraps the underlying byte slice in an IO.","summary":"Wraps the underlying byte slice in an IO.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":71,"url":null},"def":{"name":"to_io","return_type":"IO::Memory","visibility":"Public","body":"IO::Memory.new(@bytes)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":54,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"[\") << @preview) << \", consists of \") << count) << \" \"\nio << (@mutable ? \"mutable\" : \"immutable\")\nio << \" byte(s)]\"\n"}},{"html_id":"to_unsafe:Bytes-instance-method","name":"to_unsafe","doc":"Returns the underlying byte slice.","summary":"Returns the underlying byte slice.
","abstract":false,"location":{"filename":"src/novika/forms/byteslice.cr","line_number":61,"url":null},"def":{"name":"to_unsafe","return_type":"Bytes","visibility":"Public","body":"@bytes"}},{"html_id":"write_to(io:IO)-instance-method","name":"write_to","doc":"Writes this byteslice to *io*.","summary":"Writes this byteslice to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/byteslice.cr","line_number":76,"url":null},"def":{"name":"write_to","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io.write(@bytes)"}}]},{"html_id":"novika/Novika/BytesliceSnapshot","path":"Novika/BytesliceSnapshot.html","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":268,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::BytesliceSnapshot]","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.size\nend}, {type: \"bytes\", name: content, cls: Bytes, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Byteslice)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"args_string":"(form : Byteslice)","args_html":"(form : Byteslice)","location":{"filename":"src/novika/image.cr","line_number":278,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Byteslice"}],"visibility":"Public","body":"byteslice = new\nbyteslice.content = form.to_unsafe\nbyteslice\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":269,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"content:Bytes-instance-method","name":"content","abstract":false,"def":{"name":"content","return_type":"Bytes","visibility":"Public","body":"@content"}},{"html_id":"content=(content:Bytes)-instance-method","name":"content=","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"args_string":"(content : Bytes)","args_html":"(content : Bytes)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"Bytes"}],"visibility":"Public","body":"@content = content"}},{"html_id":"count:UInt64-instance-method","name":"count","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":274,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Byteslice.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a byteslice.\n\nBasically, tagged content of the byteslice. Tag being\nset by `TypedSnapshot`, this thing serializes to\nbyteslice content and count.","summary":"Snapshot of a byteslice.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":268,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Capabilities","path":"Novika/Capabilities.html","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities","abstract":false,"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/disk.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/ink.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/system.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Capabilities/IConsole","path":"Novika/Capabilities/IConsole.html","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/console.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"BG_DEFAULT","name":"BG_DEFAULT","value":"Color.new(Decimal.new(0), Decimal.new(0), Decimal.new(0))","doc":"Background color used when there is no user-provided\nbackground color.","summary":"Background color used when there is no user-provided background color.
"},{"id":"FG_DEFAULT","name":"FG_DEFAULT","value":"Color.new(Decimal.new(255), Decimal.new(255), Decimal.new(255))","doc":"Foreground color used when there is no user-provided\nforeground color.","summary":"Foreground color used when there is no user-provided foreground color.
"}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Console","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables the console API.\n\nExposed vocabulary:\n\n* `console:on`, implemented by `on`\n* `console:off`, implemented by `off`\n* `console:256`, implemented by `colors_256`\n* `console:compat`, implemented by `colors_compat`\n* `console:truecolor`, implemented by `colors_truecolor`\n* `console:readKey`, implemented by `read_key`\n* `console:size`, implemented by `size`\n* `console:hadKeyPressed?`, implemented by `had_key_pressed?`\n* `console:hadCtrlPressed?`, implemented by `had_ctrl_pressed?`\n* `console:hadAltPressed?`, implemented by `had_alt_pressed?`\n* `console:hadShiftPressed?`, implemented by `had_shift_pressed?`\n* `console:hadBackspacePressed?`, implemented by `had_backspace_pressed?`\n* `console:hadFnPressed?`, implemented by `had_fn_pressed?`\n* `console:hadInsertPressed?`, implemented by `had_insert_pressed?`\n* `console:hadDeletePressed?`, implemented by `had_delete_pressed?`\n* `console:hadHomePressed?`, implemented by `had_home_pressed?`\n* `console:hadEndPressed?`, implemented by `had_end_pressed?`\n* `console:hadPgupPressed?`, implemented by `had_pgup_pressed?`\n* `console:hadPgdnPressed?`, implemented by `had_pgdn_pressed?`\n* `console:hadLeftPressed?`, implemented by `had_left_pressed?`\n* `console:hadRightPressed?`, implemented by `had_right_pressed?`\n* `console:hadUpPressed?`, implemented by `had_up_pressed?`\n* `console:hadDownPressed?`, implemented by `had_down_pressed?`\n* `console:getCharPressed`, implemented by `get_char_pressed`\n* `console:change`, implemented by `change`\n* `console:appendEcho`, implemented by `append_echo`\n* `console:present`, implemented by `present`\n* `console:clear`, implemented by `clear`","summary":"Enables the console API.
","class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":45,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"console\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":53,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":49,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"enables the console API\""}}],"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/console.cr","line_number":152,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"bg-instance-method","name":"bg","doc":"Returns the active primary background color.","summary":"Returns the active primary background color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":168,"url":null},"def":{"name":"bg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg1|\n __arg1.bg.last?\nend) || BG_DEFAULT"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/console.cr","line_number":158,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":""}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":64,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":67,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":70,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"fg-instance-method","name":"fg","doc":"Returns the active primary foreground color.","summary":"Returns the active primary foreground color.
","abstract":false,"location":{"filename":"src/novika/capabilities/console.cr","line_number":163,"url":null},"def":{"name":"fg","visibility":"Public","body":"(capabilities.fetch(IInk) do |__arg0|\n __arg0.fg.last?\nend) || FG_DEFAULT"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/console.cr","line_number":147,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":95,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":101,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":139,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":92,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":110,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":134,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":116,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":104,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":113,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":107,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":89,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":125,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":122,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":119,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":128,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":98,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/console.cr","line_number":131,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/console.cr","line_number":172,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"console:on\", \"( -- ): enables the console. Must be called before using\\n any other console-related word.\") do |engine|\n on(engine)\nend\ntarget.at(\"console:off\", \"( -- ): disables the console. Must be called at the end\\n of your program or when you don't need console anymore.\") do |engine|\n off(engine)\nend\ntarget.at(\"console:compat\", \"( -- ): enables the compatibility color output mode. In\\n this mode, only 8 colors are available. All RGB colors\\n are automatically reduced to one of those 8 colors.\") do |engine|\n colors_compat(engine)\nend\ntarget.at(\"console:256\", \"( -- ): enables the 256-color output mode. In this mode,\\n 256 colors are available. All RGB colors are automatically\\n reduced to one of those 256 colors.\") do |engine|\n colors_256(engine)\nend\ntarget.at(\"console:truecolor\", \"( -- ): enables the truecolor output mode. In this mode,\\nall colors are available and are passed to the console\\nas-is.\") do |engine|\n colors_truecolor(engine)\nend\ntarget.at(\"console:size\", \"( -- Cw Ch ): leaves the Console width (in columns) and\\n Console height (in rows).\") do |engine, stack|\n w, h = size(engine)\n w.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"console:setTimeout\", \"( D -- ): sets input timeout to Duration, given in *milliseconds*.\\n\\n * If Duration is negative, `console:readKey` will wait\\n for input indefinitely (i.e., until there is input).\\n\\n * If Duration is zero, `console:readKey` won't wait for\\n input at all, but make note if there is any at the moment.\\n\\n * If Duration is positive, `console:readKey` will peek\\n during the timeout window.\") do |_, stack|\n @timeout = stack.drop.a(Decimal)\nend\ntarget.at(\"console:readKey\", \"( -- ): peeks or waits for input. See `console:setTimeout`.\\n Refreshes the input state. Use `console:hadKeyPressed` and\\n friends to explore the input state afterwards.\") do |engine|\n read_key(engine, @timeout)\nend\ntarget.at(\"console:hadKeyPressed?\", \"( -- true/false ): leaves whether any key was pressed.\") do |engine, stack|\n (had_key_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCtrlPressed?\", \"( -- true/false ): leaves whether the CTRL key was pressed.\") do |engine, stack|\n (had_ctrl_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadAltPressed?\", \"( -- true/false ): leaves whether the ALT key was pressed.\") do |engine, stack|\n (had_alt_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadShiftPressed?\", \"( -- true/false ): leaves whether the SHIFT key was pressed.\") do |engine, stack|\n (had_shift_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadBackspacePressed?\", \"( -- true/false ): leaves whether the Backspace key was pressed.\") do |engine, stack|\n (had_backspace_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadFnPressed?\", \"( -- true/false ): leaves whether one of the function keys\\n F1-F12 was pressed.\") do |engine, stack|\n (had_fn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadInsertPressed?\", \"( -- true/false ): leaves whether the INSERT key was pressed.\") do |engine, stack|\n (had_insert_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDeletePressed?\", \"( -- true/false ): leaves whether the DELETE key was pressed.\") do |engine, stack|\n (had_delete_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadHomePressed?\", \"( -- true/false ): leaves whether the HOME key was pressed.\") do |engine, stack|\n (had_home_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadEndPressed?\", \"( -- true/false ): leaves whether the END key was pressed.\") do |engine, stack|\n (had_end_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageUpPressed?\", \"( -- true/false ): leaves whether the PAGE UP key was pressed.\") do |engine, stack|\n (had_pgup_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadPageDownPressed?\", \"( -- true/false ): leaves whether the PAGE DOWN key was pressed.\") do |engine, stack|\n (had_pgdn_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadLeftPressed?\", \"( -- true/false ): leaves whether the LEFT ARROW key was pressed.\") do |engine, stack|\n (had_left_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadRightPressed?\", \"( -- true/false ): leaves whether the RIGHT ARROW key was pressed.\") do |engine, stack|\n (had_right_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadUpPressed?\", \"( -- true/false ): leaves whether the UP ARROW key was pressed.\") do |engine, stack|\n (had_up_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadDownPressed?\", \"( -- true/false ): leaves whether the DOWN ARROW key was pressed.\") do |engine, stack|\n (had_down_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:hadCharPressed?\", \"( -- true/false ): leaves whether EXCLUSIVELY a printable\\n character key was pressed (no CTRL, ALT, etc.) Whether the\\n SHIFT key was pressed or not is ignored.\") do |engine, stack|\n (had_char_pressed?(engine)).onto(stack)\nend\ntarget.at(\"console:getCharPressed\", \"( -- Cq ): leaves Char quote for the key that was pressed.\\n Usually a lowercase or uppercase letter; but also may look\\n like `'\\\\n'` or `'\\\\t'`, etc.)\\n\\nIn case the key that was pressed cannot be represented\\nby the means of a quote, or if the user did not press\\nany key, an empty quote is left in place of Char quote.\") do |engine, stack|\n (get_char_pressed(engine)).onto(stack)\nend\ntarget.at(\"console:change\", \"( X Y -- ): changes the color of the cell at X, Y coordinates\\n to be the foreground, background colors set by ink's\\n `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n change(engine, x, y, fg, bg)\nend\ntarget.at(\"console:appendEcho\", \"( F X Y -- ): appends echo of Form at an X and Y position\\n (in columns and rows correspondingly) using the foreground,\\n background colors set by ink's `withEchoFg` and `withEchoBg`.\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, fg, bg, q)\nend\ntarget.at(\"console:withReverseAppendEcho\", \"( F X Y -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\") do |engine, stack|\n y = stack.drop.a(Decimal)\n x = stack.drop.a(Decimal)\n q = stack.drop.to_quote\n append_echo(engine, x, y, bg, fg, q)\nend\ntarget.at(\"console:present\", \"( -- ): syncs internal buffer and console.\") do |engine|\n present(engine)\nend\ntarget.at(\"console:clear\", \"( -- ): clears console with primary colors.\") do |engine|\n clear(engine, fg, bg)\nend\n"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":61,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":58,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/console.cr","line_number":155,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":""}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":86,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/console.cr","line_number":73,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IDisk","path":"Novika/Capabilities/IDisk.html","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/disk.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Disk","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"disk\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/disk.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes various disk-related (storage-related) words\""}}],"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":18,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":63,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":35,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":21,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":24,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":27,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/disk.cr","line_number":30,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":""}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":46,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":79,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"disk:has?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n on the disk.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:canRead?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and is readable.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (can_read?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasDir?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a directory.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_dir?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasFile?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a file.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_file?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:hasSymlink?\", \"( Pq -- true/false ): leaves whether Path quote exists\\n and points to a symlink.\") do |engine, stack|\n path = stack.drop.a(Quote)\n (has_symlink?(engine, path)).onto(stack)\nend\ntarget.at(\"disk:dirEmpty?\", \"( Pq -- true/false ): leaves whether the directory at Path quote\\n is empty. Dies if Path quote points to something other than\\n a directory, or doesn't exist.\") do |engine, stack|\n path = stack.drop.a(Quote)\n if boolean = dir_empty?(engine, path)\n else\n path.die(\"no directory at path\")\n end\n boolean.onto(stack)\nend\ntarget.at(\"disk:join\", \"( Bpq Cpq -- Pq ): leaves Path quote, which is the result of joining\\n Base path quote and Child path quote using the platform-specific\\n path separator.\\n\\n```\\n'hello' 'world' disk:join leaves: 'hello/world' \\\"On Unix\\\"\\n'hello' 'world' disk:join leaves: 'hello\\\\\\\\world' \\\"On Windows\\\"\\n```\") do |engine, stack|\n cp = stack.drop.a(Quote)\n bp = stack.drop.a(Quote)\n (join(engine, bp, cp)).onto(stack)\nend\ntarget.at(\"disk:pwd\", \"( -- Pq ): leaves Path quote pointing to the current working directory.\") do |engine, stack|\n (pwd(engine)).onto(stack)\nend\ntarget.at(\"disk:home\", \"( -- Pq ): leaves Path quote pointing to the user's home directory.\") do |engine, stack|\n (home(engine)).onto(stack)\nend\ntarget.at(\"disk:touch\", \"( Pq -- ): creates an empty file at the location that Path quote\\n points to. Does nothing if Path already exists.\\n\\n```\\ndisk:pwd 'demo.txt' disk:join $: demoPath\\ndemoPath disk:touch 'Hey!' demoPath disk:write\\ndemoPath disk:read leaves: 'Hey!'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n touch(engine, path)\nend\ntarget.at(\"disk:mkdir\", \"( Pq -- ): creates an empty directory at the location that Path\\n quote points to. Also creates any non-existing intermediate\\n directories. Does nothing if Path quote already points to an\\n existing directory, file, symlink, etc.\\n\\n```\\ndisk:pwd 'demo-dir-a' disk:join\\n 'demo-dir-b' disk:join\\n 'demo-dir-c' disk:join $: demoDirPath\\n\\ndemoDirPath disk:mkdir\\ndemoDirPath disk:hasDir? leaves: true\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n mkdir(engine, path)\nend\ntarget.at(\"disk:copy\", \"( Spq Dpq -- ): copies whatever Source path quote points to, to the\\n location that Destination path quote points to. If Source is a\\n directory, it is copied recursively.\\n\\nIf copy process failed (for instance if there is already something\\nat Destination path quote), dies.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\ndisk:pwd 'b.txt' disk:join $: pathToB\\n\\npathToA disk:touch pathToA 'Content of file a.txt' disk:write\\npathToA pathToB disk:copy\\n\\npathToA disk:read leaves: 'Content of file a.txt'\\npathToB disk:read leaves: 'Content of file a.txt'\\n```\") do |engine, stack|\n dst = stack.drop.a(Quote)\n src = stack.drop.a(Quote)\n if copy(engine, src, dst)\n else\n src.die(\"could not copy\")\n end\nend\ntarget.at(\"disk:read\", \"( Pq -- Q ): leaves Quote containing the content of the file that\\n Path quote points to. Dies if Path quote points to nothing or if\\n it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n if contents = read?(engine, path)\n else\n path.die(\"no file at path\")\n end\n contents.onto(stack)\nend\ntarget.at(\"disk:write\", \"( Q/Bf Pq -- ): (over)writes the content of the file that Path quote\\n points to, with the given Quote or Byteslice form. Dies if Path quote\\n points to nothing or if it points to something other than a file.\\n\\n```\\ndisk:pwd 'a.txt' disk:join $: pathToA\\npathToA disk:touch 'Hello World' pathToA disk:write\\npathToA disk:read leaves: 'Hello World'\\n\\n[ 0 $: count\\n [ count dup 1 + =: count ]\\n] @: counter\\n\\ncounter @: inc\\ninc leaves: 0\\ninc leaves: 1\\ninc leaves: 2\\n\\ndisk:pwd 'counter.nki' disk:join $: pathToCounter\\npathToCounter disk:touch\\n\\n\\\"Save inc state using NKI and write the resulting byteslice\\n to the file we've just created. Note that captureAll is similar\\n to deep copy (it copies the *entire* Novika environment including\\n the standard library), it's not the best way to do this but\\n by far the easiest.\\\"\\n(this -> inc nki:captureAll) pathToCounter disk:write\\n\\npathToCounter disk:read toByteslice nki:toBlock @: incFromDisk\\n\\nincFromDisk leaves: 3\\nincFromDisk leaves: 4\\nincFromDisk leaves: 5\\n```\") do |engine, stack|\n path = stack.drop.a(Quote)\n content = stack.drop.a(Quote | Byteslice)\n if write?(engine, content, path)\n else\n path.die(\"no file at path\")\n end\nend\n"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":40,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":55,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/disk.cr","line_number":43,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/disk.cr","line_number":67,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":""}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/disk.cr","line_number":50,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":""}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":72,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/disk.cr","line_number":77,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IFrontend","path":"Novika/Capabilities/IFrontend.html","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Frontend","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"frontend\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/frontend.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes information about the language frontend\""}}],"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":21,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":23,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"novika:version\", \"( -- Vq ): leaves Version of the frontend as a quote.\") do |engine, stack|\n (version(engine)).onto(stack)\nend\ntarget.at(\"novika:capabilities\", \"( -- Lb ): lists the ids of capabilities provided by the\\n frontend in List block.\\n\\n```\\n\\\"Yours may differ!\\\"\\nnovika:capabilities leaves: [ [ 'essential' 'colors' 'console' ] ]\\n```\") do |engine, stack|\n (capabilities(engine)).onto(stack)\nend\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/frontend.cr","line_number":18,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/IInk","path":"Novika/Capabilities/IInk.html","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/ink.cr","line_number":14,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"NO_SYSTEM_ECHO_ERROR","name":"NO_SYSTEM_ECHO_ERROR","value":"\"with...Echo words need 'echo' from capability 'system', but this capability is not available\""}],"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/Ink","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"doc":"Enables colorful output using `withColorAppendEcho` and friends.\n\nExposed vocabulary:\n\n* `withEchoFg`, generic implementation\n* `withEchoBg`, generic implementation\n* `dropEchoFg`, generic implementation\n* `dropEchoBg`, generic implementation\n* `withColorAppendEcho`, implemented by `with_color_append_echo`\n* `withEmphasisAppendEcho`, implemented by `with_emphasis_append_echo`\n* `withReverseAppendEcho`, generic implementation; when no\n colors given by the use, `with_reverse_append_echo` is used.","summary":"Enables colorful output using withColorAppendEcho
and friends.
Echo background color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg","visibility":"Public","body":"@bg"}},{"html_id":"bg=(bg:Array(Novika::Color))-instance-method","name":"bg=","doc":"Echo background color stack.","summary":"Echo background color stack.
","abstract":false,"args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"args_string":"(bg : Array(Novika::Color))","args_html":"(bg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":36,"url":null},"def":{"name":"bg=","args":[{"name":"bg","external_name":"bg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@bg = bg"}},{"html_id":"enabled=(enabled:Bool)-instance-method","name":"enabled=","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"args_string":"(enabled : Bool)","args_html":"(enabled : Bool)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled=","args":[{"name":"enabled","external_name":"enabled","restriction":"Bool"}],"visibility":"Public","body":"@enabled = enabled"}},{"html_id":"enabled?:Bool-instance-method","name":"enabled?","doc":"Holds whether printing with colors is enabled (and desired).\n\nDefaults to `Novika.colorful?`.","summary":"Holds whether printing with colors is enabled (and desired).
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":41,"url":null},"def":{"name":"enabled?","return_type":"Bool","visibility":"Public","body":"if (value = @enabled).nil?\n @enabled = (Novika.colorful?)\nelse\n value\nend"}},{"html_id":"fg:Array(Novika::Color)-instance-method","name":"fg","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg","visibility":"Public","body":"@fg"}},{"html_id":"fg=(fg:Array(Novika::Color))-instance-method","name":"fg=","doc":"Echo foreground color stack.","summary":"Echo foreground color stack.
","abstract":false,"args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"args_string":"(fg : Array(Novika::Color))","args_html":"(fg : Array(Novika::Color))","location":{"filename":"src/novika/capabilities/ink.cr","line_number":33,"url":null},"def":{"name":"fg=","args":[{"name":"fg","external_name":"fg","restriction":"::Array(::Novika::Color)"}],"visibility":"Public","body":"@fg = fg"}},{"html_id":"inject(intotarget)-instance-method","name":"inject","doc":"Injects the colors vocabulary into *target*.","summary":"Injects the colors vocabulary into target.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":62,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(\"withEchoFg\", \"( C -- ): pushes Color form onto the echo foreground\\n color stack.\") do |_, stack|\n fg << (stack.drop.a(Color))\nend\ntarget.at(\"withEchoBg\", \"( C -- ): pushes Color form onto the echo background\\n color stack.\") do |_, stack|\n bg << (stack.drop.a(Color))\nend\ntarget.at(\"dropEchoFg\", \"( -- ): drops a color from the echo foreground color stack.\") do\n fg.pop?\nend\ntarget.at(\"dropEchoBg\", \"( -- ): drops a color from the echo background color stack.\") do\n bg.pop?\nend\ntarget.at(\"withReverseAppendEcho\", \"( F -- ): appends Form with foreground and background\\n colors swapped with each other (background color is set\\n to foreground color, and vice versa).\\n\\nNote: if unsupported by the output stream, will print\\nForm as-is.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? && bg.last?)\n with_color_append_echo(engine, bg.last, fg.last, form)\n else\n with_reverse_append_echo(engine, form)\n end\nend\ntarget.at(\"withEmphasisAppendEcho\", \"( F -- ): same as `withColorAppendEcho`, but also emphasizes\\n echo of Form. Bold style is used by default, but implementors\\n may choose e.g. italic.\") do |engine, stack|\n form = stack.drop\n if enabled?\n with_emphasis_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\ntarget.at(\"withColorAppendEcho\", \"( F -- ): appends Form with last color from the echo\\n foreground color stack set as foreground color, and\\n last color from the echo background stack set as background\\n color, to the standard output stream.\\n\\nNote: some implementations (particularly Novika's default\\nimplementation) choose to restrict foreground and background\\ncolors to system's basic 16 colors for compatibility &\\nportability. If you want more cross-platform control over\\ncolors (and pretty much everything else), take a look at\\nconsole capability.\") do |engine, stack|\n form = stack.drop\n if enabled? && (fg.last? || bg.last?)\n with_color_append_echo(engine, fg.last?, bg.last?, form)\n else\n if system = capabilities[ISystem]?\n system.append_echo(engine, form)\n else\n form.die(NO_SYSTEM_ECHO_ERROR)\n end\n end\nend\n"}},{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":46,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/ink.cr","line_number":59,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Capabilities/Impl","path":"Novika/Capabilities/Impl.html","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl","abstract":false,"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/colors.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/console.cr","line_number":5,"url":null},{"filename":"src/novika/capabilities/impl/disk.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/essential.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/ink.cr","line_number":3,"url":null},{"filename":"src/novika/capabilities/impl/nki.cr","line_number":1,"url":null},{"filename":"src/novika/capabilities/impl/system.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"types":[{"html_id":"novika/Novika/Capabilities/Impl/Bit","path":"Novika/Capabilities/Impl/Bit.html","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/bit.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"bit\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"allows to interpret decimals as sequences of bits\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/bit.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"bit:fromLeft\", \"( D I -- B ): leaves Index-th Bit from left in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromLeft leaves: 1\\n0b00010001 1 bit:fromLeft leaves: 0\\n0b00010001 2 bit:fromLeft leaves: 0\\n0b00010001 3 bit:fromLeft leaves: 0\\n0b00010001 4 bit:fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n if bit = decimal.nth_ms_bit?(index)\n else\n index.die(\"bit index out of bounds\")\n end\n bit.onto(stack)\nend\ntarget.at(\"bit:fromRight\", \"( D I -- B ): leaves Index-th Bit from right in the given Decimal,\\n represented as `0` or `1`. Dies if Decimal has a fractional part.\\n The sign of decimal is ignored.\\n\\nNote: we consider the *left*most bit to be the most significant bit,\\nand the *right*most bit the least significant bit. Leading zeroes\\ndo not count.\\n\\n```\\n0b00010001 0 bit:fromRight leaves: 1\\n0b00010001 1 bit:fromRight leaves: 0\\n0b00010001 2 bit:fromRight leaves: 0\\n0b00010001 3 bit:fromRight leaves: 0\\n0b00010001 4 bit:fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n decimal = (stack.drop.a(Decimal)).int\n (decimal.nth_ls_bit(index)).onto(stack)\nend\ntarget.at(\"bit:count\", \"( D -- Bc ): leaves Bit count, the number of bits in the given\\n Decimal. Dies if Decimal has a fractional part.\\n\\n```\\n0b00010001 bit:count leaves: 4\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n decimal.bitcount.onto(stack)\nend\ntarget.at(\"bit:or\", \"( D D -- D ): combines two Decimal numbers using bitwise or, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b00010001\\n0b10001000 bit:or leaves:\\n0b10011001\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a | b).onto(stack)\nend\ntarget.at(\"bit:and\", \"( D D -- D ): combines two Decimal numbers using bitwise and, leaves\\n the resulting Decimal. Dies if either of decimal has a fractional part.\\n\\n```\\n0b10011001\\n0b00011000 bit:and leaves:\\n0b00011000\\n```\") do |_, stack|\n b = (stack.drop.a(Decimal)).int\n a = (stack.drop.a(Decimal)).int\n (a & b).onto(stack)\nend\ntarget.at(\"bit:bits\", \"( D -- Bb ): leaves Bits block for the given Decimal, which contains\\n the binary representation of the *absolute value* of Decimal, starting\\n with the most-significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [ 1 0 0 1 1 0 0 1 ]\\n```\") do |_, stack|\n decimal = (stack.drop.a(Decimal)).int\n bits = Block.new\n decimal.each_bit(&.onto(bits))\n bits.onto(stack)\nend\ntarget.at(\"bit:fromBits\", \"( Bb -- D ): converts Bits block to a Decimal. Bits block should\\n contain binary digits (represented by `0` or `1`), and should\\n begin with the most significant bit.\\n\\n```\\n0b10011001 bit:bits leaves: [[ 1 0 0 1 1 0 0 1 ]]\\n bit:fromBits leaves: 0b10011001\\n```\") do |_, stack|\n bits = stack.drop.a(Block)\n acc = Decimal.new(0)\n pow = Decimal.new(bits.count - 1)\n one = Decimal.new(1)\n two = Decimal.new(2)\n bits.each do |bit|\n acc = acc + (((bit.a(Decimal)).int.in(0..1)) * (two ** pow))\n pow = pow - one\n end\n acc.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Colors","path":"Novika/Capabilities/Impl/Colors.html","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/colors.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"colors\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes vocabulary for working with colors\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/colors.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"rgb\", \"( R G B -- Cf ): creates a Color form from three decimals\\n Red (0-255), Green (0-255), and Blue (0-255).\\n\\n```\\n36 255 255 rgb toQuote leaves: 'rgb(36, 255 ,255)'\\n```'\") do |_, stack|\n b = ((stack.drop.a(Decimal)).in(0..255)).posint\n g = ((stack.drop.a(Decimal)).in(0..255)).posint\n r = ((stack.drop.a(Decimal)).in(0..255)).posint\n (Color.rgb(r, g, b)).onto(stack)\nend\ntarget.at(\"getRGB\", \"( Cf -- R G B ): leaves Red, Green, Blue values for a\\n Color form.\\n\\n```\\n0 25 3 rgb \\\"rgb(0, 25, 3)\\\" getRGB leaves: [ 0 25 3 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n r, g, b = color.rgb\n r.onto(stack)\n g.onto(stack)\n b.onto(stack)\nend\ntarget.at(\"hsl\", \"( H S L -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Lightness (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSL color is\\nfirst converted into RGB.\\n\\n```\\n206 35 46 hsl toQuote leaves: 'rgb(76, 123, 158)'\\n```\") do |_, stack|\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsl(h, s, l)).onto(stack)\nend\ntarget.at(\"getHSL\", \"( Cf -- H S L ): leaves Hue, Saturation, Lightness for\\n a Color form.\\n\\n```\\n206 35 46 hsl \\\"rgb(76, 123, 158)\\\" getHSL leaves: [ 206 35 46 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, l = color.hsl\n h.onto(stack)\n s.onto(stack)\n l.onto(stack)\nend\ntarget.at(\"hsv\", \"( H S V -- Cf ): creates a Color form from three decimals\\n Hue (0-360, degrees), Saturation (0-100, percents),\\n Value (0-100, percents).\\n\\nSince color forms are stored in RGB, the HSV color is\\nfirst converted into RGB.\\n\\n```\\n120 100 100 hsv toQuote leaves: 'rgb(0, 255, 0)'\\n```\") do |_, stack|\n v = ((stack.drop.a(Decimal)).in(0..100)).posint\n s = ((stack.drop.a(Decimal)).in(0..100)).posint\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n (Color.hsv(h, s, v)).onto(stack)\nend\ntarget.at(\"getHSV\", \"( Cf -- H S V ): leaves Hue, Saturation, Value for a\\n Color form.\\n\\n```\\n180 100 50 hsv \\\"rgb(0,128,128)\\\" getHSV leaves: [ 180 100 50 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n h, s, v = color.hsv\n h.onto(stack)\n s.onto(stack)\n v.onto(stack)\nend\ntarget.at(\"lch\", \"( L C H -- Cf ): creates a Color form from three decimals\\n Lightness (0-100), Chroma (0-132), Hue (0-360).\\n\\nSince color forms are stored as RGB, the LCH color is\\nfirst converted into RGB.\\n\\nLCH colors are tricky to implement but very fun to use.\\nThat's why they're in Novika's standard library.\\n\\nCIELAB encloses more colors than sRGB, so some conversion\\nimprecisions *are* to be expected because some colors just\\nfall out of sRGB gamut (lossiness is especially noticeable\\nin LCH -> RGB -> LCH conversions, but it stabilizes on the\\nlast step because the last step's LCH is guraranteed to be\\ninside the sRGB gamut).\\n\\nAny color out of the sRGB gamut is brought into the sRGB\\ngamut by lowering chroma until it's in the sRGB bounds.\\n\\nHere is a 'good' conversion, meaning it nicely closes\\non itself:\\n\\n```\\n78 74 133 lch $: color\\n\\ncolor toQuote leaves: 'rgb(122, 215, 85)'\\ncolor getLCH leaves: [ 78 74 133 ]\\ncolor getLCH lch toQuote leaves: 'rgb(122, 215, 85)''\\n\\\"And so on...\\\"\\n```\\n\\nAnd here is a bad conversion. At first, though, for it\\ndoes stabilize after a few rounds as it falls firmly\\ninto the sRGB color space.\\n\\n```\\n74 107 26 lch $: color\\ncolor toQuote leaves: 'rgb(255, 154, 151)'\\n\\n\\\"Note how many chroma units we lose! Plus, Lab and\\n LCH have hue shift on chroma changes, hence 26 -> 25.\\\"\\ncolor getLCH leaves: [ 74 41 25 ]\\n\\ncolor getLCH lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\ncolor getLCH lch getLCH leaves: [ 74 41 25 ]\\n\\\"... and so on, conversion had stabilized ...\\\"\\n```\\n\\nYou don't necessarily have to think about this, because\\nthe resulting colors do look very similar, differing in\\npoints rather than magnitudes. Just be aware that the\\nconversion method used by this word and `getLCH` is lossy\\nin some cases.\") do |_, stack|\n h = ((stack.drop.a(Decimal)).in(0..360)).posint\n c = ((stack.drop.a(Decimal)).in(0..132)).posint\n l = ((stack.drop.a(Decimal)).in(0..100)).posint\n (Color.lch(l, c, h)).onto(stack)\nend\ntarget.at(\"getLCH\", \"( Cf -- L C H ): leaves Lightness, Chroma, Hue for a Color\\n form. Please read documentation for `lch` to understand\\n why `a b c lch getLCH` might not leave `a b c`.\\n\\n```\\n78 74 133 lch toQuote leaves: 'rgb(122, 215, 85)'\\n78 74 133 lch getLCH leaves: [ 78 74 133 ]\\n\\n74 107 26 lch toQuote leaves: 'rgb(255, 154, 152)'\\n\\n\\\"Chroma lowered to fit into sRGB. Lab and LCH have hue\\n shift on chroma changes, 26 -> 25\\\"\\n74 107 26 lch getLCH leaves: [ 74 41 25 ]\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n l, c, h = color.lch\n l.onto(stack)\n c.onto(stack)\n h.onto(stack)\nend\ntarget.at(\"withAlpha\", \"( Cf A -- Cf' ): leaves Color form with alpha channel\\n set to Alpha (0-255).\\n\\n```\\n0 25 3 rgb toQuote leaves: 'rgb(0, 25, 3)'\\n0 25 3 rgb 100 withAlpha toQuote leaves: 'rgba(0, 25, 3, 100)'\\n```\") do |_, stack|\n alpha = ((stack.drop.a(Decimal)).in(0..255)).posint\n color = stack.drop.a(Color)\n color.a = alpha\n color.onto(stack)\nend\ntarget.at(\"getAlpha\", \"( Cf -- A ): leaves Alpha for the given Color form.\\n\\n```\\n0 25 3 rgb getAlpha leaves: 255 \\\"Opaque = 255\\\"\\n0 25 3 rgb 100 withAlpha getAlpha leaves: 100\\n```\") do |_, stack|\n color = stack.drop.a(Color)\n color.a.onto(stack)\nend\ntarget.at(\"fromPalette\", \"( Cf Pb -- Cc ): leaves the Closest color form to Color from\\n a Palette block. How close the color is is determined by\\n distance: the Closest color is that color in Palette block\\n to which Color has least (minimum) distance.\\n\\n```\\n[ 0 0 0 rgb\\n 255 0 0 rgb\\n 0 255 0 rgb\\n 0 0 255 rgb\\n 255 255 255 rgb\\n] vals $: pal\\n\\n0 0 0 rgb pal fromPalette toQuote leaves: 'rgb(0, 0, 0)'\\n76 175 80 rgb pal fromPalette \\\"greenish\\\" toQuote leaves: 'rgb(0, 255, 0)'\\n220 237 200 rgb pal fromPalette \\\"very light green\\\" toQuote leaves: 'rgb(255, 255, 255)'\\n74 20 140 rgb pal fromPalette \\\"very dark purple\\\" toQuote leaves: 'rgb(255, 0, 0)'\\n```\") do |_, stack|\n palette = stack.drop.a(Block)\n color = stack.drop.a(Color)\n colors = [] of Color\n palette.each do |pcolor|\n colors << (pcolor.a(Color))\n end\n (color.closest(colors)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Console","path":"Novika/Capabilities/Impl/Console.html","kind":"class","full_name":"Novika::Capabilities::Impl::Console","name":"Console","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/console.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,x:Decimal,y:Decimal,fg:Color,bg:Color,quote:Quote)-instance-method","name":"append_echo","doc":"Appends echo of *quote* colorized with *fg* and *bg*\ncolors at the given *x* and *y* position (in columns,\nrows).","summary":"Appends echo of quote colorized with fg and bg colors at the given x and y position (in columns, rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color, quote : Quote)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":208,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"},{"name":"quote","external_name":"quote","restriction":"Quote"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.print(xi, yi, fg, bg, quote.string[...(Termbox.width - xi)])\nend\n"}},{"html_id":"change(engine,x:Decimal,y:Decimal,fg:Color,bg:Color)-instance-method","name":"change","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","args_html":"(engine, x : Decimal, y : Decimal, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":199,"url":null},"def":{"name":"change","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"x","external_name":"x","restriction":"Decimal"},{"name":"y","external_name":"y","restriction":"Decimal"},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nxi = x.to_i\nyi = y.to_i\nif (xi.in?(0...Termbox.width)) && (yi.in?(0...Termbox.height))\n Termbox.change(xi, yi, fg, bg)\nend\n"}},{"html_id":"clear(engine,fg:Color,bg:Color)-instance-method","name":"clear","doc":"Clears the console with *fg* and *bg* colors.","summary":"Clears the console with fg and bg colors.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"args_string":"(engine, fg : Color, bg : Color)","args_html":"(engine, fg : Color, bg : Color)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":221,"url":null},"def":{"name":"clear","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color"},{"name":"bg","external_name":"bg","restriction":"Color"}],"visibility":"Public","body":"fg, bg = to_tb_color(fg), to_tb_color(bg)\nTermbox.clear(fg, bg)\nTermbox.clear\n"}},{"html_id":"colors_256(engine)-instance-method","name":"colors_256","doc":"Enables the 256-color output mode.","summary":"Enables the 256-color output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":21,"url":null},"def":{"name":"colors_256","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M256_A\nTermbox.set_output_mode(Termbox::OutputMode::M256)\n"}},{"html_id":"colors_compat(engine)-instance-method","name":"colors_compat","doc":"Enables the compatibility color (8-color) output mode.","summary":"Enables the compatibility color (8-color) output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":26,"url":null},"def":{"name":"colors_compat","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = M8_A\nTermbox.set_output_mode(Termbox::OutputMode::Normal)\n"}},{"html_id":"colors_truecolor(engine)-instance-method","name":"colors_truecolor","doc":"Enables the truecolor output mode.","summary":"Enables the truecolor output mode.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":31,"url":null},"def":{"name":"colors_truecolor","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"@palette = nil\nTermbox.set_output_mode(Termbox::OutputMode::Truecolor)\n"}},{"html_id":"get_char_pressed(engine):Quote-instance-method","name":"get_char_pressed","doc":"Returns char quote for the key that was pressed. Usually a lowercase\nor uppercase letter; but also may look like `'\\\\n'` or `'\\\\t'`, etc.)\n\nIn case the key that was pressed cannot be represented by the means\nof a quote, or if the user did not press any key, an empty quote\nis returned.","summary":"Returns char quote for the key that was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":110,"url":null},"def":{"name":"get_char_pressed","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"if event = @event.as?(Termbox::Event::KeyEvent)\nelse\n return Quote.new(\"\")\nend\nif char = event.char\n return Quote.new(char)\nend\nkey = event.key.not_nil!\ncase key\nwhen .ctrl_tilde?\n char = '~'\nwhen .ctrl_2?\n char = '2'\nwhen .ctrl_a?\n char = 'a'\nwhen .ctrl_b?\n char = 'b'\nwhen .ctrl_c?\n char = 'c'\nwhen .ctrl_d?\n char = 'd'\nwhen .ctrl_e?\n char = 'e'\nwhen .ctrl_f?\n char = 'f'\nwhen .ctrl_g?\n char = 'g'\nwhen .ctrl_h?\n char = 'h'\nwhen .tab?\n char = '\\t'\nwhen .ctrl_i?\n char = 'i'\nwhen .ctrl_j?\n char = 'j'\nwhen .ctrl_k?\n char = 'k'\nwhen .ctrl_l?\n char = 'l'\nwhen .enter?\n char = '\\n'\nwhen .ctrl_m?\n char = 'm'\nwhen .ctrl_n?\n char = 'n'\nwhen .ctrl_o?\n char = 'o'\nwhen .ctrl_p?\n char = 'p'\nwhen .ctrl_q?\n char = 'q'\nwhen .ctrl_r?\n char = 'r'\nwhen .ctrl_s?\n char = 's'\nwhen .ctrl_t?\n char = 't'\nwhen .ctrl_u?\n char = 'u'\nwhen .ctrl_v?\n char = 'v'\nwhen .ctrl_w?\n char = 'w'\nwhen .ctrl_x?\n char = 'x'\nwhen .ctrl_y?\n char = 'y'\nwhen .ctrl_z?\n char = 'z'\nwhen .esc?\n char = '\\e'\nwhen .ctrl_lsq_bracket?\n char = '['\nwhen .ctrl_3?\n char = '3'\nwhen .ctrl_4?\n char = '4'\nwhen .ctrl_backslash?\n char = '\\\\'\nwhen .ctrl_5?\n char = '5'\nwhen .ctrl_rsq_bracket?\n char = ']'\nwhen .ctrl_6?\n char = '6'\nwhen .ctrl_7?\n char = '7'\nwhen .ctrl_slash?\n char = '/'\nwhen .ctrl_underscore?\n char = '_'\nwhen .space?\n char = ' '\nwhen .ctrl_8?\n char = '8'\nwhen .f1?\n char = '1'\nwhen .f2?\n char = '2'\nwhen .f3?\n char = '3'\nwhen .f4?\n char = '4'\nwhen .f5?\n char = '5'\nwhen .f6?\n char = '6'\nwhen .f7?\n char = '7'\nwhen .f8?\n char = '8'\nwhen .f9?\n char = '9'\nwhen .f10?\n char = \"10\"\nwhen .f11?\n char = \"11\"\nwhen .f12?\n char = \"12\"\nelse\n return Quote.new(\"\")\nend\nQuote.new(char)\n"}},{"html_id":"had_alt_pressed?(engine):Boolean-instance-method","name":"had_alt_pressed?","doc":"Returns whether the ALT key was pressed.","summary":"Returns whether the ALT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":56,"url":null},"def":{"name":"had_alt_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.alt?]\n"}},{"html_id":"had_backspace_pressed?(engine):Boolean-instance-method","name":"had_backspace_pressed?","doc":"Returns whether the Backspace key was pressed.","summary":"Returns whether the Backspace key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":80,"url":null},"def":{"name":"had_backspace_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n key.backspace? || key.backspace2?\nend"}},{"html_id":"had_char_pressed?(engine):Boolean-instance-method","name":"had_char_pressed?","doc":"Returns whether EXCLUSIVELY a printable character key was pressed\n(no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not\nis ignored.","summary":"Returns whether EXCLUSIVELY a printable character key was pressed (no CTRL, ALT, etc.) Whether the SHIFT key was pressed or not is ignored.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":106,"url":null},"def":{"name":"had_char_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"Boolean[!(!(@event.as?(Termbox::Event::KeyEvent)).try do |__arg5|\n __arg5.char.try(&.printable?)\nend)]"}},{"html_id":"had_ctrl_pressed?(engine):Boolean-instance-method","name":"had_ctrl_pressed?","doc":"Returns whether the CTRL key was pressed.","summary":"Returns whether the CTRL key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":50,"url":null},"def":{"name":"had_ctrl_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && event.mod.ctrl?]\n"}},{"html_id":"had_delete_pressed?(engine):Boolean-instance-method","name":"had_delete_pressed?","doc":"Returns whether the DELETE key was pressed.","summary":"Returns whether the DELETE key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_delete_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.delete?)"}},{"html_id":"had_down_pressed?(engine):Boolean-instance-method","name":"had_down_pressed?","doc":"Returns whether the DOWN ARROW key was pressed.","summary":"Returns whether the DOWN ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":102,"url":null},"def":{"name":"had_down_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_down?)"}},{"html_id":"had_end_pressed?(engine):Boolean-instance-method","name":"had_end_pressed?","doc":"Returns whether the END key was pressed.","summary":"Returns whether the END key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_end_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.end?)"}},{"html_id":"had_fn_pressed?(engine):Boolean-instance-method","name":"had_fn_pressed?","doc":"Returns whether one of the function keys F1-F12 was pressed.","summary":"Returns whether one of the function keys F1-F12 was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":68,"url":null},"def":{"name":"had_fn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed? do |key|\n case key\n when .f1?, .f2?, .f3?, .f4?, .f5?, .f6?, .f7?, .f8?, .f9?, .f10?, .f11?, .f12?\n true\n end\nend"}},{"html_id":"had_home_pressed?(engine):Boolean-instance-method","name":"had_home_pressed?","doc":"Returns whether the HOME key was pressed.","summary":"Returns whether the HOME key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_home_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.home?)"}},{"html_id":"had_insert_pressed?(engine):Boolean-instance-method","name":"had_insert_pressed?","doc":"Returns whether the INSERT key was pressed.","summary":"Returns whether the INSERT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_insert_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.insert?)"}},{"html_id":"had_key_pressed?(engine):Boolean-instance-method","name":"had_key_pressed?","doc":"Returns whether any key was pressed.","summary":"Returns whether any key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":44,"url":null},"def":{"name":"had_key_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[!(!event)]\n"}},{"html_id":"had_left_pressed?(engine):Boolean-instance-method","name":"had_left_pressed?","doc":"Returns whether the LEFT ARROW key was pressed.","summary":"Returns whether the LEFT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":90,"url":null},"def":{"name":"had_left_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_left?)"}},{"html_id":"had_pgdn_pressed?(engine):Boolean-instance-method","name":"had_pgdn_pressed?","doc":"Returns whether the PAGE DOWN key was pressed.","summary":"Returns whether the PAGE DOWN key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgdn_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgdn?)"}},{"html_id":"had_pgup_pressed?(engine):Boolean-instance-method","name":"had_pgup_pressed?","doc":"Returns whether the PAGE UP key was pressed.","summary":"Returns whether the PAGE UP key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":84,"url":null},"def":{"name":"had_pgup_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.pgup?)"}},{"html_id":"had_right_pressed?(engine):Boolean-instance-method","name":"had_right_pressed?","doc":"Returns whether the RIGHT ARROW key was pressed.","summary":"Returns whether the RIGHT ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":94,"url":null},"def":{"name":"had_right_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_right?)"}},{"html_id":"had_shift_pressed?(engine):Boolean-instance-method","name":"had_shift_pressed?","doc":"Returns whether the SHIFT key was pressed.","summary":"Returns whether the SHIFT key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":62,"url":null},"def":{"name":"had_shift_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"event = @event.as?(Termbox::Event::KeyEvent)\nBoolean[event && (event.char.try(&.uppercase?) || event.mod.shift?)]\n"}},{"html_id":"had_up_pressed?(engine):Boolean-instance-method","name":"had_up_pressed?","doc":"Returns whether the UP ARROW key was pressed.","summary":"Returns whether the UP ARROW key was pressed.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Boolean","args_html":"(engine) : Boolean","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":98,"url":null},"def":{"name":"had_up_pressed?","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Boolean","visibility":"Public","body":"had_key_pressed?(&.arrow_up?)"}},{"html_id":"off(engine)-instance-method","name":"off","doc":"Disables the Console API.","summary":"Disables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":17,"url":null},"def":{"name":"off","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.disable"}},{"html_id":"on(engine)-instance-method","name":"on","doc":"Enables the Console API.","summary":"Enables the Console API.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":13,"url":null},"def":{"name":"on","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.enable"}},{"html_id":"present(engine)-instance-method","name":"present","doc":"Syncs the internal buffer with console.","summary":"Syncs the internal buffer with console.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine)","args_html":"(engine)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":217,"url":null},"def":{"name":"present","args":[{"name":"engine","external_name":"engine","restriction":""}],"visibility":"Public","body":"Termbox.present"}},{"html_id":"read_key(engine,timeout:Decimal)-instance-method","name":"read_key","doc":"Peeks or waits for input. Refreshes the input state.\n\n* Negative *timeout* must wait indefinitely for input,\n and after receiving input refresh the state.\n\n* Zero *timeout* must refresh the input state without\n waiting for input.\n\n* Positive *timeout* must wait for input in a window\n *timeout* milliseconds long, and refresh the input\n state after receiving input.","summary":"Peeks or waits for input.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"args_string":"(engine, timeout : Decimal)","args_html":"(engine, timeout : Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":40,"url":null},"def":{"name":"read_key","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"timeout","external_name":"timeout","restriction":"Decimal"}],"visibility":"Public","body":"@event = Termbox.peek?(timeout.to_i)"}},{"html_id":"size(engine):Tuple(Decimal,Decimal)-instance-method","name":"size","doc":"Returns the console width (in columns) and height (in rows).","summary":"Returns the console width (in columns) and height (in rows).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Tuple(Decimal, Decimal)","args_html":"(engine) : Tuple(Decimal, Decimal)","location":{"filename":"src/novika/capabilities/impl/console.cr","line_number":36,"url":null},"def":{"name":"size","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"::Tuple(Decimal, Decimal)","visibility":"Public","body":"{Decimal.new(Termbox.width), Decimal.new(Termbox.height)}"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Disk","path":"Novika/Capabilities/Impl/Disk.html","kind":"class","full_name":"Novika::Capabilities::Impl::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/disk.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"can_read?(engine,path:Quote):Boolean-instance-method","name":"can_read?","doc":"Returns whether *path* exists and is readable.","summary":"Returns whether path exists and is readable.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":5,"url":null},"def":{"name":"can_read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.readable?(path.string)]"}},{"html_id":"copy(engine,src:Quote,dst:Quote):Bool-instance-method","name":"copy","doc":"Copies source *src* (quote path to a file, symlink, or\ndirectory) to destination *dst* (also a quote).\n\nIf *src* is a directory, copies it recursively.\n\nReturns whether the operation was successful.","summary":"Copies source src (quote path to a file, symlink, or directory) to destination dst (also a quote).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"args_string":"(engine, src : Quote, dst : Quote) : Bool","args_html":"(engine, src : Quote, dst : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":51,"url":null},"def":{"name":"copy","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"src","external_name":"src","restriction":"Quote"},{"name":"dst","external_name":"dst","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if File.exists?(src.string)\nelse\n return false\nend\nFileUtils.cp_r(src.string, dst.string)\ntrue\n"}},{"html_id":"dir_empty?(engine,path:Quote):Boolean|Nil-instance-method","name":"dir_empty?","doc":"Returns whether directory pointed to by *path* is empty.\nReturns nil if *path* does not point to a directory, or\nif *path* does not exist.","summary":"Returns whether directory pointed to by path is empty.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean | Nil","args_html":"(engine, path : Quote) : Boolean | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":25,"url":null},"def":{"name":"dir_empty?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean | ::Nil","visibility":"Public","body":"if File.directory?(path.string)\n Boolean[Dir.empty?(path.string)]\nend"}},{"html_id":"has?(engine,path:Quote):Boolean-instance-method","name":"has?","doc":"Returns whether *path* exists.","summary":"Returns whether path exists.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":9,"url":null},"def":{"name":"has?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.exists?(path.string)]"}},{"html_id":"has_dir?(engine,path:Quote):Boolean-instance-method","name":"has_dir?","doc":"Returns whether *path* exists and points to a directory.","summary":"Returns whether path exists and points to a directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":17,"url":null},"def":{"name":"has_dir?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[Dir.exists?(path.string)]"}},{"html_id":"has_file?(engine,path:Quote):Boolean-instance-method","name":"has_file?","doc":"Returns whether *path* exists and points to a file.","summary":"Returns whether path exists and points to a file.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":13,"url":null},"def":{"name":"has_file?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.file?(path.string)]"}},{"html_id":"has_symlink?(engine,path:Quote):Boolean-instance-method","name":"has_symlink?","doc":"Returns whether *path* exists and points to a symlink.","summary":"Returns whether path exists and points to a symlink.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Boolean","args_html":"(engine, path : Quote) : Boolean","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":21,"url":null},"def":{"name":"has_symlink?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Boolean","visibility":"Public","body":"Boolean[File.symlink?(path.string)]"}},{"html_id":"home(engine):Quote-instance-method","name":"home","doc":"Returns current user's home directory.","summary":"Returns current user's home directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":37,"url":null},"def":{"name":"home","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Path.home.to_s)"}},{"html_id":"join(engine,base:Quote,child:Quote):Quote-instance-method","name":"join","doc":"Returns path quote which is the result of joining\n*base* path and *child* path quotes using the\nplatform-specific path separator.","summary":"Returns path quote which is the result of joining base path and child path quotes using the platform-specific path separator.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"args_string":"(engine, base : Quote, child : Quote) : Quote","args_html":"(engine, base : Quote, child : Quote) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":29,"url":null},"def":{"name":"join","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"base","external_name":"base","restriction":"Quote"},{"name":"child","external_name":"child","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(File.join(base.string, child.string))"}},{"html_id":"mkdir(engine,path:Quote)-instance-method","name":"mkdir","doc":"Creates an empty directory at *path*, including any\nnon-existing intermediate directories. Does nothing\nif *path* already exists.","summary":"Creates an empty directory at path, including any non-existing intermediate directories.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":45,"url":null},"def":{"name":"mkdir","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"if File.exists?(path.string)\n return\nend\nFileUtils.mkdir_p(path.string)\n"}},{"html_id":"pwd(engine):Quote-instance-method","name":"pwd","doc":"Returns the working directory.","summary":"Returns the working directory.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":33,"url":null},"def":{"name":"pwd","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Dir.current)"}},{"html_id":"read?(engine,path:Quote):Quote|Nil-instance-method","name":"read?","doc":"Reads and returns the contents of file at *path*. Returns\nnil if there is no file at *path*.","summary":"Reads and returns the contents of file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote) : Quote | Nil","args_html":"(engine, path : Quote) : Quote | Nil","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":59,"url":null},"def":{"name":"read?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if File.file?(path.string)\n Quote.new(File.read(path.string))\nend"}},{"html_id":"touch(engine,path:Quote)-instance-method","name":"touch","doc":"Creates an empty file at *path*. Does nothing if *path*\nalready exists.","summary":"Creates an empty file at path.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, path : Quote)","args_html":"(engine, path : Quote)","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":41,"url":null},"def":{"name":"touch","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"path","external_name":"path","restriction":"Quote"}],"visibility":"Public","body":"File.touch(path.string)"}},{"html_id":"write?(engine,content:Quote,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nquote. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content quote.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Quote, path : Quote) : Bool","args_html":"(engine, content : Quote, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":63,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Quote"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.write(path.string, content.string)\ntrue\n"}},{"html_id":"write?(engine,content:Byteslice,path:Quote):Bool-instance-method","name":"write?","doc":"(Over)writes content of file at *path* with *content*\nbyteslice. Returns nil if *path* doesn't exist or doesn't\npoint to a file.","summary":"(Over)writes content of file at path with content byteslice.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"args_string":"(engine, content : Byteslice, path : Quote) : Bool","args_html":"(engine, content : Byteslice, path : Quote) : Bool","location":{"filename":"src/novika/capabilities/impl/disk.cr","line_number":71,"url":null},"def":{"name":"write?","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"content","external_name":"content","restriction":"Byteslice"},{"name":"path","external_name":"path","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"if (File.file?(path.string)) && (File.writable?(path.string))\nelse\n return false\nend\nFile.open(path.string, \"wb\") do |handle|\n content.write_to(handle)\nend\ntrue\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Essential","path":"Novika/Capabilities/Impl/Essential.html","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/essential.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"essential\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes essential native code vocabulary, such as 'hydrate' and 'new'\""}}],"instance_methods":[{"html_id":"inject(intotarget)-instance-method","name":"inject","abstract":false,"args":[{"name":"target","external_name":"into","restriction":""}],"args_string":"(into target)","args_html":"(into target)","location":{"filename":"src/novika/capabilities/impl/essential.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":""}],"visibility":"Public","body":"target.at(Word.new(\"true\"), True.new)\ntarget.at(Word.new(\"false\"), False.new)\ntarget.at(\"prototype\", \"( B -- Pb ): leaves the Prototype block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.prototype.onto(stack)\nend\ntarget.at(\"parent\", \"( B -- Pb ): leaves the Parent block of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n if parent = block.parent?\n else\n block.die(\"no parent for block\")\n end\n parent.onto(stack)\nend\ntarget.at(\"address\", \"( B -- A ): leaves pointer Address of Block.\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.object_id)).onto(stack)\nend\ntarget.at(\"conts\", \"( -- Cb ): pushes the Continuations block.\") do |engine, stack|\n engine.conts.onto(stack)\nend\ntarget.at(\"cont\", \"( -- Cb ): pushes the Continuation block.\") do |engine, stack|\n engine.cont.onto(stack)\nend\ntarget.at(\"newContinuation\", \"( S B -- C ): creates a Continuation from a Stack and\\n a Block.\") do |_, stack|\n Engine.cont(block: stack.drop.a(Block), stack: stack.drop.a(Block)).onto(stack)\nend\ntarget.at(\"getContBlock\", \"( C -- Cb ): leaves the Code block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_BLOCK_AT)).onto(stack)\nend\ntarget.at(\"getContStack\", \"( C -- Sb ): leaves the Stack block of a Continuation.\") do |_, stack|\n cont = stack.drop.a(Block)\n (cont.at(Engine::C_STACK_AT)).onto(stack)\nend\ntarget.at(\"this\", \"( -- B ): pushes the Block it's opened in.\\n\\n```\\n[ this ] open echo\\n\\\"STDOUT: [ this ]⏎ (instance of `[ this ]`)\\\"\\n```\") do |engine, stack|\n engine.block.onto(stack)\nend\ntarget.at(\"stack\", \"( -- S ): pushes the Stack it's opened in.\\n\\n```\\nstack dup echo\\n\\\"STDOUT: [ ⭮ ]⏎\\\"\\n\\n'foo' <<\\nstack echo\\n\\\"STDOUT: [ ⭮ 'foo' ]⏎\\\"\\n```\") do |_, stack|\n stack.onto(stack)\nend\ntarget.at(\"ahead\", \"( -- B ): leaves the block that will be executed after\\n `this` finishes.\\n\\n```\\n100 [ ahead 1 inject ] open + leaves: 101 \\\"(i.e. 100 1 +)\\\"\\n```\") do |engine, stack|\n cont = engine.conts.at(engine.conts.count - 2)\n cont = (cont.as?(Block)) || (cont.die(\"malformed continuation\"))\n ahead = cont.at(Engine::C_BLOCK_AT)\n ahead.onto(stack)\nend\ntarget.at(\"resume\", \"( B -- ): closes blocks all the way up to, but not\\n including, Block.\") do |engine, stack|\n block = stack.drop.a(Block)\n conts = engine.conts\n found = false\n while !(conts.tape.empty? || (found = block.same?(engine.block)))\n conts.drop\n end\n if found\n else\n block.die(\"resume: no such block in continuations\")\n end\nend\ntarget.at(\"dup\", \"( F -- F F ): duplicates the Form before cursor.\\n\\n```\\n'hello' dup leaves: [ 'hello' 'hello' ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ dup ] hydrate\\nblock leaves: [ [ 1 2 2 | 3 ] ]\\n```\") do |_, stack|\n stack.dupe\nend\ntarget.at(\"drop\", \"( F -- ): drops the Form before cursor.\\n\\n```\\n'hello' drop leaves: [ ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ drop ] hydrate\\nblock leaves: [ [ 1 | 3 ] ]\\n```\") do |_, stack|\n stack.drop\nend\ntarget.at(\"swap\", \"( A B -- B A ): swaps two Forms before cursor.\\n\\n```\\n1 2 swap leaves: [ 2 1 ]\\n\\n[ 1 2 | 3 ] $: block\\nblock [ swap ] hydrate\\nblock leaves: [ [ 2 1 | 3 ] ]\\n```\") do |_, stack|\n stack.swap\nend\ntarget.at(\"hydrate\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, it is added to\\n Stack (equivalent to `<<`), If Form is a block, its\\n instance is opened. To open a block without creating\\n an instance of it (unsafe), use `hydrate!`.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"hydrate!\", \"( S F -- ): opens (evaluates) Form with Stack set as the\\n active stack. If Form is not a block, the behavior is\\n the same as in `hydrate`. If Form is a block, performs\\n unsafe hydration (hydrates without making an instance\\n of the block). For a safer alternative, see `hydrate`.\\n Use if you know what you're doing, or if you're ready\\n to make an instance yourself.\\n\\nDetails: `hydrate!` is considered unsafe because hydration\\nartifacts are exposed to the user and/or its blocks. The\\ncontents of a block after hydration may differ from its\\ncontents before unsafe hydration. Indeed, `hydrate!` is\\nalmost as unsafe as pushing into `conts`; the only benefit\\nit provides is that it is able to catch infinite/very\\ndeep recursion.\") do |engine, stack|\n form = stack.drop\n new_stack = stack.drop.a(Block)\n engine.schedule!(form, new_stack)\nend\ntarget.at(\"open\", \"( F -- F' ): opens Form in the active stack. Equivalent\\n to `stack F hydrate`.\\n\\n```\\n100 open leaves: 100\\n\\n1 [ 2 + ] open leaves: 3\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, stack)\nend\ntarget.at(\"there\", \"( S B -- S ): opens Block with Stack set as the active\\n stack. Leaves Stack. Ahead is transferred to block.\\n\\n```\\n[ 1 2 ] [ + ] there leaves: [ [ 3 ] ]\\n[ 1 2 ] [ ahead thruBlock open ] there + leaves: [ [ 3 ] ]\\n```\") do |engine, stack|\n form = stack.drop\n new_stack = stack.top.a(Block)\n engine.schedule(form, new_stack)\nend\ntarget.at(\"do\", \"( F -- ): opens Form with an empty stack activated, and\\n disposed when Form has been evaluated.\\n\\n```\\n[ 'Hi!' echo ] do\\n\\\"STDOUT: Hi!⏎\\\"\\n```\") do |engine, stack|\n form = stack.drop\n engine.schedule(form, Block.new)\nend\ntarget.at(\"new\", \"( B -- I ): leaves an Instance of a Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance.onto(stack)\nend\ntarget.at(\"shallowNew\", \"( B -- Si ): leaves a Shallow instance of Block.\\n\\n`shallowNew` is different from `new` in that it does not reparent\\nsub-blocks to the parent instance recursively. Instead, it only\\ncreates an instance of Block, and does not look at skips its\\ncontent entirely.\\n\\n```\\n[ $: x [ x ] ] @: newBox\\n\\n1 newBox $: fooBox1\\n2 newBox $: fooBox2\\n3 newBox $: fooBox3\\n\\nfooBox1 open leaves: 1\\nfooBox2 open leaves: 2\\nfooBox3 open leaves: 3\\n\\n[ fooBox1 fooBox2 fooBox3 ] vals $: boxes\\n\\nboxes shallowNew $: shallowBoxesInstance\\nshallowBoxesInstance 0 fromLeft open leaves: 1\\nshallowBoxesInstance 1 fromLeft open leaves: 2\\nshallowBoxesInstance 2 fromLeft open leaves: 3\\n\\n\\\"Works as expected! Note that sub-blocks are exactly the same as\\n those in the original 'boxes' block. However, 'shallowBoxesInstance'\\n and 'boxes' are different blocks now:\\\"\\n\\n(shallowBoxesInstance 0 fromLeft) (boxes 0 fromLeft) same? leaves: true\\n(shallowBoxesInstance 1 fromLeft) (boxes 1 fromLeft) same? leaves: true\\n(shallowBoxesInstance 2 fromLeft) (boxes 2 fromLeft) same? leaves: true\\n\\nboxes shallowBoxesInstance same? leaves: false\\n\\n\\\"... and 'shallowBoxesInstance' does indeed have 'boxes' as its parent:\\\"\\n\\n(shallowBoxesInstance parent) boxes same? leaves: true\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.instance(shallow: true).onto(stack)\nend\ntarget.at(\"sel\", \"( D A B -- A/B ): selects A (Determiner is truthy) or B\\n (Determiner is falsey)\") do |_, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n (det.sel(a, b)).onto(stack)\nend\ntarget.at(\"br\", \"( D T F -- ? ): opens True/False forms depending on\\n Determiner being true/false.\") do |engine, stack|\n b = stack.drop\n a = stack.drop\n det = stack.drop\n engine.schedule(det.sel(a, b), stack)\nend\ntarget.at(\"<\", \"( A B -- S ): leaves whether A is smaller than (less than) B.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n Boolean[a < b].onto(stack)\nend\ntarget.at(\"same?\", \"( F1 F2 -- true/false ): leaves whether two Forms are the\\n same (by reference for block, by value for any other form).\\n\\n```\\n1 2 same? leaves: false\\n1 1 same? leaves: true\\n\\n'hello' 'hello world' same? leaves: false\\n'hello' 'hello' same? leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 same? leaves: false \\\"They're different blocks, content doesn't matter!\\\"\\n\\nb1 b1 same? leaves: true\\nb2 b2 same? leaves: true\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n (Boolean.same?(a, b)).onto(stack)\nend\ntarget.at(\"=\", \"( F1 F2 -- true/false ): leaves whether two Forms are equal by\\n content (they may or may not be the same forms reference-wise,\\n i.e., those for which `same?` would leave true).\\n\\n```\\n1 2 = leaves: false\\n1 1 = leaves: true\\n\\n'hello' 'hello world' = leaves: false\\n'hello' 'hello' = leaves: true\\n\\n\\\"etc...\\\"\\n\\n[ 1 2 + ] $: b1\\n[ 1 2 + ] $: b2\\n\\nb1 b2 = leaves: true \\\"They're equal by content!\\\"\\n\\nb1 b1 = leaves: true\\nb2 b2 = leaves: true\\n\\n\\\"Supports self-reference:\\\"\\n[ ] $: b3\\nb3 b3 shove\\nb3 b3 = leaves: true\\n(b3 first) b3 = leaves: true\\n\\\"etc...\\\"\\n```\") do |_, stack|\n b = stack.drop\n a = stack.drop\n Boolean[a == b].onto(stack)\nend\ntarget.at(\"anyof?\", \"( F B -- true/false ): leaves whether any form in Block is\\n equal (via `=`) to Form.\\n\\n```\\n1 [ 1 2 3 ] anyof? leaves: true\\n'hello' [ 'hello' 'world' 1 ] anyof? leaves: true\\n'hello' [ 1 2 3 ] anyof? leaves: false\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n form = stack.drop\n Boolean[form.in?(block)].onto(stack)\nend\ntarget.at(\"occurrences\", \"( B/Q Pf/Pq -- Bi ): leaves Begin indices of all occurrences\\n of Pattern form/Pattern quote in Block/Quote. Begin indices\\n is an orphan with no entries.\\n\\nWorks in a similar way to `anyof?` in that it compares each\\nelement of the Block/Quote with Pattern form/Pattern quote\\nlike `=` (but not using `=`, at least in the quote case\\nwhere KMP is used).\\n\\n```\\n[ ] 123 occurrences leaves: [ [ ] ]\\n\\n[ 1 1 2 0 0 1 2 1 3 4 8 ] $: haystack\\nhaystack 0 occurrences leaves: [ [ 3 4 ] ]\\nhaystack 1 occurrences leaves: [ [ 0 1 5 7 ] ]\\nhaystack 'foo' occurrences leaves: [ [ ] ]\\n\\n'' 'foobar' occurrences leaves: [ [ ] ]\\n'foobar' '' occurrences leaves: [ [ ] ]\\n\\n'foobra' $: haystack\\nhaystack 'o' occurrences leaves: [ [ 1 2 ] ]\\nhaystack 'foo' occurrences leaves: [ [ 0 ] ]\\nhaystack 'ra' occurrences leaves: [ [ 4 ] ]\\n\\n'GATCCATATG' $: haystack\\nhaystack 'ATAAT' occurrences leaves: [ [ ] ]\\nhaystack 'ATAT' occurrences leaves: [ [ 5 ] ]\\n```\") do |_, stack|\n pattern = stack.drop\n iterable = stack.drop.a(Block | Quote)\n case iterable\n in Quote\n fail = iterable.empty? || (pattern.is_a?(Quote) && pattern.empty?)\n in Block\n fail = iterable.count.zero?\n end\n if fail\n Block.new.onto(stack)\n next\n end\n occurrences = [] of Form\n iterable.each_occurrence_of(pattern) do |index|\n occurrences << (Decimal.new(index))\n end\n (Block.with(occurrences, leaf: false)).onto(stack)\nend\ntarget.at(\"uppercase?\", \"( Q -- true/false ): leaves whether Quote is all-uppercase.\\n If Quote is empty, leaves false.\\n\\n```\\n'' uppercase? leaves: false\\n'A' uppercase? leaves: true\\n'hello' uppercase? leaves: false\\n'Hello' uppercase? leaves: false\\n'HELLO' uppercase? leaves: true\\n'HELLO WORLD' uppercase? leaves: false\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n string = quote.string\n case string.size\n when 0\n isup = false\n when 1\n isup = string[0].uppercase?\n else\n isup = true\n string.each_char do |char|\n if char.uppercase?\n else\n isup = false\n break\n end\n end\n end\n Boolean[isup].onto(stack)\nend\ntarget.at(\"toUppercase\", \"( Q -- Uq ): leaves all- Uppercase quote for Quote: converts\\n lowercase character(s) in Quote to uppercase. If Quote is empty,\\n leaves empty quote.\\n\\n```\\n'' toUppercase leaves: ''\\n'hello' toUppercase leaves: 'HELLO'\\n'hello world' toUppercase? leaves: 'HELLO WORLD'\\n```\") do |_, stack|\n quote = stack.drop.a(Quote)\n (Quote.new(quote.string.upcase)).onto(stack)\nend\ntarget.at(\"block?\", \"( F -- true/false ): leaves whether Form is a block.\") do |_, stack|\n Boolean[stack.drop.is_a?(Block)].onto(stack)\nend\ntarget.at(\"asBlock\", \"( F -- B ): asserts that Form is a Block, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBlock\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n[] asBlock leaves: [ [] \\\"(the same block)\\\" ]\\n```\") do |_, stack|\n stack.top.a(Block)\nend\ntarget.at(\"word?\", \"( F -- true/false ): leaves whether Form is a word form,\\n or a block that implements '__word__'.\\n\\n```\\n#foo word? leaves: true\\n\\n[ #foo $: __word__ this ] open word? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Word) || (form.is_a?(Block) && (form.can_be?(Word)))].onto(stack)\nend\ntarget.at(\"private?\", \"( W -- true/false ): leaves whether Word is private (by convention).\\n\\nA Word prefixed by one or more underscores '_' *but that which\\ndoes not end with one(s)* is considered private by convention.\\nHook words such as `__quote__` are *not* considered private.\\n\\nThe fact that privacy is defined \\\"by convention\\\" means that nothing\\nactually stops anyone from obtaining the word's associated value form.\\n\\n```\\n#hello private? leaves: false\\n#_hello private? leaves: true\\n#_ private? leaves: false \\\"Beware!\\\"\\n```\") do |_, stack|\n Boolean[(stack.drop.a(Word)).private?].onto(stack)\nend\ntarget.at(\"toWord\", \"( F -- W ): converts Form into Word.\\n 1. If Form is a word, behaves as noop\\n 2. If Form is a quote, dies only if quote contains\\n Unicode whitespace characters or is itself empty.\\n 3. If Form is a quoted word, peels off **all** quoting\") do |_, stack|\n form = stack.drop.a((Word | QuotedWord) | Quote)\n case form\n in Word\n form.onto(stack)\n in QuotedWord\n form.to_word.onto(stack)\n in Quote\n string = form.string\n if string.empty?\n form.die(\"toWord: quote argument is empty\")\n else\n if string.each_char.any?(&.whitespace?)\n form.die(\"toWord: quote argument contains whitespace\")\n end\n end\n (Word.new(form.string)).onto(stack)\n end\nend\ntarget.at(\"asWord\", \"( F -- W ): asserts that Form is a Word form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#foo asWord leaves: [ foo ]\\n```\\n\\n`__word__` hook can make a block usable in place of a word,\\nprovided its definition leaves a word or a block which\\nimplements '__word__':\\n\\n```\\n[ $: x x $: __word__ this ] @: a\\n#foo a asWord \\\"beware: leaves instance of a\\\"\\n#boo a a asWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Word)\nend\ntarget.at(\"quotedWord?\", \"( F -- true/false ): leaves whether Form is a quoted word\\n form, or a block that implements '__quotedWord__'.\\n\\n```\\n##foo quotedWord? leaves: true\\n[ ##foo $: __quotedWord__ this ] open quotedWord? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(QuotedWord) || (form.is_a?(Block) && (form.can_be?(QuotedWord)))].onto(stack)\nend\ntarget.at(\"asQuotedWord\", \"( F -- Qw ): asserts that Form is a Quoted word form,\\n dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuotedWord\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n##foo asQuotedWord leaves: #foo\\n```\\n\\n`__quotedWord__` hook can make a block usable in place of\\na quoted word, provided its definition leaves a quoted\\nword or a block that implements `__quotedWord__`:\\n\\n```\\n[ $: x x $: __quotedWord__ this ] @: a\\n##foo a asQuotedWord \\\"beware: leaves instance of a\\\"\\n##boo a a asQuotedWord \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(QuotedWord)\nend\ntarget.at(\"decimal?\", \"( F -- true/false ): leaves whether Form is a decimal form,\\n or a block that implements '__decimal__'.\\n\\n```\\n123 decimal? leaves: true\\n[ 123 $: __decimal__ this ] open decimal? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Decimal) || (form.is_a?(Block) && (form.can_be?(Decimal)))].onto(stack)\nend\ntarget.at(\"toQuotedWord\", \"( Qw/W -- #Qw/#W ): adds a layer of \\\"quoting\\\" to Quoted\\n word or Word.\\n\\n```\\n\\\"Note that in quoted word literals (here on the left hand\\n side) one layer of quoting is 'eaten off' by the parser!\\\"\\n\\n#foo toQuotedWord leaves: #foo\\n##foo toQuotedWord leaves: ##foo\\n```\") do |_, stack|\n form = stack.drop.a(Word | QuotedWord)\n form.to_quoted_word.onto(stack)\nend\ntarget.at(\"asDecimal\", \"( F -- D ): asserts that Form is a Decimal form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asDecimal\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n100 asDecimal leaves: 100\\n```\\n\\n`__decimal__` hook can make a block usable in place of a\\ndecimal, provided its definition leaves a decimal or a\\nblock that implements `__decimal__`:\\n\\n```\\n[ $: x x $: __decimal__ this ] @: a\\n100 a asDecimal \\\"beware: leaves an instance of a\\\"\\n200 a a asDecimal \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Decimal)\nend\ntarget.at(\"quote?\", \"( F -- true/false ): leaves whether Form is a quote form,\\n or a block that implements '__quote__'.\\n\\n```\\n'foo' quote? leaves: true\\n[ 'foo' $: __quote__ this ] open quote? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Quote) || (form.is_a?(Block) && (form.can_be?(Quote)))].onto(stack)\nend\ntarget.at(\"asQuote\", \"( F -- Q ): asserts that Form is a Quote form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asQuote\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'foo' asQuote leaves: 'foo'\\n```\\n\\n`__quote__` hook can make a block usable in place of a\\nquote, provided its definition leaves a quote or a block\\nthat implements `__quote__`:\\n\\n```\\n[ $: x x $: __quote__ this ] @: a\\n'foo' a asQuote \\\"beware: leaves instance of a\\\"\\n'boo' a a asQuote \\\"beware: leaves instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Quote)\nend\ntarget.at(\"boolean?\", \"( F -- true/false ): leaves whether Form is a boolean form,\\n or a block that implements '__boolean__'.\\n\\n```\\ntrue boolean? leaves: true\\n[ true $: __boolean__ this ] open boolean? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Boolean) || (form.is_a?(Block) && (form.can_be?(Boolean)))].onto(stack)\nend\ntarget.at(\"asBoolean\", \"( F -- true/false ): asserts that Form is a boolean form, dies\\n if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asBoolean\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\ntrue asBoolean leaves: true\\nfalse asBoolean leaves: false\\n```\\n\\n`__boolean__` hook can make a block usable in place of a\\nboolean, provided its definition leaves a boolean or a\\nblock that implements `__boolean__`:\\n\\n```\\n[ $: x x $: __boolean__ this ] @: a\\ntrue a asBoolean \\\"beware: leaves an instance of a\\\"\\ntrue a a asBoolean \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Boolean)\nend\ntarget.at(\"builtin?\", \"( F -- true/false ): leaves whether Form is a builtin form.\") do |_, stack|\n Boolean[stack.drop.is_a?(Builtin)].onto(stack)\nend\ntarget.at(\"asBuiltin\", \"( F -- B ): asserts Form is a Builtin, dies if it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n'foo' asBuiltin\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n#+ here asBuiltin toQuote leaves: '[ native code ]'\\n```\") do |_, stack|\n stack.top.a(Builtin)\nend\ntarget.at(\"color?\", \"( F -- true/false ): leaves whether Form is a color form,\\n or a block that implements '__color__'.\\n\\n```\\n0 0 0 rgb color? leaves: true\\n[ 0 0 0 rgb $: __color__ this ] open color? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Color) || (form.is_a?(Block) && (form.can_be?(Color)))].onto(stack)\nend\ntarget.at(\"asColor\", \"( F -- C ): asserts that Form is a Color form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asColor\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n0 0 0 rgb asColor toQuote leaves: 'rgb(0, 0, 0)'\\n```\\n\\n`__color__` hook can make a block usable in place of a\\ncolor, provided its definition leaves a color or a block\\nthat implements `__color__`:\\n\\n```\\n[ $: x x $: __color__ this ] @: a\\n0 0 0 rgb a asColor \\\"beware: leaves an instance of a\\\"\\n0 0 0 rgb a a asColor \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Color)\nend\ntarget.at(\"byteslice?\", \"( F -- true/false ): leaves whether Form is a byteslice\\n form, or a block that implements '__byteslice__'.\\n\\n```\\n'hello world' toByteslice byteslice? leaves: true\\n[ [ 'Hi!' toByteslice ] $: __byteslice__ this ] open byteslice? leaves: true\\n```\") do |_, stack|\n form = stack.drop\n Boolean[form.is_a?(Byteslice) || (form.is_a?(Block) && (form.can_be?(Byteslice)))].onto(stack)\nend\ntarget.at(\"asByteslice\", \"( F -- B ): asserts that Form is a Byteslice form, dies if\\n it's not.\\n\\nFor example, the following expression dies:\\n\\n```\\n100 asByteslice\\n```\\n\\nEt cetera for all other forms, except:\\n\\n```\\n'hello world' toByteslice asByteslice leaves: '[byteslice, consists of 11 mutable byte(s)]'\\n```\\n\\n`__byteslice__` hook can make a block usable in place of\\na byteslice, provided its definition leaves a byteslice\\nor a block that implements `__byteslice__`:\\n\\n```\\n[ $: x x $: __byteslice__ this ] @: a\\n'foo' toByteslice a asByteslice \\\"beware: leaves an instance of a\\\"\\n'foo' toByteslice a a asByteslice \\\"beware: leaves an instance of a\\\"\\n```\") do |_, stack|\n stack.top.a(Byteslice)\nend\ntarget.at(\"pushes\", \"( B N F -- ): creates a definition for Name in Block that\\n pushes Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form))\nend\ntarget.at(\"opens\", \"( B N F -- ): creates a definition for Name in Block that\\n opens Form when resolved there.\") do |_, stack|\n form = stack.drop\n name = stack.drop\n block = stack.drop.a(Block)\n block.at(name, Entry.new(form, opener: true))\nend\ntarget.at(\"entry:submit\", \"( Ss N F -- ): replaces the value form of an existing\\n definition for Name in Submittable store (usually a block)\\n to Form. Does not change whether the definition opens\\n or pushes.\\n\\n```\\n[ 'John Doe' $: fullName\\n [ fullName count ] @: fullNameLength\\n] obj $: person\\n\\nperson.fullName leaves: 'John Doe'\\nperson.fullNameLength leaves: 8\\n\\n\\\"Let's try to change the name:\\\"\\nperson #fullName 'Alice Bobette' entry:submit\\nperson.fullName leaves: 'Alice Bobette'\\nperson.fullNameLength leaves: 13\\n\\n\\\"Now let's change the way we compute the length; let's count\\n how many double-Ts there are in the full name.\\\"\\nperson #fullNameLength [ person.fullName 'tt' occurrences count ] entry:submit\\n\\n\\\"... just one:\\\"\\nperson.fullNameLength leaves: 1\\n\\n\\\"... or maybe multiple:\\\"\\nperson #fullName 'Tette Mopettitte' entry:submit\\nperson.fullName leaves: 'Tette Mopettitte'\\nperson.fullNameLength leaves: 3\\n```\") do |_, stack|\n form = stack.drop\n name = stack.drop\n submittable = stack.drop.a(ISubmittableStore)\n submittable.submit(name, form)\nend\ntarget.at(\"entry:exists?\", \"( Rs N -- true/false ): leaves whether Readable store\\n (usually a block) can fetch value for Name.\\n\\n```\\n[ orphan $: table\\n orphan extendWith: [\\n [ ${ name age score }\\n [ name $: name\\n age $: age ] obj toDict $: record\\n table record score pushes\\n ] @: set\\n [ ${ name age } table (this toDict) entry:fetch ] @: get\\n [ ${ name age } table (this toDict) entry:exists? ] @: has?\\n [ table entry:names map: [ $: record\\n [\\n record.name (31 ' ' lpad) (31 '...' fit)\\n record.age toQuote (15 ' ' lpad) (15 '...' fit)\\n (table record entry:fetch) toQuote (16 ' ' lpad) (16 '...' fit)\\n ] vals sepBy: ' |'\\n ] sepBy: '\\n'\\n ] @: __quote__\\n ]\\n] @: newScoreboard\\n\\nnewScoreboard $: scoreboard\\n\\n'John Doe' 42 '100 points' scoreboard.set\\n'Johnanna Doe' 28 '170 points' scoreboard.set\\n'Alice H.' 19 '250 points' scoreboard.set\\n'David A.' 67 '90 points' scoreboard.set\\n\\nscoreboard echo\\n\\n\\\"\\\"\\\"STDOUT:\\n John Doe | 42 | 100 points⏎\\n Johnanna Doe | 28 | 170 points⏎\\n Alice H. | 19 | 250 points⏎\\n David A. | 67 | 90 points⏎\\n\\\"\\\"\\\"\\n\\n'John Doe' 42 scoreboard.get leaves: '100 points'\\n'Alice H.' 19 scoreboard.get leaves: '250 points'\\n\\n'David A.' 67 scoreboard.has? leaves: true\\n'David A.' 123 scoreboard.has? leaves: false\\n'Peter Peterson' 19 scoreboard.has? leaves: false\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.has_form_for?(name)].onto(stack)\nend\ntarget.at(\"entry:fetch\", \"( Rs N -- F ): leaves the value Form with the given Name\\n in Readable store (usually a block). Does not open the\\n value form. Dies if Store does not contain an entry\\n for Name.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: a\\n\\na #x entry:fetch leaves: 100\\na #y entry:fetch leaves: 200\\na #a entry:fetch leaves: a \\\"via inheritance\\\"\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n (store.form_for(name)).onto(stack)\nend\ntarget.at(\"entry:fetch?\", \"( Rs N -- F true / false ): leaves value Form of the entry with\\n the given Name in Readable store (usually a block), follows it\\n with `true`. If there is no entry with the given name leaves\\n `false` only. Does not open the value form.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: a\\n\\na #x entry:fetch? leaves: [ 100 true ]\\na #y entry:fetch? leaves: false\\n\\na ('Enter name> ' readLine or: okbye toWord) entry:fetch? br:\\n [ 'Here is its value: ' _ ~ ]\\n 'Entry does not exist :('\\necho\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n if form = store.form_for?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:open\", \"( Rs C N -- ... ): resolves Name in Readable store and *opens*\\n it if it is an opener, assuming Caller to be the opener block.\") do |_, stack|\n name = stack.drop.a(Word)\n caller = stack.drop.a(Block)\n store = stack.drop.a(IReadableStore)\n if store.is_a?(Block)\n else\n form = store.form_for(name)\n form.onto(stack)\n next\n end\n entry = store.entry_for(name)\n if entry.opener?\n caller.inject(Word.new(\"open\"))\n end\n entry.onto(stack)\nend\ntarget.at(\"entry:flatFetch?\", \"( B N -- F true / false ): leaves the value Form of the entry with the\\n given Name in Block's dictionary. Follows it by `true` if it exists.\\n Leaves only `false` if there is no such entry in Block. Block hierarchy\\n (friends, parents) is not traversed. This word only looks at Block's\\n own dictionary). Does not open the value Form.\\n\\n```\\n[ 100 $: x 200 $: y ] obj $: myParent\\n[ 'hello' $: x ] obj $: myChild\\n\\n(myParent -- myChild) drop\\n\\nmyParent #x entry:flatFetch? leaves: [ 100 true ]\\nmyParent #y entry:flatFetch? leaves: [ 200 true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\nmyChild #x entry:flatFetch? leaves: [ 'hello' true ]\\nmyChild #foobar entry:flatFetch? leaves: false\\n\\n\\\"Even though myChild is a child of myParent and has access to 'y',\\n `entry:flatFetch?` doesn't care.\\\"\\nmyChild #y entry:flatFetch? leaves: false \\\"doesn't inherit!\\\"\\n\\n\\\"Compare it with `entry:fetch?`:\\\"\\nmyChild #y entry:fetch? leaves: [ 200 true ]\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if form = block.flat_at?(name)\n form.onto(stack)\n end\n Boolean[!(!form)].onto(stack)\nend\ntarget.at(\"entry:opener?\", \"( Rs N -- true/false ): leaves whether an entry with the given\\n Name is an opener entry in Readable store (usually a block).\\n Dies if Readable store has no entry with the given Name.\\n\\n```\\n[ 100 $: x ] obj toOrphan $: foo\\n\\nfoo #x entry:opener? leaves: false\\nfoo.x leaves: 100\\n\\n\\\"Change not only the value form for 'x' but also its type: make\\n it an opener.\\\"\\nfoo extend: [ [ 1 2 + ] @: x ]\\n\\nfoo #x entry:opener? leaves: true\\nfoo.x leaves: 3\\n```\") do |_, stack|\n name = stack.drop\n store = stack.drop.a(IReadableStore)\n Boolean[store.opener?(name)].onto(stack)\nend\ntarget.at(\"entry:delete\", \"( B N -- ): removes the entry corresponding to Name form\\n from the dictionary of Block if it exists there. Otherwise,\\n does nothing.\\n\\n```\\n100 $: x\\n\\n[ 200 $: x ] obj $: foo\\n\\n\\\"'x' of foo shadows 'x' of toplevel block\\\"\\nfoo.x leaves: 200\\n\\n\\\"Let's try to remove it so it doesn't:\\\"\\nfoo #x entry:delete\\nfoo.x leaves: 100\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n block.delete_entry(name)\nend\ntarget.at(\"entry:wipeout\", \"( B -- ): removes all *owned* dictionary entries in Block.\\n\\n```\\n[ 100 $: x\\n 200 $: y\\n] obj $: numbers\\n\\nnumbers entry:names leaves: [ [x y] ]\\n\\nnumbers entry:wipeout\\nnumbers entry:names leaves: [ [] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.clear_entries\nend\ntarget.at(\"entry:pathTo?\", \"( B N -- P F true / false ): leaves Path, a block describing the\\n path to Form (including Block itself) under the corresponding\\n Name (like `entry:fetch?`). Follows Path and Form with `true`\\n indicating success, otherwise *only* `false` indicating that\\n there is no Form corresponding to Name in Block or any of the\\n blocks reachable from Block.\\n\\nThis word exists mainly for testing word lookup sanity. Feel free\\nto use it if you find any reason to!\\n\\n```\\n[ 100 $: x 'a' $: __quote__ ] obj $: a\\n[ 200 $: y 'b' $: __quote__ ] obj $: b\\n[ 300 $: z 'c' $: __quote__ ] obj $: c\\n\\na -- b -- c drop\\n\\n[ a #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ a ] 100 true'\\n[ b #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ b a ] 100 true'\\n[ c #x entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b a ] 100 true'\\n\\n[ b #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ b ] 200 true'\\n[ c #y entry:pathTo? ] vals sepBy: ' ' leaves: '[ c b ] 200 true'\\n\\n[ c #z entry:pathTo? ] vals sepBy: ' ' leaves: '[ c ] 300 true'\\n\\n[ c #foo entry:pathTo? ] vals sepBy: ' ' leaves: 'false'\\n```\") do |_, stack|\n name = stack.drop\n block = stack.drop.a(Block)\n if result = block.path_to_entry?(name)\n else\n Boolean[false].onto(stack)\n next\n end\n needle, path = result\n path.onto(stack)\n needle.onto(stack)\n Boolean[true].onto(stack)\nend\ntarget.at(\"entry:names\", \"( B -- Nb ): gathers all *owned* dictionary entry names of Block\\n into Name block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop \\\"for good measure :)\\\"\\n\\nmyParent entry:names leaves: [ [y x] ]\\nmyChild entry:names leaves: [ [z] ]\\nmyFriend entry:names leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_name do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:names*\", \"( B -- Nb ): gathers all dictionary entry names *reachable* from\\n Block to Name block. That is, gathers all entry names in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance of\\nBlock's relative graph.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:names* leaves: [ [y x greeting] ]\\nmyChild entry:names* leaves: [ [z y x greeting] ]\\nmyFriend entry:names* leaves: [ [greeting] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n names = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_name do |name|\n names << name\n if leaf\n next\n end\n leaf = name.is_a?(Block)\n end\n nil\n end\n names.uniq!\n (Block.with(names, leaf)).onto(stack)\nend\ntarget.at(\"entry:values\", \"( B -- Vb ): gathers all *owned* dictionary entry value forms of\\n Block into Value block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myParent\\n[ 300 $: z ] obj $: myChild\\n[ 'Hello World' $: greeting ] obj $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values leaves: [ [200 100] ]\\nmyChild entry:values leaves: [ [300] ]\\nmyFriend entry:values leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n result = Block.new\n block.each_entry_value do |form|\n result.add(form)\n end\n result.onto(stack)\nend\ntarget.at(\"entry:values*\", \"( B -- Nb ): gathers all dictionary entry values *reachable* from\\n Block to Name block. That is, gathers all entry values in Block,\\n Block's parents, Block's friends, and so on. Explores the entire\\n relative graph of Block.\\n\\nOrder is not guaranteed, and mainly depends on the appearance\\nof Block's relative graph. Values may repeat if some blocks\\nin this graph define entries with the same name.\\n\\n```\\n[ 100 200 ${ x y } ] obj toOrphan $: myParent\\n[ 300 $: z ] obj toOrphan $: myChild\\n[ 'Hello World' $: greeting ] obj toOrphan $: myFriend\\n\\nmyParent -- myChild drop\\nmyParent ·> myFriend drop\\nmyChild ·> myFriend drop\\n\\nmyParent entry:values* leaves: [ [200 100 'Hello World'] ]\\nmyChild entry:values* leaves: [ [300 200 100 'Hello World'] ]\\nmyFriend entry:values* leaves: [ ['Hello World'] ]\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n values = [] of Form\n leaf = false\n block.each_relative_fetch do |relative|\n relative.each_entry_value do |value|\n values << value\n if leaf\n next\n end\n leaf = value.is_a?(Block)\n end\n nil\n end\n (Block.with(values, leaf)).onto(stack)\nend\ntarget.at(\"entry:count\", \"( B -- Ec ): leaves Entry count, that is, the amount of entries\\n owned by (defined in) Block.\\n\\n```\\n[ 100 200 ${ x y } ] obj $: myBlock\\n\\nmyBlock entry:count leaves: 2 \\\"'x' and 'y'\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n (Decimal.new(block.entry_count)).onto(stack)\nend\ntarget.at(\"shallowCopy\", \"( B -- C ): makes a shallow copy (sub-blocks are not copied)\\n of Block's tape and dictionary, and leaves a Copy block with\\n the tape copy, dictionary copy set as its tape, dictionary.\\n\\n```\\n[ 1 2 3 ] $: a\\na shallowCopy $: b\\na #x 0 pushes\\nb #y 1 pushes\\nb 1 shove\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 1 · ${y :: 1} ]⏎\\\"\\n```\") do |_, stack|\n (stack.drop.a(Block)).shallow.onto(stack)\nend\ntarget.at(\"resub\", \"( O B -- ): replaces the substrate of Block with Other's\\n substrate. This is useful if you want to swap Block's\\n contents with Other's without changing Block's identity:\\n\\n```\\n[ 1 2 3 ] $: a\\n[ 'a' 'b' 'c' ] $: b\\nb #x 0 pushes\\nb echo\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n```\\n\\nNote that since *substrate* is replaced, not *tape*, the\\ncursor position is saved:\\n\\n```\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\nb 2 |-\\na b 2echo\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n\\\"STDOUT: [ 'a' | 'b' 'c' · ${x :: 0} ]⏎\\\"\\n\\na b resub\\nb echo\\n\\\"STDOUT: [ 1 | 2 3 · ${x :: 0} ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n other = stack.drop.a(Block)\n block.resub(other)\nend\ntarget.at(\"fromLeft\", \"( B/Q/Bf I -- E ): leaves Index-th Element from left in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromLeft leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(index.to_i)).onto(stack)\nend\ntarget.at(\"fromRight\", \"( B/Q/Bf I -- E ): leaves Index-th Element from right in Block,\\n Quote, or Byteslice form.\\n\\n```\\n[ 1 2 3 ] 0 fromRight leaves: 3\\n[ 1 2 3 ] 1 fromRight leaves: 2\\n[ 1 2 3 ] 2 fromRight leaves: 1\\n```\") do |_, stack|\n index = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at((form.count - index.to_i) - 1)).onto(stack)\nend\ntarget.at(\"fromLeft*\", \"( B/Q/Bf N -- Eb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from left in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromLeft* leaves: [ [ 1 ] ]\\n[ 1 2 3 ] 2 fromLeft* leaves: [ [ 1 2 ] ]\\n[ 1 2 3 ] 3 fromLeft* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromLeft* leaves: [ [ 1 2 3 ] ]\\n'hello' 3 fromLeft* leaves: 'hel'\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(0, size.to_i - 1)).onto(stack)\nend\ntarget.at(\"fromRight*\", \"( B/Q/Bf N -- Fb/Rq/Rbf ): leaves Elements block (if given\\n a Block), Result quote (if given a Quote), or Result\\n byteslice form (if given a Byteslice form) with N forms/\\n chars/bytes from right in Block/Quote/Byteslice form.\\n If N is larger than Block/Quote/Byteslice form count,\\n it is made equal to Block/Quote/Byteslice form count.\\n Dies if N is negative.\\n\\n```\\n[ 1 2 3 ] 1 fromRight* leaves: [ [ 3 ] ]\\n[ 1 2 3 ] 2 fromRight* leaves: [ [ 2 3 ] ]\\n[ 1 2 3 ] 3 fromRight* leaves: [ [ 1 2 3 ] ]\\n[ 1 2 3 ] 100 fromRight* leaves: [ [ 1 2 3 ] ]\\n```\") do |_, stack|\n size = (stack.drop.a(Decimal)).posint\n form = stack.drop.a((Block | Quote) | Byteslice)\n (form.at(form.count - size.to_i, form.count - 1)).onto(stack)\nend\ntarget.at(\"+\", \"( A B -- S ): leaves the Sum of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a + b)\nend\ntarget.at(\"-\", \"( A B -- D ): leaves the Difference of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a - b)\nend\ntarget.at(\"*\", \"( A B -- P ): leaves the Product of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a * b)\nend\ntarget.at(\"/\", \"( A B -- Q ): leaves the Quotient of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"division by zero\")\n end\n stack.add(a / b)\nend\ntarget.at(\"mod\", \"( A B -- M ): leaves the Modulo of two decimals.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n if b.zero?\n b.die(\"modulo by zero\")\n end\n stack.add(a % b)\nend\ntarget.at(\"**\", \"( A B -- R ): raises A to the power B, leaves Result.\") do |_, stack|\n b = stack.drop.a(Decimal)\n a = stack.drop.a(Decimal)\n stack.add(a ** b)\nend\ntarget.at(\"round\", \"( D -- Rd ): rounds Decimal towards the nearest integer,\\n leaves the corresoinding Rounded decimal. If both neighboring\\n integers are equidistant, rounds towards the even neighbor\\n (Banker's rounding).\\n\\n```\\n1 round leaves: 1\\n1.23 round leaves: 1\\n\\n1.5 round leaves: 2\\n1.67 round leaves: 2\\n\\n2.5 round leaves: 2 \\\"rounds towards the even neighbor\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.round.onto(stack)\nend\ntarget.at(\"floor\", \"( D -- Rd ): rounds Decimal *down* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 floor leaves: 1\\n1.23 floor leaves: 1\\n\\n1.5 floor leaves: 1\\n1.67 floor leaves: 1\\n\\n2.5 floor leaves: 2\\n\\n-2.5 floor leaves: -3 \\\"rounds down!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.floor.onto(stack)\nend\ntarget.at(\"ceil\", \"( D -- Rd ): rounds Decimal *up* towards the nearest integer,\\n leaves the corresoinding Rounded decimal.\\n\\n```\\n1 ceil leaves: 1\\n1.23 ceil leaves: 2\\n\\n1.5 ceil leaves: 2\\n1.67 ceil leaves: 2\\n\\n2.5 ceil leaves: 3\\n\\n-2.5 ceil leaves: -2 \\\"rounds up!\\\"\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.ceil.onto(stack)\nend\ntarget.at(\"trunc\", \"( D -- Rd ): rounds Decimal towards zero, leaves the resulting\\n Rounded decimal.\\n\\n```\\n1 trunc leaves: 1\\n1.23 trunc leaves: 1\\n1.5 trunc leaves: 1\\n1.67 trunc leaves: 1\\n2.5 trunc leaves: 2\\n\\n-2.3 trunc leaves: -2\\n```\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.trunc.onto(stack)\nend\ntarget.at(\"sqrt\", \"( D -- R ): leaves the square Root of Decimal.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.sqrt.onto(stack)\nend\ntarget.at(\"cos\", \"( Air -- Dc ): leaves Decimal cosine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_cos.onto(stack)\nend\ntarget.at(\"sin\", \"( Air -- Ds ): leaves Decimal sine of Angle in radians.\") do |_, stack|\n decimal = stack.drop.a(Decimal)\n decimal.rad_sin.onto(stack)\nend\ntarget.at(\"rand\", \"( -- Rd ): leaves a Random decimal between 0 and 1.\") do |_, stack|\n (Decimal.new(rand)).onto(stack)\nend\ntarget.at(\"sliceQuoteAt\", \"( Q Sp -- Pb Pa ): for the given Quote, leaves the Part\\n before and Part after Slice point.\\n\\n```\\n'hello world' 2 sliceQuoteAt leaves: [ 'he' 'llo world' ]\\n```\") do |_, stack|\n spt = stack.drop.a(Decimal)\n quote = stack.drop.a(Quote)\n qpre, qpost = quote.slice_at(spt.to_i)\n qpre.onto(stack)\n qpost.onto(stack)\nend\ntarget.at(\"count\", \"( B/Q/Bf -- N ): leaves N, the amount of elements/graphemes/\\n bytes in Block/Quote/Byteslice form.\") do |_, stack|\n form = stack.drop.a((Block | Quote) | Byteslice)\n (Decimal.new(form.count)).onto(stack)\nend\ntarget.at(\"chr\", \"( Uc -- Q ): leaves a quote that consists of a single\\n character with the given Unicode codepoint.\") do |_, stack|\n ord = (stack.drop.a(Decimal)).posint.in(0..55295, 57344..1114111)\n (Quote.new(ord.chr)).onto(stack)\nend\ntarget.at(\"ord\", \"( Q -- Uc ): leaves the Unicode codepoint for the first\\n character in Quote. Dies if Quote is empty.\") do |_, stack|\n quote = stack.drop.a(Quote)\n if ord = quote.ord?\n else\n quote.die(\"ord: quote must contain at least one character\")\n end\n (Decimal.new(ord)).onto(stack)\nend\ntarget.at(\"lpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the left of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' lpad leaves: '-----hello'\\n'hello' 10 ':-' lpad leaves: ':----hello'\\n'hello' 7 'XYZABC' lpad leaves: 'XYhello'\\n'hello' 9 'XYZABC' lpad leaves: 'XYZAhello'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Left)).onto(stack)\nend\ntarget.at(\"rpad\", \"( Q Tl Pq -- Jq ): appends consecutive characters from Padding quote\\n (the last one is repeated if no more follow) to the right of Quote,\\n until Quote count becomes equal to Total length. Leaves the resulting\\n Justified quote. If Quote count is greater than or equal to Total\\n length, Quote is left unchanged as the Justified quote.\\n\\n```\\n'hello' 10 '-' rpad leaves: 'hello-----'\\n'hello' 10 ' -' rpad leaves: 'hello ----'\\n'hello' 7 'foobar' rpad leaves: 'hellofo'\\n```\") do |_, stack|\n padder = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.pad(total.to_i, padder, side: Quote::PadSide::Right)).onto(stack)\nend\ntarget.at(\"fit\", \"( Q Tl Eq -- Fq ): if Quote is longer than Total length, truncates\\n it so that it can fit Ellipsis quote, and stitches the truncated\\n Quote with the Ellipsis quote, forming Fit quote which is then\\n left on the stack.\\n\\nEssentially, Fit quote is guaranteed to be of Total length\\ncharacters **or less!**.\\n\\n```\\n'hello' 10 '…' fit leaves: 'hello'\\n'hello world' 10 '…' fit leaves: 'hello wor…'\\n'hello world' 8 '' fit leaves: 'hello wo'\\n'Lorem ipsum dolor sit amet' 10 '-' fit leaves: 'Lorem ipsu-'\\n'Lorem ipsum dolor sit amet' 24 '… (hidden)' fit leaves: 'Lorem ipsum do… (hidden)'\\n```\") do |_, stack|\n ellipsis = stack.drop.a(Quote)\n total = (stack.drop.a(Decimal)).posint\n quote = stack.drop.a(Quote)\n (quote.fit(total.to_i, ellipsis)).onto(stack)\nend\ntarget.at(\"|at\", \"( B -- N ): leaves N, the position of the cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n cursor = Decimal.new(block.cursor)\n cursor.onto(stack)\nend\ntarget.at(\"|to\", \"( B N -- ): moves the cursor in Block to N.\") do |_, stack|\n cursor = stack.drop.a(Decimal)\n block = stack.drop.a(Block)\n block.to(cursor.to_i)\nend\ntarget.at(\"<|\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor - 1)\nend\ntarget.at(\"|>\", \"( -- ): moves stack cursor once to the left.\") do |_, stack|\n stack.to(stack.cursor + 1)\nend\ntarget.at(\"|slice\", \"( B -- Lh Rh ): slices Block at cursor. Leaves Left half\\n and Right half.\") do |_, stack|\n block = stack.drop.a(Block)\n lhs, rhs = block.slice\n lhs.onto(stack)\n rhs.onto(stack)\nend\ntarget.at(\"cherry\", \"( [ ... E | ... ]B ~> [ ... | ... ]B -- E ): drops Block\\n and Element before cursor in Block (and moves cursor back\\n once), leaves Element.\") do |_, stack|\n (stack.drop.a(Block)).drop.onto(stack)\nend\ntarget.at(\"shove\", \"( [ ... | ... ]B E ~> [ ... E | ... ]B -- ): adds Element\\n before cursor in Block (and moves cursor forward once),\\n drops both.\") do |_, stack|\n stack.drop.onto(stack.drop.a(Block))\nend\ntarget.at(\"shove*\", \"( [ ...bl | ...br ]B [ ...el | ...er ]Eb ~> [ ...bl ...el | ...br ]B -- ): adds\\n elements before cursor in Element block after the cursor in Block.\\n\\n```\\n[ 1 2 3 ] $: xs\\nxs [ 4 5 6 ] shove*\\nxs leaves: [ [ 1 2 3 4 5 6 \\\"|\\\" ] ]\\n\\n[ 1 | 2 3 ] $: ys\\nys [ 100 200 300 ] shove*\\nys leaves: [ 1 100 200 300 | 2 3 ]\\n```\") do |_, stack|\n elems = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.paste(elems)\nend\ntarget.at(\"eject\", \"( [ ... | F ... ]B ~> [ ... | ... ]B -- F ): drops and\\n leaves the Form after cursor in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.eject\n form.onto(stack)\nend\ntarget.at(\"inject\", \"( B F -- ): inserts Form to Block: adds Form to Block,\\n and moves cursor back again.\") do |_, stack|\n form = stack.drop\n block = stack.drop.a(Block)\n block.inject(form)\nend\ntarget.at(\"thru\", \"( [ ... | F ... ] -> [ ... F | ... ] -- F ): moves cursor\\n after Form, and leaves Form. Dies if cursor is at the end.\\n\\nNote: prefer `thru` to `eject` because `eject` modifies\\nthe block, and that may cause a tape copy which uses up\\na bit of memory and resources. The difference would matter\\nonly in high load scenarios, though.\\n\\nNote: anything that *does not* `ahead inject` will be OK\\nwith `ahead thru`. And even if it does `ahead inject`,\\nstill, there are ways to overcome the problems from not\\n`ahead eject`ing.\") do |_, stack|\n block = stack.drop.a(Block)\n block.thru.onto(stack)\nend\ntarget.at(\"thruBlock\", \"( B -- Bf / [ Vf ] ): similar to `thru` for Block. If\\n form after cursor is a Block form, it is left. If it is\\n a Value form, then it is enclosed in a new block whose\\n parent is Block.\") do |_, stack|\n block = stack.drop.a(Block)\n form = block.thru\n if form.is_a?(Block)\n form.onto(stack)\n else\n child = Block.new(block)\n child.add(form)\n child.onto(stack)\n end\nend\ntarget.at(\"top\", \"( [ ... F | ... ]B -- F ): leaves the top Form in Block.\") do |_, stack|\n block = stack.drop.a(Block)\n block.top.onto(stack)\nend\ntarget.at(\"mergeDicts\", \"( Rb Db -- ): copies entries from Donor block's dictionary\\n to Recipient block's dictionary. Donor entries override\\n same-named entries in Recipient. Donor entries starting\\n with one or more underscores are not imported.\\n\\n```\\n[ ] $: a\\na #x 100 pushes\\na #_private 'Fool!' pushes\\n[ ] $: b\\nb #y 200 pushes\\n\\na b 2echo\\n\\\"STDOUT: [ · ${x :: 100} ${_private :: 'Fool!'} ]⏎\\\"\\n\\\"STDOUT: [ · ${y :: 200} ]⏎\\\"\\n\\nb a mergeDicts\\nb echo\\n\\\"STDOUT: [ · ${y :: 200} ${x :: 100} ]⏎\\\"\\n```\") do |_, stack|\n donor = stack.drop.a(Block)\n recpt = stack.drop.a(Block)\n recpt.import!(from: donor)\nend\ntarget.at(\"sortUsing!\", \"( B Cb -- B ): leaves Block sorted inplace. Forms in Block\\n are compared using Comparator block.\\n\\nComparator block is opened with two forms on the stack; let's\\ncall them A and B. If Comparator block leaves a negative decimal\\n(conventionally `-1`), then `A < B`. If Comparator block leaves\\n`0`, then `A = B`. If Comparator block leaves a positive decimal\\n(conventionally `1`), then `A > B`.\\n\\nDies if Comparator block leaves any other (kind of) form.\\n\\nIgnores all forms but the topmost for Comparator block.\\n\\n\\n```\\n[ 3 2 1 ] [ - ] sortUsing! leaves: [ 1 2 3 ]\\n```\") do |_, stack|\n cmp = stack.drop.a(Block)\n block = stack.top.a(Block)\n block.sort_using! do |a, b|\n stack = Block.with(a, b)\n ((Engine.exhaust(Engine.current.capabilities, cmp, stack)).top.a(Decimal)).to_i\n end\nend\ntarget.at(\"getErrorDetails\", \"( Eo -- Dq ): leaves Details quote containing error details\\n of an Error object.\") do |_, stack|\n error = stack.drop.a(Error)\n (Quote.new(error.details)).onto(stack)\nend\ntarget.at(\"toQuote\", \"( F -- Qr ): leaves Quote representation of Form.\") do |_, stack|\n stack.drop.to_quote.onto(stack)\nend\ntarget.at(\"toByteslice\", \"( Q -- B ): leaves immutable Byteslice for Quote.\") do |_, stack|\n (stack.drop.a(Quote)).to_byteslice.onto(stack)\nend\ntarget.at(\"replaceAll\", \"( Sq Pq Q -- Rq ): replaces all instances of Pattern quote\\n in Source quote with Quote. Leaves the Resulting quote.\\n\\n```\\n'hello' 'l' 'y' replaceAll leaves: 'heyyo'\\n```\") do |_, stack|\n repl = stack.drop.a(Quote)\n pattern = stack.drop.a(Quote)\n quote = stack.drop.a(Quote)\n (quote.replace_all(pattern, repl)).onto(stack)\nend\ntarget.at(\"effect\", \"( F -- Eq ): leaves Effect quote for Form.\\n\\nIf Form is not a block nor a builtin, it is simply converted\\nto quote in the same way as `toQuote`.\\n\\nIf Form is a block or a builtin, an attempt is made at\\nextracting a stack effect expression from its comment.\\nIf the attempt fails, Form's description is left. If the\\nattempt was successful, the extracted stack effect quote\\nis added onto the stack as Effect quote.\\n\\n```\\n100 effect leaves: '100'\\ntrue effect leaves: 'true'\\n\\n[] effect leaves: 'a block'\\n[ \\\"Hello World\\\" ] effect leaves: 'a block'\\n[ \\\"( -- ) \\\"] effect leaves: '( -- )'\\n\\n#+ here effect leaves: '( A B -- S )' \\\"(yours may differ)\\\"\\n#map: here effect leaves: '( Lb B -- MLb )'\\n```\") do |_, stack|\n (Quote.new(stack.drop.effect)).onto(stack)\nend\ntarget.at(\"die\", \"( D/Eo -- ): dies with Details quote/Error object.\") do |engine, stack|\n form = stack.drop.a(Quote | Error)\n case form\n in Quote\n raise(engine.die(form.string))\n in Error\n raise(form)\n end\nend\ntarget.at(\"stitch\", \"( Q1 Q2 -- Q3 ): quote concatenation.\") do |_, stack|\n b = stack.drop.a(Quote)\n a = stack.drop.a(Quote)\n stack.add(a.stitch(b))\nend\ntarget.at(\"reparent\", \"( Cb Pb -- Cb ): changes the parent of Child block to Parent block.\\n Lookup cycles are allowed and handled gracefully.\") do |_, stack|\n parent = stack.drop.a(Block)\n child = stack.top.a(Block)\n child.parent = parent\nend\ntarget.at(\"befriend\", \"( B F -- ): adds Friend to Block's friend list.\\n\\nFriends are asked for word entries after parents, grandparents\\netc. have failed to retrieve them. This recurses, e.g. friends\\nask their own friends and so on, until the entry is found. Lookup\\ncycles are allowed and handled gracefully.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\nb a befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\nb.x echo\\n\\\"STDOUT: 100⏎\\\"\\n\\nb.y echo\\n\\\"STDOUT: 200⏎\\\"\\n\\na #x [ 'I\\\\'ve changed!' echo ] opens\\n\\na.x\\n\\\"STDOUT: I've changed!⏎\\\"\\nb.x\\n\\\"STDOUT: I've changed!⏎\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n block = stack.drop.a(Block)\n block.befriend(friend)\nend\ntarget.at(\"unfriend\", \"( B F -- ): removes Friend from Block's friend list. Does\\n nothing if Friend is not in the friend list. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na b unfriend\\na.x echo\\n\\\"STDOUT: 100⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n friend = stack.drop.a(Block)\n source = stack.drop.a(Block)\n source.unfriend(friend)\nend\ntarget.at(\"friends\", \"( B -- Fl ): leaves Friend list of Block. See `befriend`.\\n\\n```\\n[ 100 $: x this ] open $: a\\n[ 200 $: y this ] open $: b\\na b befriend\\na friends count echo\\n\\\"STDOUT: 1⏎\\\"\\na friends first b same? echo\\n\\\"STDOUT: true⏎\\\"\\na.y echo\\n\\\"STDOUT: 200⏎\\\"\\na friends [ drop ] hydrate\\na friends count echo\\n\\\"STDOUT: 0⏎\\\"\\na.y echo\\n\\\"Sorry: no value form found for 'y'.\\\"\\n```\") do |_, stack|\n source = stack.drop.a(Block)\n source.friends.onto(stack)\nend\ntarget.at(\"slurp\", \"( B Q -- B ): parses Quote and adds all forms from Quote\\n to Block.\") do |_, stack|\n source = stack.drop.a(Quote)\n block = stack.top.a(Block)\n block.slurp(source.string)\nend\ntarget.at(\"orphan\", \"( -- B ): creates and leaves a new orphan Block.\\n\\nOrphan blocks are blocks without a parent. Therefore, they do not\\nparticipate in any block hierarchy until they acquire some friends,\\nor a parent, and when (and whether) this should happen if for you —\\nnot Novika, as is usually the case — to decide.\\n\\n```\\n'Outer A' $: a\\n'Outer B' $: b\\n\\norphan $: x\\n\\n[ [ drop 'I die!' ] @: __died__ x.a ] do leaves: 'I die!'\\n[ [ drop 'I die too!' ] @: __died__ x.b ] do leaves: 'I die too!'\\n\\n\\\"Define `a` and `b` on the block itself. As you can see there\\n is no inheritance.\\\"\\nx extend: [\\n 100 $: a\\n 200 $: b\\n]\\n\\n\\\"Now `a` and `b` are looked up fine.\\\"\\nx.a leaves: 100\\nx.b leaves: 200\\n```\") do |_, stack|\n Block.new.onto(stack)\nend\ntarget.at(\"orphan?\", \"( B -- true/false ): leaves whether the given Block is an orphan\\n (see `orphan`).\\n\\n```\\norphan orphan? leaves: true\\n[ \\\"I'm not an orphan\\\" ] orphan? leaves: false\\n```\") do |_, stack|\n Boolean[!(stack.drop.a(Block)).parent?].onto(stack)\nend\ntarget.at(\"toOrphan\", \"( B -- B ): makes Block an orphan (destroys the link with\\n its parent).\\n\\n```\\n0 $: x\\n[ ] $: b\\nb . x echo\\n\\\"STDOUT: 0⏎\\\"\\n\\nb toOrphan leaves: [ [ ] ]\\n. x\\n\\\"Sorry: no value form found for 'x'\\\"\\\"\\n```\") do |_, stack|\n (stack.top.a(Block)).parent = nil\nend\ntarget.at(\"toTape\", \"( B -- Tb ): leaves Tape block for Block, i.e., the tape part\\n of Block. Useful for e.g. comparing two blocks only for tape\\n content, when Block may have dictionary entries.\\n\\nLookup hierarchy is destroyed: Tape block is an orphan.\\n\\n```\\n[ 1 2 3 ] $: a\\na #x 0 pushes\\na (a toTape) 2echo\\n\\\"STDOUT: [ 1 2 3 · ${x :: 0} ]⏎\\\"\\n\\\"STDOUT: [ 1 2 3 ]⏎\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_tape_block.onto(stack)\nend\ntarget.at(\"toDict\", \"( B -- Db ): leaves Dictionary block for Block, i.e., the dictionary\\n part of Block. Useful for e.g. comparing two blocks only for dictionary\\n content in case tape contents differ.\\n\\nLookup hierarchy is destroyed: Dictionary block is an orphan.\\n\\n```\\n[ ${ x y } this ] @: createPoint\\n\\n10 20 createPoint $: a\\n10 20 createPoint $: b\\n\\na b = leaves: false\\n\\n\\\"And not for the reason you might think of. Their TAPES are not\\n equal; `a` and `b` are not only objects, they are also pieces\\n of code that led to each one's creation (sort of).\\\"\\na toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\nb toQuote leaves: '[ ${ x y } this · ${x :: 10} ${y :: 20} ]'\\n\\n\\\"Let's strip the code using toDict:\\\"\\na toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\nb toDict leaves: '[ · ${x :: 10} ${y :: 20} ]'\\n = leaves: true \\\"< now they're equal\\\"\\n```\") do |_, stack|\n block = stack.drop.a(Block)\n block.to_dict_block.onto(stack)\nend\ntarget.at(\"desc\", \"( F -- Dq ): leaves the Description quote of the given Form.\\n\\n```\\n100 desc leaves: 'decimal number 100'\\n'foobar' desc leaves: 'quote \\\\\\\\'foobar\\\\\\\\''\\n[ 1 2 3 ] desc leaves: 'a block'\\n[ \\\"I am a block\\\" 1 2 3 ] desc leaves: 'I am a block'\\ntrue desc leaves: 'boolean true'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.desc)\n quote.onto(stack)\nend\ntarget.at(\"typedesc\", \"( F -- Dq ): leaves the type Description quote of the\\n given Form.\\n\\n```\\n100 typedesc leaves: 'decimal'\\n'foobar' typedesc leaves: 'quote'\\n[ 1 2 3 ] typedesc leaves: 'block'\\n[ \\\"I am a block\\\" 1 2 3 ] typedesc leaves: 'block'\\ntrue typedesc leaves: 'boolean'\\n```\") do |_, stack|\n quote = Quote.new(stack.drop.class.typedesc)\n quote.onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/FFI","path":"Novika/Capabilities/Impl/FFI.html","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"ffi\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words for working with foreign functions, structs, and unions\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/ffi.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"ffi:library?\", \"( F -- true/false ): leaves whether Form is a foreign\\n library form.\\n\\n```\\n'foo' ffi:getLibrary ffi:library? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Library)].onto(stack)\nend\ntarget.at(\"ffi:layout?\", \"( F -- true/false ): leaves whether Form is a foreign\\n layout form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:layout? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(StructLayoutForm)].onto(stack)\nend\ntarget.at(\"ffi:struct&?\", \"( F -- true/false ): leaves whether Form is a struct\\n reference view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint& ffi:struct&? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.reference?)].onto(stack)\nend\ntarget.at(\"ffi:struct~?\", \"( F -- true/false ): leaves whether Form is an inline\\n struct view form.\\n\\n```\\n[ x i32 y i32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct~ $: point~\\npoint~ ffi:struct~? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.inline?)].onto(stack)\nend\ntarget.at(\"ffi:union?\", \"( F -- true/false ): leaves whether Form is a union\\n view form.\\n\\n```\\n[ chr char ord u8 ] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxU\\nquuxU ffi:union? leaves: true\\n```\") do |_, stack|\n Boolean[(stack.drop.as?(StructViewForm)).try(&.union?)].onto(stack)\nend\ntarget.at(\"ffi:hole?\", \"( F -- true/false ): leaves whether Form is a hole.\\n\\n```\\n#i32 ffi:hole $: intHole\\n\\nintHole ffi:hole? leaves: true\\n```\") do |_, stack|\n Boolean[stack.drop.is_a?(Hole)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary?\", \"( I -- Lf true / false ): leaves Library form followed by true\\n if dynamic library with the given Id exists and was loaded &\\n retrieved successfully; otherwise, leaves false.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary? leaves: [ \\\"[foreign library]\\\" true ]\\n'random-nonexisting-library' ffi:getLibrary? leaves: false\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n library.onto(stack)\n end\n Boolean[!(!library)].onto(stack)\nend\ntarget.at(\"ffi:getLibrary\", \"( I -- Lf ): leaves Library form if dynamic library with the\\n given Id exists and was loaded & retrieved successfully;\\n otherwise, dies.\\n\\nOpening Library form allows one to expose functions from the\\nunderlying dynamic library (.so on Linux, .dll on Windows,\\n.dylib on Mac). See FFI documentation on GitHub Wiki for more\\ndetails and examples.\\n\\n```\\n'SDL2' ffi:getLibrary ffi:library? leaves: true\\n'random-nonexisting-library' ffi:getLibrary \\\"Dies: no such library\\\"\\n```\") do |engine, stack|\n id = stack.drop.a(Quote)\n if library = engine.capabilities.load_library?(id.string)\n else\n id.die(\"no such library\")\n end\n library.onto(stack)\nend\ntarget.at(\"ffi:createLayout\", \"( Lb -- Slf ): parses Layout block and leaves the resulting\\n Struct layout form.\\n\\nStruct layouts are a generalization over structs (heap-\\nallocated and stack-allocated) and unions. They literally\\ndescribe how structs (unions) are layed out in memory.\\n\\nLayout block consists of *name words followed by type words*.\\nSee the example below. A reference to another struct layout\\ncan be made in Layout block using the prefixes `&` (heap-\\nallocated struct, i.e., pointer to struct), `~` (inline or\\nstack-allocated struct), and `?` (stack-allocated union).\\n\\nInline struct cycles are forbidden. Union cycles are forbidden.\\nEither could be hidden behind a reference/pointer.\\n\\nLayout block is parsed lazily (on first use, e.g., by `toQuote`,\\n`allocateStruct` variants, `=`, etc.) Therefore, you can define\\nself-referential structs, mutually referential structs, and\\nreference layouts that are defined later.\\n\\nSee FFI documentation on GitHub Wiki for a list of available\\ntypes and the corresponding C types.\\n\\n```\\n[ x f32\\n y f32\\n] ffi:createLayout $: point\\n\\n[ datum ~point \\\"<- inline struct\\\"\\n next &pointNode \\\"<- struct reference\\\"\\n] ffi:createLayout $: pointNode\\n\\n[ asPoint &point\\n asPointNode ~pointNode\\n] ffi:createLayout $: pointNodeUnion\\n\\n[ type u8\\n value ?pointNodeUnion \\\"<- stack-allocated union\\\"\\n] ffi:createLayout $: pointNodeOrPoint\\n```\") do |engine, stack|\n decl = stack.drop.a(Block)\n this = engine.block\n names = [] of Word\n types = [] of Word\n cur, nxt = names, types\n decl.each do |form|\n if form.is_a?(Word)\n else\n form.die(\"only words (for field name and for field type) are allowed in struct layout declaration\")\n end\n cur << form\n cur, nxt = nxt, cur\n end\n if names.size == types.size\n else\n decl.die(\"malformed struct layout: missing field name or type\")\n end\n if names.empty?\n decl.die(\"struct layout must have at least one field\")\n end\n (StructLayoutForm.new(this, names, types, decl.prototype.comment?)).onto(stack)\nend\n{% for method, desc in {inline: {\"~\", :InlineStruct, \"Isv\", \"Inline struct\"}, reference: {\"&\", :StructReference, \"Srv\", \"Struct reference\"}} %}\n\n {% sign, cls, ann, qual = desc %}\n\n target.at(\"ffi:allocateStruct{{ sign.id }}\", <<-END\n ( Slf -- {{ ann.id }} ): allocates {{ qual.id }} view for the\n given Struct layout form. If the struct is no longer in\n use, it is freed by the GC automatically.\n\n This word is **unsafe**: the resulting {{ qual.id }} view is\n in an undefined state (may contain junk) before you (or the\n C code you pass it to) fills it with good values. Showing\n the struct view left by this word to clients may expose your\n program to a whole class of security vulnerabilities.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n point ffi:allocateStruct{{ sign.id }} $: point{{ sign.id }}\n point{{ sign.id }} #x 123 entry:submit\n point{{ sign.id }} #y 456 entry:submit\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=123_i32, y=456_i32⟩'\n ```\n END\n ) do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.{{ method.id }}.make!\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:buildStruct{{ sign.id }}\", <<-END\n ( Eb Slf -- {{ ann.id }} ): allocates and fills {{ qual.id }}\n view with entries by asking Entry block for them.\n\n If Entry block is missing an entry matching a field that\n Struct layout form declares, and that field is of type\n `pointer` or struct reference (`&`), `none` (C nullptr)\n is used as the value. Dies if Entry block is missing\n matching entry or entries for fields of other types.\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n\n \"Note: `this` has entries called `x` and `y`. `point` has\n fields called `x` and `y`. A match!\"\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = layout_form.layout\n view = layout.{{ method.id }}.make!\n layout.each_desc_with_index do |desc|\n entry = block.entry_for? Word.new(desc.id)\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n elsif desc.type.is_a?(Novika::FFI::UntypedPointer.class) || desc.type.is_a?(Novika::FFI::StructReferenceType)\n view[desc.id] = Novika::FFI::UntypedPointer.none\n else\n block.die(\n \"block is missing field '#{desc.id}'. Note that none (C nullptr) \\\n as default value is only supported for untyped pointers (`pointer`) \\\n and struct references (`&name`)\")\n end\n end\n StructViewForm.new(view).onto(stack)\n end\n\n target.at(\"ffi:asStruct{{ sign.id }}\", <<-END\n ( A Slf -- {{ ann.id }} ): creates and leaves {{ qual.id }} view\n for the given Address, according to Struct layout form.\n\n This word is **unsafe**: it does not check whether Address\n points at something that is layed out according to Struct\n layout form. Passing 0 (none aka null pointer) for Address\n will lead to segfault. Passing Address that is outside of\n your program's memory will lead to segfault. Passing Address\n that *is* in the bounds of your program's memory, but one\n not pointing at a struct in accordance with Struct layout\n form, will lead to undefined behavior (most likely junk\n values in {{ qual.id }} view).\n\n ```\n [ x i32 y i32 ] ffi:createLayout $: point\n\n 100 $: x\n 200 $: y\n this point ffi:buildStruct{{ sign.id }} $: point{{ sign.id }}\n\n point{{ sign.id }} ffi:addressof $: addr\n\n addr point ffi:asStruct{{ sign.id }} $: addrPoint{{ sign.id }}\n addrPoint{{ sign.id }}.x leaves: x\n addrPoint{{ sign.id }}.y leaves: y\n addrPoint{{ sign.id }} toQuote leaves: '{{ sign.id }}⟨x=100_i32, y=200_i32⟩'\n ```\n END\n ) do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::{{ cls.id }}View.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n StructViewForm.new(view).onto(stack)\n end\n {% end %}\ntarget.at(\"ffi:allocateUnion\", \"( Slf -- Uv ): allocates Union view for the given Struct\\n layout form.\\n\\nThis word is **unsafe**: the resulting Union view is in\\nan undefined (uninitialized) state (may be zeroed out,\\ncontain junk, or both) before you (or the C code you pass\\nit to) fills it with good values. Showing the uninitialized\\nunion to clients may expose your program to a whole class\\nof security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\nquux ffi:allocateUnion $: quuxUnion\\nquuxUnion #chr 'A' entry:submit\\nquuxUnion.ord leaves: 65\\n\\n\\\"Union toQuote avoids printing values, because that could\\n cause a segfault/overflow in some cases, and would mostly\\n output junk anyway.\\\"\\nquuxUnion toQuote leaves: '(⋃ ⟪chr=char, ord=u8⟫)'\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n view = form.layout.union.make!\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:buildUnion\", \"( Eb Slf -- Uv ): allocates and fills Union view with an\\n entry by asking Entry block for any *one* entry out of\\n those specified in Struct layout form, in the order they\\n are specified in Struct layout form. If the union is no\\n longer in use, it is freed by the GC automatically.\\n\\nEntry block must have at least one of the Struct layout\\nform's fields defined. Otherwise, this word dies.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n[ 'A' $: chr\\n this quux ffi:buildUnion\\n] val $: unionByChr\\n\\n[ 66 $: ord\\n this quux ffi:buildUnion\\n] val $: unionByOrd\\n\\n[ 'A' $: chr\\n 123 $: ord\\n this quux ffi:buildUnion\\n] val $: unionBoth\\n\\nunionByChr.ord leaves: 65\\nunionByOrd.chr leaves: 'B'\\n\\n\\\"'chr' is defined first, therefore, it is used rather\\n than 'ord'\\\"\\nunionBoth.chr leaves: 'A'\\nunionBoth.ord leaves: 65\\n```\") do |_, stack|\n form = stack.drop.a(StructLayoutForm)\n block = stack.drop.a(Block)\n layout = form.layout\n view = layout.union.make!\n had_entry = false\n layout.each_desc_with_index do |desc|\n entry = block.entry_for?(Word.new(desc.id))\n if entry\n entry_stack = Engine.exhaust(capabilities, entry)\n view[desc.id] = desc.type.from(entry_stack.top)\n had_entry = true\n break\n end\n end\n if had_entry\n else\n block.die(\"block must have one of the union's fields defined\")\n end\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:asUnion\", \"( A Slf -- Uv ): creates and leaves a Union view for the\\n given Address, according to Struct layout form.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is layed out according to Struct\\nlayout form. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing\\nAddress that *is* in the bounds of your program's memory,\\nbut one not pointing at a union in accordance with Struct\\nlayout form, will lead to undefined behavior (most likely\\njunk values in Union view). Showing ill-formed results of\\nthis word to clients may expose your program to a whole\\nclass of security vulnerabilities.\\n\\n```\\n[ chr char\\n ord u8\\n] ffi:createLayout $: quux\\n\\n'A' $: chr\\n\\nthis quux ffi:buildUnion $: quuxUnion\\n\\nquuxUnion ffi:addressof $: addr\\n\\naddr quux ffi:asUnion $: addrUnion\\naddrUnion.chr leaves: 'A'\\naddrUnion.ord leaves: 65\\n```\") do |_, stack|\n layout_form = stack.drop.a(StructLayoutForm)\n pointer = stack.drop.a(Decimal)\n view = Novika::FFI::UnionView.new(layout_form.layout, Pointer(Void).new(pointer.to_u64))\n (StructViewForm.new(view)).onto(stack)\nend\ntarget.at(\"ffi:hole\", \"( T/Oh -- H ): allocates garbage-collected memory for Hole\\n that will hold a value of the given Type. If Other hole\\n is passed, wraps that Other hole instead (this could be\\n useful in C situations like `int**`)\\n\\nHoles are (just a bit) safer way of letting C write to a\\nmemory location. You first create the hole, then pass it\\nto C, then read from the hole by opening it.\\n\\nNote: this word is **unsafe**: since we cannot check whether\\nthe hole was written to, reading from hole (opening it) before\\nwriting to it will result in undefined behavior.\\n\\n```\\n\\\"\\\"\\\"\\nvoid outputCInt(int* x)\\n{\\n *x = 123;\\n}\\n\\\"\\\"\\\"\\n\\n#i32 ffi:hole $: intBox\\n\\nintBox outputCInt\\nintBox open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word | Hole)\n type = case typename\n in Hole\n Novika::FFI::UntypedPointer.new(typename.address)\n in Word\n (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n end\n (Hole.new(type)).onto(stack)\nend\ntarget.at(\"ffi:box\", \"( F T -- A ): allocates garbage-collected memory for Type, and\\n writes Form there. Form must be of (or convertible to) Type;\\n otherwise, this word dies. Leaves Address of the beginning of\\n the allocated memory.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n pointer = (type.from(form)).box\n (Decimal.new(pointer.address)).onto(stack)\nend\ntarget.at(\"ffi:unbox\", \"( A T -- F ): interprets whatever Address points at as a\\n value of the given Type, and leaves the matching Form.\\n Inverse of `ffi:box`.\\n\\nThis word is **unsafe**: it does not check whether Address\\npoints at something that is of the given Type. Passing 0\\n(none aka null pointer) for Address will lead to segfault.\\nPassing Address that points outside of your program's memory\\nwill lead to segfault. Passing Address that *is* in the bounds\\nof your program's memory, but one not pointing at a value of\\nthe given Type, will lead to undefined behavior (most likely\\njunk value of Form). Showing ill-formed results of this word to\\nclients, or letting clients control Address or Type, may expose\\nyour program to a whole class of security vulnerabilities.\\n\\n```\\n123 #i32 ffi:box $: ptr\\nptr #i32 ffi:unbox leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n base = Pointer(Void).new(address.to_u64)\n form = (type.unbox(base)).to_form?.not_nil!\n form.onto(stack)\nend\ntarget.at(\"ffi:unsafeWrite\", \"( A F T -- ): interprets Form as that of the given Type,\\n and writes it at Address.\\n\\nThis word is **unsafe**: it does not check whether Address\\ncan be written to, whether there is enough memory to fully\\nwrite Form, etc. Passing 0 (none aka null pointer) for Address\\nwill lead to segfault. Passing Address that points outside\\nof your program's memory will lead to segfault. Passing Address\\nthat *is* in the bounds of your program's memory and can\\nbe written to may lead to undefined behavior.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n form = stack.drop\n address = stack.drop.a(Decimal)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n value = type.from(form)\n base = Pointer(Void).new(address.to_u64)\n value.write_to!(base)\nend\ntarget.at(\"ffi:viewLayout\", \"( Svf -- Slf ): leaves Struct layout form for the given\\n Struct view form (an inline struct view, struct reference\\n view, or union view).\\n\\n```\\n[ x f32 y f32 ] ffi:createLayout $: point\\n\\npoint ffi:allocateStruct& $: point&\\npoint ffi:allocateStruct~ $: point~\\npoint ffi:allocateUnion $: pointU\\n\\npoint& ffi:viewLayout leaves: point\\npoint~ ffi:viewLayout leaves: point\\npointU ffi:viewLayout leaves: point\\n```\") do |_, stack|\n view = stack.drop.a(StructViewForm)\n view.layout.onto(stack)\nend\ntarget.at(\"ffi:sizeof\", \"( T -- B ): leaves the size of Type, in Bytes.\\n\\n```\\n#u8 ffi:sizeof leaves: 1\\n#u16 ffi:sizeof leaves: 2\\n#u32 ffi:sizeof leaves: 4\\n#u64 ffi:sizeof leaves: 8\\n```\") do |engine, stack|\n typename = stack.drop.a(Word)\n type = (Novika::FFI::ValueTypeParser.new(engine.block, typename)).parse\n (Decimal.new(type.sizeof)).onto(stack)\nend\ntarget.at(\"ffi:addressof\", \"( Svf/H -- A ): leaves Address of the given Struct view form\\n (an inline struct view, struct reference view, or union view),\\n or Hole in memory.\\n\\n```\\n#i32 ffi:hole $: myHole\\nmyHole ffi:addressof $: holeAddr\\nholeAddr 123 #i32 ffi:unsafeWrite\\nmyHole open leaves: 123\\n```\") do |_, stack|\n form = stack.drop.a(Hole | StructViewForm)\n (Decimal.new(form.address)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Frontend","path":"Novika/Capabilities/Impl/Frontend.html","kind":"class","full_name":"Novika::Capabilities::Impl::Frontend","name":"Frontend","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"capabilities(engine):Block-instance-method","name":"capabilities","doc":"Returns a list block of capabilities provided by the frontend.","summary":"Returns a list block of capabilities provided by the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Block","args_html":"(engine) : Block","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":7,"url":null},"def":{"name":"capabilities","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Block","visibility":"Public","body":"list = Block.new\ncapabilities.enabled.each do |klass|\n list.add(Quote.new(klass.id))\nend\nlist\n"}},{"html_id":"version(engine):Quote-instance-method","name":"version","doc":"Returns version of the frontend.","summary":"Returns version of the frontend.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Quote","args_html":"(engine) : Quote","location":{"filename":"src/novika/capabilities/impl/frontend.cr","line_number":3,"url":null},"def":{"name":"version","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Quote","visibility":"Public","body":"Quote.new(Novika::VERSION)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Ink","path":"Novika/Capabilities/Impl/Ink.html","kind":"class","full_name":"Novika::Capabilities::Impl::Ink","name":"Ink","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},"ancestors":[{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/ink.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"COMPAT","name":"COMPAT","value":"{Color.rgb(0, 0, 0) => :black, Color.rgb(128, 0, 0) => :red, Color.rgb(0, 128, 0) => :green, Color.rgb(128, 128, 0) => :yellow, Color.rgb(0, 0, 128) => :blue, Color.rgb(128, 0, 128) => :magenta, Color.rgb(0, 128, 128) => :cyan, Color.rgb(192, 192, 192) => :light_gray, Color.rgb(128, 128, 128) => :dark_gray, Color.rgb(255, 0, 0) => :light_red, Color.rgb(0, 255, 0) => :light_green, Color.rgb(255, 255, 0) => :light_yellow, Color.rgb(0, 0, 255) => :light_blue, Color.rgb(255, 0, 255) => :light_magenta, Color.rgb(0, 255, 255) => :light_cyan, Color.rgb(255, 255, 255) => :white}"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"with_color_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_color_append_echo","doc":"Appends *form* with *fg* foreground color (if any) and\n*bg* background color (if any) to the standard output\nstream. One of *fg*, *bg* is guaranteed to be non-nil.","summary":"Appends form with fg foreground color (if any) and bg background color (if any) to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","args_html":"(engine, fg : Color | Nil, bg : Color | Nil, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":42,"url":null},"def":{"name":"with_color_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"fg","external_name":"fg","restriction":"Color | ::Nil"},{"name":"bg","external_name":"bg","restriction":"Color | ::Nil"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"string = form.to_quote.string\ncolorful = string.colorize\nif fg\n colorful = colorful.fore(COMPAT[fg.closest(COMPAT.keys)])\nend\nif bg\n colorful = colorful.back(COMPAT[bg.closest(COMPAT.keys)])\nend\nappend_echo(engine, colorful)\n"}},{"html_id":"with_emphasis_append_echo(engine,fg:Color|Nil,bg:Color|Nil,form:Form)-instance-method","name":"with_emphasis_append_echo","doc":"Same as `with_color_append_echo`, but also emphasizes\necho of *form*. Bold style is used by default, but\nimplementors may choose e.g. italic.","summary":"Same as #with_color_append_echo
, but also emphasizes echo of form.
Appends form with inverse style (background color is set to foreground color, and vice versa).
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/ink.cr","line_number":38,"url":null},"def":{"name":"with_reverse_append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"append_echo(engine, form.to_quote.string.colorize.reverse)"}}]},{"html_id":"novika/Novika/Capabilities/Impl/Nki","path":"Novika/Capabilities/Impl/Nki.html","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/nki.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":5,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"nki\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":13,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes words to capture, read, and manipulate Novika images\""}}],"instance_methods":[{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/impl/nki.cr","line_number":17,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"nki:toBlock\", \"( Bf -- B ): leaves Block for the given Byteslice form,\\n assumed to contain a well-formed Novika image created\\n with `nki:captureAll`, `nki:captureNeighborhood`, or\\n otherwise. Dies if Byteslice form is an invalid Novika\\n image, or isn't a Novika image.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n bytes = stack.drop.a(Byteslice)\n begin\n image = bytes.to_io.read_bytes(Image)\n rescue error : BinData::ReadingVerificationException\n bytes.die(\"apparently, this byteslice is not a Novika image\")\n end\n (image.to_block(engine.capabilities)).onto(stack)\nend\ntarget.at(\"nki:captureAll\", \"( B -- Bf ): thoroughly, recursively captures entire\\n hierarchy of Block (its parents, prototype, friends,\\n tape, and dictionary), and leaves the resulting Novika\\n image as a Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nIf you're a visual type of person, imagine this word and\\nall related facilities as a kind of \\\"mold\\\", which carefully,\\nin an ordered fashion \\\"fills up\\\" a maze, until all paths\\nwere explored and all exits found.\\n\\nFor code example, see `nki:captureNeighborhood`.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhood\", \"( B -- Bf ): like `nki:captureAll`, but rather than\\n capturing all reachable blocks, captures only Block's\\n neighborhood. Leaves the resulting Byteslice form.\\n\\nArchives image payload using Gzip, fast.\\n\\nWe store each block in Block's tape and dictionary in\\na list, then ask that block to do the same. When recursion\\nfinishes, the resulting list is called *block neighborhood*.\\n\\nParent, friends, and prototype of the given block are\\nreconstructed *if and only if they are in the block\\nneighborhood*.\\n\\n```\\n[ 1 2 3 ] nki:captureNeighborhood $: imgN\\n\\nimgN toQuote leaves: '[byteslice, consists of 111 byte(s)]' \\\"yours may differ!\\\"\\nimgN nki:toBlock leaves: [ [ 1 2 3 ] ]\\n\\n\\\"As opposed to nki:captureAll, which will capture EVERYTHING\\n it can reach:\\\"\\n[ 1 2 3 ] nki:captureAll $: imgA\\n\\nimgA toQuote leaves: '[byteslice, consists of 38298 byte(s)]' \\\"yours may differ!\\\"\\n\\n\\\"Note: [ 1 2 3 ] lives in a parallel universe now, with\\n its own friends, prototypes, toplevel block, and so on!\\n It doesn't have any links whatsoever to the whoever-it-was\\n that called nki:captureAll!\\\"\\nimgA nki:toBlock leaves: [ [ 1 2 3 ] ]\\n```\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllRaw\", \"( B -- Bf ): same as `nki:captureAll`, but does not archive\\n image payload obtained from capturing Block. May yield very\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodRaw\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but does not\\n archive image payload obtained from capturing Block. May yield\\n large Byteslice forms.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::None, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllGzipBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodGzipBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Gzip, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::GzipBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliFast\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliFast\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, fast.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliFast, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureAllBrotliBest\", \"( B -- Bf ): same as `nki:captureAll`, but archives image payload\\n obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureAll)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\ntarget.at(\"nki:captureNeighborhoodBrotliBest\", \"( B -- Bf ): same as `nki:captureNeighborhood`, but archives image\\n payload obtained from capturing Block using Brotli, best.\") do |engine, stack|\n block = stack.drop.a(Block)\n image = Image.new(block, engine.capabilities, compression: Image::CompressionType::BrotliBest, mode: CaptureMode::CaptureNeighborhood)\n Byteslice.new(&.write_bytes(image)).onto(stack)\nend\n"}}]},{"html_id":"novika/Novika/Capabilities/Impl/System","path":"Novika/Capabilities/Impl/System.html","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System","abstract":false,"superclass":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"ancestors":[{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/impl/system.cr","line_number":100,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Capabilities/Impl","kind":"module","full_name":"Novika::Capabilities::Impl","name":"Impl"},"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":101,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"print(form.to_quote.string)"}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":130,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":"exit(code.to_i)"}},{"html_id":"monotonic(engine):Decimal-instance-method","name":"monotonic","doc":"Returns a reading from the monotonic clock, in milliseconds.","summary":"Returns a reading from the monotonic clock, in milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":122,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(Time.monotonic.total_milliseconds)"}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":126,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":"sleep(millis.to_i.milliseconds)"}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":111,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":"string = prompt.to_quote.string\nprint(string)\nanswer = gets\n{answer ? Quote.new(answer) : nil, Boolean[!(!answer)]}\n"}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/impl/system.cr","line_number":118,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":"error.report(STDERR)"}}]}]},{"html_id":"novika/Novika/Capabilities/ISystem","path":"Novika/Capabilities/ISystem.html","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"},{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":2,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Capability","kind":"module","full_name":"Novika::Capability","name":"Capability"},{"html_id":"novika/Novika/ICapability","kind":"module","full_name":"Novika::ICapability","name":"ICapability"}],"extended_modules":[{"html_id":"novika/Novika/ICapabilityClass","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass"}],"subclasses":[{"html_id":"novika/Novika/Capabilities/Impl/System","kind":"class","full_name":"Novika::Capabilities::Impl::System","name":"System"}],"namespace":{"html_id":"novika/Novika/Capabilities","kind":"module","full_name":"Novika::Capabilities","name":"Capabilities"},"class_methods":[{"html_id":"id:String-class-method","name":"id","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":77,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"\"system\""}},{"html_id":"on_by_default?:Bool-class-method","name":"on_by_default?","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":85,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"purpose:String-class-method","name":"purpose","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":81,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":"\"exposes all sorts of OS-related vocabulary, such as 'echo' and 'nap'\""}}],"instance_methods":[{"html_id":"append_echo(engine,form:Form)-instance-method","name":"append_echo","doc":"Enquotes and appends *form* to the standard output stream.","summary":"Enquotes and appends form to the standard output stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine, form : Form)","args_html":"(engine, form : Form)","location":{"filename":"src/novika/capabilities/system.cr","line_number":90,"url":null},"def":{"name":"append_echo","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"bye(engine,code:Decimal)-instance-method","name":"bye","doc":"Ends the program with the given exit *code*.","summary":"Ends the program with the given exit code.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"args_string":"(engine, code : Decimal)","args_html":"(engine, code : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":114,"url":null},"def":{"name":"bye","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"code","external_name":"code","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":false,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capabilities/system.cr","line_number":116,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":"target.at(\"appendEcho\", \"( F -- ): enquotes and appends Form to the standard\\n output stream.\") do |engine, stack|\n append_echo(engine, stack.drop)\nend\ntarget.at(\"readLine\", \"( Pf -- Aq true / false ): enquotes and prints Prompt\\n form to the standard output stream. Waits for the user\\n to answer, enquotes the answer and leaves it.\\n\\nIf user answered the prompt, leaves Answer quote followed\\nby boolean true. Otherwise, leaves boolean false.\\n\\n```\\n'What is your name? ' readLine => echo\\n\\n\\\"INPUT: What is your name? John Doe⏎\\\"\\n\\\"STDOUT: John Doe⏎\\\"\\n\\n\\\"INPUT: What is your name?Returns a reading from the monotonic clock, in milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : Decimal","args_html":"(engine) : Decimal","location":{"filename":"src/novika/capabilities/system.cr","line_number":111,"url":null},"def":{"name":"monotonic","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"Decimal","visibility":"Public","body":""}},{"html_id":"nap(engine,millis:Decimal)-instance-method","name":"nap","doc":"Sleeps for the given amount of *millis*econds.","summary":"Sleeps for the given amount of milliseconds.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"args_string":"(engine, millis : Decimal)","args_html":"(engine, millis : Decimal)","location":{"filename":"src/novika/capabilities/system.cr","line_number":108,"url":null},"def":{"name":"nap","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"millis","external_name":"millis","restriction":"Decimal"}],"visibility":"Public","body":""}},{"html_id":"readline(engine,prompt:Form):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline","doc":"Enquotes and prints *prompt* to STDOUT. Waits for the\nuser to answer, enquotes the answer (if any) and returns\nit together with a status boolean.\n\nIf the user answered with EOF (e.g. CTRL-D), status bool\nis false and answer quote is nil. Else, answer quote\ncontains the answer and status bool is true.","summary":"Enquotes and prints prompt to STDOUT.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"args_string":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","args_html":"(engine, prompt : Form) : Tuple(Quote | Nil, Boolean)","location":{"filename":"src/novika/capabilities/system.cr","line_number":99,"url":null},"def":{"name":"readline","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"prompt","external_name":"prompt","restriction":"Form"}],"return_type":"::Tuple(Quote | ::Nil, Boolean)","visibility":"Public","body":""}},{"html_id":"readline_star(engine,config:PromptConfig):Tuple(Quote|Nil,Boolean)-instance-method","name":"readline_star","doc":"Extended (contextful) version of `readline`.","summary":"Extended (contextful) version of #readline
.
Reports abound an error to the standard error stream.
","abstract":true,"args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"args_string":"(engine, error : Error)","args_html":"(engine, error : Error)","location":{"filename":"src/novika/capabilities/system.cr","line_number":105,"url":null},"def":{"name":"report_error","args":[{"name":"engine","external_name":"engine","restriction":""},{"name":"error","external_name":"error","restriction":"Error"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Capabilities/ISystem/PromptConfig","path":"Novika/Capabilities/ISystem/PromptConfig.html","kind":"struct","full_name":"Novika::Capabilities::ISystem::PromptConfig","name":"PromptConfig","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capabilities/system.cr","line_number":6,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DELIMITERS","name":"DELIMITERS","value":"Word.new(\"delimiters\")"},{"id":"HISTORY","name":"HISTORY","value":"Word.new(\"history\")"},{"id":"MORE","name":"MORE","value":"Word.new(\"more?\")"},{"id":"PROMPT","name":"PROMPT","value":"Word.new(\"prompt\")"},{"id":"SUGGEST","name":"SUGGEST","value":"Word.new(\"suggest\")"}],"namespace":{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"},"doc":"A thin wrapper around the prompt configuration block of `readLine*`.","summary":"A thin wrapper around the prompt configuration block of readLine*
.
Returns word delimiter quote, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":23,"url":null},"def":{"name":"delimiters?","return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(DELIMITERS)\nelse\n return\nend\n(Engine.exhaust(Engine.current.capabilities, entry)).top.a(Quote)\n"}},{"html_id":"history_entry?:Entry|Nil-instance-method","name":"history_entry?","doc":"Returns the history entry in the carrier block, if any.","summary":"Returns the history entry in the carrier block, if any.
","abstract":false,"location":{"filename":"src/novika/capabilities/system.cr","line_number":17,"url":null},"def":{"name":"history_entry?","return_type":"Entry | ::Nil","visibility":"Public","body":"@carrier.entry_for?(HISTORY)"}},{"html_id":"more?(expression:String):Form|Nil-instance-method","name":"more?","doc":"Returns `false` or nil if no more input is expected after\n*expression*, otherwise, returns some form that the user\nassigned \"more\" to or that they left on top of the stack\n(interpreted as `true`).","summary":"Returns false
or nil if no more input is expected after expression, otherwise, returns some form that the user assigned "more" to or that they left on top of the stack (interpreted as true
).
Returns the prompt quote for the given line_number, or nil if no prompt should be used.
","abstract":false,"args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"args_string":"(line_number : Int32) : Quote | Nil","args_html":"(line_number : Int32) : Quote | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":43,"url":null},"def":{"name":"prompt?","args":[{"name":"line_number","external_name":"line_number","restriction":"Int32"}],"return_type":"Quote | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(PROMPT)\nelse\n return\nend\nstack = Block.with(Decimal.new(line_number))\nform = (Engine.exhaust(Engine.current.capabilities, entry, stack)).top\nform.to_quote\n"}},{"html_id":"suggest?(word:String,prior:String):Tuple(Quote,Block)|Nil-instance-method","name":"suggest?","doc":"Returns the title quote followed by suggestions block for\nthe given *word* and input *prior* to *word*.","summary":"Returns the title quote followed by suggestions block for the given word and input prior to word.
","abstract":false,"args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"args_string":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","args_html":"(word : String, prior : String) : Tuple(Quote, Block) | Nil","location":{"filename":"src/novika/capabilities/system.cr","line_number":54,"url":null},"def":{"name":"suggest?","args":[{"name":"word","external_name":"word","restriction":"String"},{"name":"prior","external_name":"prior","restriction":"String"}],"return_type":"::Tuple(Quote, Block) | ::Nil","visibility":"Public","body":"if entry = @carrier.entry_for?(SUGGEST)\nelse\n return\nend\nif entry.opener?\n stack = Block.with(Quote.new(prior), Quote.new(word))\n block = Engine.exhaust(Engine.current.capabilities, entry, stack)\nelse\n block = entry.form.a(Block)\n if block.count == 2\n else\n block.die(\"expected block of the form [ title:quote [ ...suggestion:quote ] ]\")\n end\nend\ntitle, suggestions = block.at(block.count - 2), block.at(block.count - 1)\n{title.a(Quote), suggestions.a(Block)}\n"}}]}]}]},{"html_id":"novika/Novika/Capability","path":"Novika/Capability.html","kind":"module","full_name":"Novika::Capability","name":"Capability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":31,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Merges instance-side and class-side interfaces to a Novika\ncapability. Automatically includes `ICapabilityClass` and\n`ICapability` for you.","summary":"Merges instance-side and class-side interfaces to a Novika capability.
"},{"html_id":"novika/Novika/CapabilityCollection","path":"Novika/CapabilityCollection.html","kind":"class","full_name":"Novika::CapabilityCollection","name":"CapabilityCollection","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/capability.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A collection of language capability implementations.\n\nCapability implementations can indirectly (by id) interact\nwith each other by sharing the capability collection they're\nmembers of.\n\n```\n# (!) Compile with -Dnovika_console\n\ncaps = CapabilityCollection.new\n\n# Add capability classes:\ncaps << Capabilities::Impl::Essential\ncaps << Capabilities::Impl::System\ncaps << Capabilities::Impl::Console\n\n# Enable capabilities. At this point you kinda don't know\n# which implementation is used under the hood, so you\n# need to refer to the capability by its id.\ncaps.enable(\"essential\")\ncaps.enable(\"system\")\ncaps.enable(\"console\")\n\nblock = Block.new(caps.block)\nblock.slurp(\"console:on 1000 nap console:off\")\n\nEngine.exhaust(block, caps)\n```","summary":"A collection of language capability implementations.
","class_methods":[{"html_id":"available:Array(ICapabilityClass)-class-method","name":"available","doc":"Lists *all* available (registered) capability classes.\n\nFor a capability class to be registered (available), it\nshould be the last subclass of a `Capability` includer\n(subclass depth is irrelevant), or have no subclasses\nand directly include `Capability`.","summary":"Lists all available (registered) capability classes.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":282,"url":null},"def":{"name":"available","return_type":"Array(ICapabilityClass)","visibility":"Public","body":"{% if true %}\n [{% for capability in Capability.includers %}\n {% subclasses = capability.all_subclasses %}\n {% if (!capability.abstract?) && subclasses.empty? %}\n {{ capability }},\n {% else %}{% if subclass = subclasses.reject(&.abstract?).last %}\n {{ subclass }},\n {% end %}{% end %}\n {% end %}] of ICapabilityClass\n {% end %}"}},{"html_id":"with_available-class-method","name":"with_available","doc":"Creates a capability collection, and adds *all* available\ncapabilities (see `CapabilityCollection.available`). Does\nnot enable any of them.\n\nReturns the resulting capability collection.","summary":"Creates a capability collection, and adds all available capabilities (see CapabilityCollection.available
).
Creates a capability collection, and adds capabilities that are on by default.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":256,"url":null},"def":{"name":"with_default","visibility":"Public","body":"caps = CapabilityCollection.new\navailable.each do |cap|\n if cap.on_by_default?\n else\n next\n end\n caps << cap\nend\ncaps\n"}}],"constructors":[{"html_id":"new(parent:Block|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"args_string":"(parent : Block | Nil = nil)","args_html":"(parent : Block | Nil = nil)","location":{"filename":"src/novika/capability.cr","line_number":72,"url":null},"def":{"name":"new","args":[{"name":"parent","default_value":"nil","external_name":"parent","restriction":"Block | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(parent)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<<(cls:ICapabilityClass)-instance-method","name":"<<","doc":"Adds a capability class *cls* to this collection.","summary":"Adds a capability class cls to this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"args_string":"(cls : ICapabilityClass)","args_html":"(cls : ICapabilityClass)","location":{"filename":"src/novika/capability.cr","line_number":217,"url":null},"def":{"name":"<<","args":[{"name":"cls","external_name":"cls","restriction":"ICapabilityClass"}],"visibility":"Public","body":"@classes[cls.id] = cls"}},{"html_id":"<<(library:Library)-instance-method","name":"<<","doc":"Adds a *library* to this collection. Overwrites any previous\nlibrary with the same id.","summary":"Adds a library to this collection.
","abstract":false,"args":[{"name":"library","external_name":"library","restriction":"Library"}],"args_string":"(library : Library)","args_html":"(library : Library)","location":{"filename":"src/novika/capability.cr","line_number":223,"url":null},"def":{"name":"<<","args":[{"name":"library","external_name":"library","restriction":"Library"}],"visibility":"Public","body":"@libraries[library.id] = library"}},{"html_id":"[]?(cls:T.class):T|NilforallT-instance-method","name":"[]?","doc":"Returns the instance of the given capability class *cls*,\nif such instance can be found in this collection. Otherwise,\nreturns nil.","summary":"Returns the instance of the given capability class cls, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class) : T | Nil forall T","args_html":"(cls : T.class) : T | Nil forall T","location":{"filename":"src/novika/capability.cr","line_number":154,"url":null},"def":{"name":"[]?","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"return_type":"T | ::Nil","visibility":"Public","body":"@objects[cls.id]?.try do |__arg1|\n __arg1.as(T)\nend"}},{"html_id":"block:Block-instance-method","name":"block","doc":"Returns the *capability block*: a block managed by this\ncollection, which includes the vocabulary injected by\nthe enabled capabilities.","summary":"Returns the capability block: a block managed by this collection, which includes the vocabulary injected by the enabled capabilities.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":70,"url":null},"def":{"name":"block","return_type":"Block","visibility":"Public","body":"@block"}},{"html_id":"copy:CapabilityCollection-instance-method","name":"copy","doc":"Copies this capability collection.\n\n* This collection shares library load callbacks (themselves,\n *not* the list of them) with the returned collection.\n\n* This collection shares FFI `Library` instances with the\n returned one, by reference.\n\n* This collection shares capability block parent (see `new`)\n with the returned one, by reference.\n\nEverything else is copied or created anew.","summary":"Copies this capability collection.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":239,"url":null},"def":{"name":"copy","return_type":"CapabilityCollection","visibility":"Public","body":"copy = CapabilityCollection.new\n@classes.each_value do |cls|\n copy << cls\nend\n@objects.each_key do |id|\n copy.enable(id)\nend\n@libraries.each_value do |library|\n copy << library\nend\n@load_library_callbacks.each do |callback|\n copy.on_load_library?(callback)\nend\ncopy\n"}},{"html_id":"enable(id:String):Bool-instance-method","name":"enable","doc":"Enables a capability with the given *id*.\n\nTo enable a capability means to create an instance of the\ncorresponding implementation class, and use that instance\nto inject the capability vocabulary into this collection's\n*capabilities block*, `block`. You can then access `block`\nand e.g. inherit from it to access the vocabulary of the\nenabled capabilities.\n\nDoes nothing if the capability is already enabled.\nDoes nothing if there is no capability with the given id.\n\nReturns whether there is a capability with the given *id*.","summary":"Enables a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Bool","args_html":"(id : String) : Bool","location":{"filename":"src/novika/capability.cr","line_number":116,"url":null},"def":{"name":"enable","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"if @objects.has_key?(id)\n return true\nend\nif cap = get_capability_class?(id)\nelse\n return false\nend\nobject = cap.new(self)\nobject.inject(block)\n@objects[id] = object\ntrue\n"}},{"html_id":"enable_all-instance-method","name":"enable_all","doc":"Enables all capabilities unconditionally.\n\nReturns self.","summary":"Enables all capabilities unconditionally.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":145,"url":null},"def":{"name":"enable_all","visibility":"Public","body":"@classes.each_key do |k|\n enable(k)\nend\nself\n"}},{"html_id":"enable_default-instance-method","name":"enable_default","doc":"Enables all capabilities that respond with true when sent\n`ICapabilityClass#on_by_default?`.\n\nFor capabilities that respond with false, you'll need to\ntarget them explicitly with `enable(id)`, or use `enable_all`\ninstead of `enable_default`.\n\nReturns self.","summary":"Enables all capabilities that respond with true when sent ICapabilityClass#on_by_default?
.
Returns an array of capabilities that are enabled in this collection at the moment.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":81,"url":null},"def":{"name":"enabled","visibility":"Public","body":"@objects.values.map(&.class)"}},{"html_id":"fetch(cls:T.class,&:T->U):U|NilforallT,U-instance-method","name":"fetch","doc":"Yields the capability instance of the given capability\nclass *cls* to the block, if such instance can be found\nin this collection.\n\nReturns the result of the block, or nil.","summary":"Yields the capability instance of the given capability class cls to the block, if such instance can be found in this collection.
","abstract":false,"args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"args_string":"(cls : T.class, & : T -> U) : U | Nil forall T, U","args_html":"(cls : T.class, & : T -> U) : U | Nil forall T, U","location":{"filename":"src/novika/capability.cr","line_number":210,"url":null},"def":{"name":"fetch","args":[{"name":"cls","external_name":"cls","restriction":"T.class"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> U)"},"return_type":"U | ::Nil","visibility":"Public","body":"if impl = self[cls]?\n yield impl\nend"}},{"html_id":"get_capability_class?(id:String)-instance-method","name":"get_capability_class?","doc":"Returns the capability class with the given *id*. Returns nil\nif there is no such capability class in this collection.","summary":"Returns the capability class with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":166,"url":null},"def":{"name":"get_capability_class?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes[id]?"}},{"html_id":"get_library?(id:String)-instance-method","name":"get_library?","doc":"Returns the library with the given *id*. Returns nil if there\nis no such library in this collection.","summary":"Returns the library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":160,"url":null},"def":{"name":"get_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries[id]?"}},{"html_id":"has_capability?(id:String)-instance-method","name":"has_capability?","doc":"Returns whether this collection includes a capability with\nthe given *id*.","summary":"Returns whether this collection includes a capability with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":93,"url":null},"def":{"name":"has_capability?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@classes.has_key?(id)"}},{"html_id":"has_capability_enabled?(id:String)-instance-method","name":"has_capability_enabled?","doc":"Returns whether this collection has the capability with\nthe given *id* enabled.","summary":"Returns whether this collection has the capability with the given id enabled.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":87,"url":null},"def":{"name":"has_capability_enabled?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@objects.has_key?(id)"}},{"html_id":"has_library?(id:String)-instance-method","name":"has_library?","doc":"Returns whether this collection includes a library with\nthe given *id*.","summary":"Returns whether this collection includes a library with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/capability.cr","line_number":99,"url":null},"def":{"name":"has_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@libraries.has_key?(id)"}},{"html_id":"load_library?(id:String):Library|Nil-instance-method","name":"load_library?","doc":"Tries to load a library (aka shared object) with the given\n*id*. Returns the resulting `Library` object, or nil.\n\nThe library object is cached: further calls to `load_library?`\nand `get_library?` will return that library object.","summary":"Tries to load a library (aka shared object) with the given id.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String) : Library | Nil","args_html":"(id : String) : Library | Nil","location":{"filename":"src/novika/capability.cr","line_number":195,"url":null},"def":{"name":"load_library?","args":[{"name":"id","external_name":"id","restriction":"String"}],"return_type":"Library | ::Nil","visibility":"Public","body":"@libraries.fetch(id) do\n @load_library_callbacks.each do |callback|\n if library = callback.call(id)\n return @libraries[id] = library\n end\n end\nend"}},{"html_id":"on_load_library?(callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"args_string":"(callback : String -> Library | Nil)","args_html":"(callback : String -> Library | Nil)","location":{"filename":"src/novika/capability.cr","line_number":181,"url":null},"def":{"name":"on_load_library?","args":[{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"}],"visibility":"Public","body":"@load_library_callbacks << callback"}},{"html_id":"on_load_library?(&callback:String->Library|Nil)-instance-method","name":"on_load_library?","doc":"Subscribes *callback* to library load requests, so that\nwhenever the runtime needs a library, *callback* gets a\nchance to be invoked and load it.\n\n*callback* is only going to be invoked if all previously\ndefined callbacks failed (returned nil).\n\n*callback* should return a `Library` if it successfully\nloaded it; otherwise, it should return nil.","summary":"Subscribes callback to library load requests, so that whenever the runtime needs a library, callback gets a chance to be invoked and load it.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":186,"url":null},"def":{"name":"on_load_library?","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(String -> Library | ::Nil)"},"visibility":"Public","body":"on_load_library?(callback)"}}]},{"html_id":"novika/Novika/CaptureMode","path":"Novika/CaptureMode.html","kind":"enum","full_name":"Novika::CaptureMode","name":"CaptureMode","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":24,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"CaptureAll","name":"CaptureAll","value":"0"},{"id":"CaptureNeighborhood","name":"CaptureNeighborhood","value":"1"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"capture_all?-instance-method","name":"capture_all?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":25,"url":null},"def":{"name":"capture_all?","visibility":"Public","body":"self == CaptureAll"}},{"html_id":"capture_neighborhood?-instance-method","name":"capture_neighborhood?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":26,"url":null},"def":{"name":"capture_neighborhood?","visibility":"Public","body":"self == CaptureNeighborhood"}}]},{"html_id":"novika/Novika/Classifier","path":"Novika/Classifier.html","kind":"struct","full_name":"Novika::Classifier","name":"Classifier","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/classifier.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"`Classifier` brings *unclassified forms* to life.\n\n`Classifier` assigns types to fragments of Novika code\nconveniently called *unclassified forms*: this\nunclassified form is a decimal, this one is a word, that\none is a quote.\n\nUnclassified forms are given to `Classifier` by `Scissors`,\nan object dedicated to cutting a big blob of Novika code\ninto smaller fragments.\n\n`Scissors` and `Classifier` are designed to work in\ntandem. Separating one from the other is possible and will\nwork, but is not recommended unless you have read the source\ncode of both.","summary":"Classifier
brings unclassified forms to life.
Initializes a classifier from the given source string and Novika block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"args_string":"(source : String, block : Novika::Block)","args_html":"(source : String, block : Novika::Block)","location":{"filename":"src/novika/classifier.cr","line_number":29,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"},{"name":"block","external_name":"block","restriction":"Novika::Block"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source, block)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"block:Novika::Block-instance-method","name":"block","doc":"Returns the block used by this classifier.","summary":"Returns the block used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":21,"url":null},"def":{"name":"block","visibility":"Public","body":"@block"}},{"html_id":"bytes:Pointer(UInt8)-instance-method","name":"bytes","doc":"Returns the source code byte pointer used by this classifier.","summary":"Returns the source code byte pointer used by this classifier.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":18,"url":null},"def":{"name":"bytes","visibility":"Public","body":"@bytes"}},{"html_id":"classify(start,count,dot):Nil-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long. *dot* is the byte index of `'.'`.\n\nThese three arguments are assumed to come from `Scissors#cut`.\n\nThis method does practically no bounds checks, is unsafe\nand must be worked with carefully.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"args_string":"(start, count, dot) : Nil","args_html":"(start, count, dot) : Nil","location":{"filename":"src/novika/classifier.cr","line_number":223,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""},{"name":"dot","external_name":"dot","restriction":""}],"return_type":"Nil","visibility":"Public","body":"if count.zero?\n return\nend\nbyte = @bytes[start]\ncase byte\nwhen '['\n nest\nwhen ']'\n unnest\nwhen '#'\n if count > 1\n add(Novika::QuotedWord.new(build_raw(start + 1, count - 1)))\n else\n add(Novika::Word.new(\"#\"))\n end\nwhen '|'\n if count > 1\n add(Novika::Word.new(build_raw(start, count)))\n else\n push_cursor(block.count)\n end\nwhen '\\''\n add(Novika::Quote.new(build_quote(start + 1, count - 2)))\nwhen '\"'\n if block.has_comment?\n return\n end\n if block.count.zero?\n else\n return\n end\n block.describe_with?(build_comment(start + 1, count - 2))\nelse\n e = (start + count) - 1\n if dot\n else\n frag = build_raw(start, count)\n if decimal?(start, e, sign: true)\n add(Novika::Decimal.new(frag))\n else\n if number_with_base = number_with_base?(frag)\n number, base = number_with_base\n add(Novika::Decimal.new(number.to_big_i(base)))\n else\n add(Novika::Word.new(frag))\n end\n end\n return\n end\n if ((start < dot && dot < e) && (decimal?(start, dot - 1, sign: true))) && (decimal?(dot + 1, e))\n add(Novika::Decimal.new(build_raw(start, count)))\n else\n classify(start, dot - start, dot: nil)\n add(Novika::Word.new(\".\"))\n classify(dot + 1, e - dot)\n end\nend\n"}},{"html_id":"classify(start,count)-instance-method","name":"classify","doc":"Classifies the subrange starting at byte index *start*,\nand *count* bytes long.","summary":"Classifies the subrange starting at byte index start, and count bytes long.
","abstract":false,"args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"args_string":"(start, count)","args_html":"(start, count)","location":{"filename":"src/novika/classifier.cr","line_number":311,"url":null},"def":{"name":"classify","args":[{"name":"start","external_name":"start","restriction":""},{"name":"count","external_name":"count","restriction":""}],"visibility":"Public","body":"dot = nil\nstart.upto((start + count) - 1) do |index|\n if @bytes[index] === '.'\n dot = index\n break\n end\nend\nclassify(start, count, dot)\n"}},{"html_id":"end-instance-method","name":"end","doc":"Ends classification. Makes sure all blocks are closed\n(have their corresponding `]`).","summary":"Ends classification.
","abstract":false,"location":{"filename":"src/novika/classifier.cr","line_number":324,"url":null},"def":{"name":"end","visibility":"Public","body":"if @ceiling.same?(@block)\nelse\n @block.die(\"missing ']'\")\nend"}}]},{"html_id":"novika/Novika/Color","path":"Novika/Color.html","kind":"struct","full_name":"Novika::Color","name":"Color","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/color.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"class_methods":[{"html_id":"rgb(r,g,b)-class-method","name":"rgb","doc":"Creates a `Color` from *r*ed (0 <= h <= 255), *g*reen\n(0 <= g <= 255), *b*lue (0 <= b <= 255) channel values.","summary":"Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and lightness (0 <= l <= 100, percents).
Creates a Color
from hue (0 <= h <= 360, degrees), saturation (0 <= s <= 100, percents), and value (0 <= v <= 100, percents).
Creates a Color
from lightness (0-100), chroma (0-132), hue (0-360).
Creates a Color
from red (0 <= h <= 255), green (0 <= g <= 255), blue (0 <= b <= 255) channel values.
Holds alpha channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a","return_type":"Decimal","visibility":"Public","body":"@a"}},{"html_id":"a=(a:Decimal)-instance-method","name":"a=","doc":"Holds alpha channel value decimal (0-255).\n\nYou can mutate this to set alpha, but do remember that\n`Color` is a struct.","summary":"Holds alpha channel value decimal (0-255).
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"args_string":"(a : Decimal)","args_html":"(a : Decimal)","location":{"filename":"src/novika/forms/color.cr","line_number":20,"url":null},"def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"Decimal"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:Decimal-instance-method","name":"b","doc":"Returns blue channel value decimal (0-255).","summary":"Returns blue channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":14,"url":null},"def":{"name":"b","return_type":"Decimal","visibility":"Public","body":"@b"}},{"html_id":"closest(palette:Array(Color))-instance-method","name":"closest","doc":"Returns the color closest to this color from *palette*.\n\nHow close one color is to another is determined by their\ndistance in an HSV-backed coordinate system.","summary":"Returns the color closest to this color from palette.
","abstract":false,"args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"args_string":"(palette : Array(Color))","args_html":"(palette : Array(Color))","location":{"filename":"src/novika/forms/color.cr","line_number":55,"url":null},"def":{"name":"closest","args":[{"name":"palette","external_name":"palette","restriction":"Array(Color)"}],"visibility":"Public","body":"h, s, v = hsv\npalette.min_by do |other|\n h1, s1, v1 = other.hsv\n (((h1 - h).to_f64 ** 2) + ((s1 - s).to_f64 ** 2)) + ((v1 - v).to_f64 ** 2)\nend\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":67,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"g:Decimal-instance-method","name":"g","doc":"Returns green channel value decimal (0-255).","summary":"Returns green channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":11,"url":null},"def":{"name":"g","return_type":"Decimal","visibility":"Public","body":"@g"}},{"html_id":"hsl:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsl","doc":"Returns a tuple with H, S, L of this color.","summary":"Returns a tuple with H, S, L of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":31,"url":null},"def":{"name":"hsl","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, l = Color.rgb2hsl(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(l)}\n"}},{"html_id":"hsv:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"hsv","doc":"Returns a tuple with H, S, V of this color.","summary":"Returns a tuple with H, S, V of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":38,"url":null},"def":{"name":"hsv","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"h, s, v = Color.rgb2hsv(r.to_f64, g.to_f64, b.to_f64)\n{Decimal.new(h), Decimal.new(s), Decimal.new(v)}\n"}},{"html_id":"lch:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"lch","doc":"Returns a tuple with L, C, H of this color.","summary":"Returns a tuple with L, C, H of this color.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":45,"url":null},"def":{"name":"lch","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"l, c, h = LCH.rgb2lch(r.to_i, g.to_i, b.to_i)\n{Decimal.new(l.round), Decimal.new(c.round), Decimal.new(h.round)}\n"}},{"html_id":"r:Decimal-instance-method","name":"r","doc":"Returns red channel value decimal (0-255).","summary":"Returns red channel value decimal (0-255).
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":8,"url":null},"def":{"name":"r","return_type":"Decimal","visibility":"Public","body":"@r"}},{"html_id":"rgb:Tuple(Decimal,Decimal,Decimal)-instance-method","name":"rgb","doc":"Returns a tuple of R, G, B channel values.","summary":"Returns a tuple of R, G, B channel values.
","abstract":false,"location":{"filename":"src/novika/forms/color.cr","line_number":26,"url":null},"def":{"name":"rgb","return_type":"::Tuple(Decimal, Decimal, Decimal)","visibility":"Public","body":"{r, g, b}"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/color.cr","line_number":71,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"a255 = Decimal.new(255)\nio << \"rgb\"\nif a == a255\nelse\n io << \"a\"\nend\n(((((io << \"(\") << r) << \", \") << g) << \", \") << b\nif a == a255\nelse\n (io << \", \") << a\nend\nio << \")\"\n"}}]},{"html_id":"novika/Novika/ColorSnapshot","path":"Novika/ColorSnapshot.html","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":95,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ColorSnapshot]","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: r, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: g, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: b, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: a, cls: UInt8, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Color)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Color"}],"args_string":"(form : Color)","args_html":"(form : Color)","location":{"filename":"src/novika/image.cr","line_number":116,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Color"}],"visibility":"Public","body":"color = new\ncolor.r = form.r.to_u8\ncolor.g = form.g.to_u8\ncolor.b = form.b.to_u8\ncolor.a = form.a.to_u8\ncolor\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":96,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"a:UInt8-instance-method","name":"a","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"def":{"name":"a","return_type":"UInt8","visibility":"Public","body":"@a"}},{"html_id":"a=(a:UInt8)-instance-method","name":"a=","doc":"Holds alpha channel value, a u8 0-255.","summary":"Holds alpha channel value, a u8 0-255.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"args_string":"(a : UInt8)","args_html":"(a : UInt8)","def":{"name":"a=","args":[{"name":"a","external_name":"a","restriction":"UInt8"}],"visibility":"Public","body":"@a = a"}},{"html_id":"b:UInt8-instance-method","name":"b","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"def":{"name":"b","return_type":"UInt8","visibility":"Public","body":"@b"}},{"html_id":"b=(b:UInt8)-instance-method","name":"b=","doc":"Holds blue channel value, a u8 0-255.","summary":"Holds blue channel value, a u8 0-255.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"args_string":"(b : UInt8)","args_html":"(b : UInt8)","def":{"name":"b=","args":[{"name":"b","external_name":"b","restriction":"UInt8"}],"visibility":"Public","body":"@b = b"}},{"html_id":"g:UInt8-instance-method","name":"g","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"def":{"name":"g","return_type":"UInt8","visibility":"Public","body":"@g"}},{"html_id":"g=(g:UInt8)-instance-method","name":"g=","doc":"Holds green channel value, a u8 0-255.","summary":"Holds green channel value, a u8 0-255.
","abstract":false,"args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"args_string":"(g : UInt8)","args_html":"(g : UInt8)","def":{"name":"g=","args":[{"name":"g","external_name":"g","restriction":"UInt8"}],"visibility":"Public","body":"@g = g"}},{"html_id":"r:UInt8-instance-method","name":"r","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"def":{"name":"r","return_type":"UInt8","visibility":"Public","body":"@r"}},{"html_id":"r=(r:UInt8)-instance-method","name":"r=","doc":"Holds red channel value, a u8 0-255.","summary":"Holds red channel value, a u8 0-255.
","abstract":false,"args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"args_string":"(r : UInt8)","args_html":"(r : UInt8)","def":{"name":"r=","args":[{"name":"r","external_name":"r","restriction":"UInt8"}],"visibility":"Public","body":"@r = r"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":110,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"color = Color.rgb(Decimal.new(r), Decimal.new(g), Decimal.new(b))\ncolor.a = Decimal.new(a)\ncolor\n"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a color form.\n\nIts type is `SnapshotType::Color`.","summary":"Snapshot of a color form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":95,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Decimal","path":"Novika/Decimal.html","kind":"class","full_name":"Novika::Decimal","name":"Decimal","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/decimal.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/ValueForm","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A representation for decimal numbers inside Novika.","summary":"A representation for decimal numbers inside Novika.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":27,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"decimal\""}}],"constructors":[{"html_id":"new(val:BigDecimal)-class-method","name":"new","abstract":false,"args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"args_string":"(val : BigDecimal)","args_html":"(val : BigDecimal)","location":{"filename":"src/novika/forms/decimal.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"val","external_name":"val","restriction":"BigDecimal"}],"visibility":"Public","body":"_ = allocate\n_.initialize(val)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(object:String|Number)-class-method","name":"new","abstract":false,"args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"args_string":"(object : String | Number)","args_html":"(object : String | Number)","location":{"filename":"src/novika/forms/decimal.cr","line_number":13,"url":null},"def":{"name":"new","args":[{"name":"object","external_name":"object","restriction":"String | Number"}],"visibility":"Public","body":"_ = allocate\n_.initialize(object)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"%(other:Decimal):Decimal-instance-method","name":"%","doc":"Returns the remainder of this and *other* decimal numbers.","summary":"Returns the remainder of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":75,"url":null},"def":{"name":"%","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val % other.val)"}},{"html_id":"&(other:Decimal):Decimal-instance-method","name":"&","doc":"Combines this and *other* decimals using bitwise and.","summary":"Combines this and other decimals using bitwise and.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":99,"url":null},"def":{"name":"&","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value & other.val.value)"}},{"html_id":"*(other:Decimal):Decimal-instance-method","name":"*","doc":"Returns the product of this and *other* decimal numbers.","summary":"Returns the product of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":65,"url":null},"def":{"name":"*","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val * other.val)"}},{"html_id":"**(other:Decimal):Decimal-instance-method","name":"**","doc":"Raises this decimal to the power of *other*.","summary":"Raises this decimal to the power of other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":80,"url":null},"def":{"name":"**","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"if val.scale.zero? && other.val.scale.zero?\n return Decimal.new(val ** other.val.to_i64)\nend\nDecimal.new(val.to_f64 ** other.to_f64)\n"}},{"html_id":"+(other:Decimal):Decimal-instance-method","name":"+","doc":"Returns the sum of this and *other* decimal numbers.","summary":"Returns the sum of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":55,"url":null},"def":{"name":"+","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val + other.val)"}},{"html_id":"-(other:Decimal):Decimal-instance-method","name":"-","doc":"Returns the difference between this and *other* decimal numbers.","summary":"Returns the difference between this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":60,"url":null},"def":{"name":"-","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val - other.val)"}},{"html_id":"/(other:Decimal):Decimal-instance-method","name":"/","doc":"Returns the quotient of this and *other* decimal numbers.","summary":"Returns the quotient of this and other decimal numbers.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":70,"url":null},"def":{"name":"/","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val / other.val)"}},{"html_id":"<(other:Decimal):Bool-instance-method","name":"<","doc":"Returns whether this decimal is smaller than *other*.","summary":"Returns whether this decimal is smaller than other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Bool","args_html":"(other : Decimal) : Bool","location":{"filename":"src/novika/forms/decimal.cr","line_number":94,"url":null},"def":{"name":"<","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Bool","visibility":"Public","body":"val < other.val"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
Combines this and other decimals using bitwise or.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"args_string":"(other : Decimal) : Decimal","args_html":"(other : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":104,"url":null},"def":{"name":"|","args":[{"name":"other","external_name":"other","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value | other.val.value)"}},{"html_id":"bitcount:Decimal-instance-method","name":"bitcount","doc":"Returns the number of bits in this decimal.","summary":"Returns the number of bits in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":161,"url":null},"def":{"name":"bitcount","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.bit_length)"}},{"html_id":"ceil:Decimal-instance-method","name":"ceil","doc":"Rounds this decimal up.","summary":"Rounds this decimal up.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":132,"url":null},"def":{"name":"ceil","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.ceil)"}},{"html_id":"chr:Char-instance-method","name":"chr","doc":"Returns the character corresponding to this decimal.","summary":"Returns the character corresponding to this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":32,"url":null},"def":{"name":"chr","return_type":"Char","visibility":"Public","body":"to_i.chr"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/decimal.cr","line_number":21,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"decimal number \"\nto_s(io)\n"}},{"html_id":"each_bit(&:Decimal->)-instance-method","name":"each_bit","doc":"Yields each bit in this decimal.","summary":"Yields each bit in this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":109,"url":null},"def":{"name":"each_bit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Decimal ->)"},"visibility":"Public","body":"(val.value.to_s(2)).each_char do |char|\n if char == '-'\n next\n end\n yield Decimal.new(char == '1' ? 1 : 0)\nend"}},{"html_id":"floor:Decimal-instance-method","name":"floor","doc":"Rounds this decimal down.","summary":"Rounds this decimal down.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":127,"url":null},"def":{"name":"floor","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.floor)"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns whether this decimal is in the bounds of Int64
.
Asserts this decimal is in one of ranges.
","abstract":false,"args":[{"name":"ranges","external_name":"ranges","restriction":""}],"args_string":"(*ranges) : Decimal","args_html":"(*ranges) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":166,"url":null},"def":{"name":"in","args":[{"name":"ranges","external_name":"ranges","restriction":""}],"splat_index":0,"return_type":"Decimal","visibility":"Public","body":"if ranges.any?(&.includes?(val))\n return self\nend\nmessage = String.build do |io|\n io << \"decimal out of range: expected \"\n if ranges.size > 1\n io << \"any of: \"\n end\n ranges.join(io, \", \") do |range|\n (((io << \"[\") << range.begin) << \"; \") << range.end\n io << (range.exclusive? ? \")\" : \"]\")\n end\nend\ndie(message)\n"}},{"html_id":"int:Decimal-instance-method","name":"int","doc":"Asserts this decimal is an integer. Dies if it isn't.","summary":"Asserts this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":184,"url":null},"def":{"name":"int","return_type":"Decimal","visibility":"Public","body":"if integer?\n return self\nend\ndie(\"decimal is not an integer\")\n"}},{"html_id":"integer?-instance-method","name":"integer?","doc":"Returns whether this decimal is an integer.","summary":"Returns whether this decimal is an integer.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":199,"url":null},"def":{"name":"integer?","visibility":"Public","body":"val.trunc == val"}},{"html_id":"nth_ls_bit(n:Decimal):Decimal-instance-method","name":"nth_ls_bit","doc":"Returns *n*-th least significant bit","summary":"Returns n-th least significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal","args_html":"(n : Decimal) : Decimal","location":{"filename":"src/novika/forms/decimal.cr","line_number":156,"url":null},"def":{"name":"nth_ls_bit","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.value.abs.bit(n.to_i))"}},{"html_id":"nth_ms_bit?(n:Decimal):Decimal|Nil-instance-method","name":"nth_ms_bit?","doc":"Returns *n*-th most significant bit","summary":"Returns n-th most significant bit
","abstract":false,"args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"args_string":"(n : Decimal) : Decimal | Nil","args_html":"(n : Decimal) : Decimal | Nil","location":{"filename":"src/novika/forms/decimal.cr","line_number":147,"url":null},"def":{"name":"nth_ms_bit?","args":[{"name":"n","external_name":"n","restriction":"Decimal"}],"return_type":"Decimal | ::Nil","visibility":"Public","body":"str = val.value.to_s(2)\nnint = n.to_i\nif nint < str.size\nelse\n return\nend\nDecimal.new(str[nint + (val.negative? ? 1 : 0)]? == '1' ? 1 : 0)\n"}},{"html_id":"posint:Decimal-instance-method","name":"posint","doc":"Asserts this decimal is a positive integer (i.e., >= 0).\nDies if it isn't.","summary":"Asserts this decimal is a positive integer (i.e., >= 0).
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":192,"url":null},"def":{"name":"posint","return_type":"Decimal","visibility":"Public","body":"if val >= 0 && integer?\n return self\nend\ndie(\"decimal is not a positive integer\")\n"}},{"html_id":"rad_cos:Decimal-instance-method","name":"rad_cos","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":137,"url":null},"def":{"name":"rad_cos","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.cos(val))"}},{"html_id":"rad_sin:Decimal-instance-method","name":"rad_sin","doc":"Treats this decimal as radians, and returns cosine.","summary":"Treats this decimal as radians, and returns cosine.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":142,"url":null},"def":{"name":"rad_sin","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sin(val))"}},{"html_id":"round:Decimal-instance-method","name":"round","doc":"Rounds this decimal.","summary":"Rounds this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":117,"url":null},"def":{"name":"round","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.round)"}},{"html_id":"sqrt:Decimal-instance-method","name":"sqrt","doc":"Returns the square root of this decimal.","summary":"Returns the square root of this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":89,"url":null},"def":{"name":"sqrt","return_type":"Decimal","visibility":"Public","body":"Decimal.new(Math.sqrt(val))"}},{"html_id":"to_f32(*args,**options)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f32(*args, **options)"}},{"html_id":"to_f32(*args,**options,&)-instance-method","name":"to_f32","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f32","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f32(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_f64(*args,**options)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"val.to_f64(*args, **options)"}},{"html_id":"to_f64(*args,**options,&)-instance-method","name":"to_f64","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/decimal.cr","line_number":19,"url":null},"def":{"name":"to_f64","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"val.to_f64(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"to_i:Int32-instance-method","name":"to_i","doc":"Downgrades this decimal into an integer (`Int32`). Dies\nif too large.","summary":"Downgrades this decimal into an integer (Int32
).
Truncates this decimal.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":122,"url":null},"def":{"name":"trunc","return_type":"Decimal","visibility":"Public","body":"Decimal.new(val.trunc)"}},{"html_id":"zero?:Bool-instance-method","name":"zero?","doc":"Returns whether this decimal is zero.","summary":"Returns whether this decimal is zero.
","abstract":false,"location":{"filename":"src/novika/forms/decimal.cr","line_number":42,"url":null},"def":{"name":"zero?","return_type":"Bool","visibility":"Public","body":"val.zero?"}}]},{"html_id":"novika/Novika/Dict","path":"Novika/Dict.html","kind":"class","full_name":"Novika::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":55,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IDict","kind":"module","full_name":"Novika::IDict","name":"IDict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Default dictionary protocol implementation: default block\ndictionary implementation. Uses a hash map for storage.\n\nNote: setting or getting with blocks as keys performs a\nlinear scan for now. The semantics for this is unstable.","summary":"Default dictionary protocol implementation: default block dictionary implementation.
","instance_methods":[{"html_id":"==(other:Dict)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Dict"}],"args_string":"(other : Dict)","args_html":"(other : Dict)","location":{"filename":"src/novika/dict.cr","line_number":155,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Dict"}],"visibility":"Public","body":"if @store == (other.@store)\nelse\n return false\nend\nif @blockstore.class == (other.@blockstore).class\nelse\n return false\nend\nif bs_l = @blockstore\nelse\n return true\nend\nbs_r = (other.@blockstore).not_nil!\nif bs_l.size == bs_r.size\nelse\n return false\nend\nbs_l.all? do |k_l, v_l|\n bs_r.any? do |k_r, v_r|\n (k_l == k_r) && (v_l == v_r)\n end\nend\n"}},{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":123,"url":null},"def":{"name":"clear","visibility":"Public","body":"@store.clear\n@blockstore.try(&.clear)\n"}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":142,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":"Dict.new(@store.dup, @blockstore.try(&.dup))"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":138,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"@store.size + (@blockstore.try(&.size) || 0)"}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":119,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":"name.is_a?(Block) ? del_block(name) : @store.delete(name)"}},{"html_id":"each(&)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":146,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"visibility":"Public","body":"@store.each do |k, v|\n yield k, v\nend\n@blockstore.try(&.each do |k, v|\n yield k, v\nend)\n"}},{"html_id":"get(name:Form,&):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, &) : Entry | Nil","args_html":"(name : Form, &) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":113,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"return_type":"Entry | ::Nil","visibility":"Public","body":"if name.is_a?(Block)\n return get_block(name) do\n yield name\n end\nend\n@store.fetch(name) do\n yield name\nend\n"}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":128,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Block) ? has_block?(name) : @store.has_key?(name)"}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":false,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":132,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":"donor.each do |k, v|\n if k.is_a?(Word) && k.private?\n else\n set(k, v)\n end\nend"}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":107,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":"if name.is_a?(Block)\n return set_block(name, entry)\nend\n@store[name] = entry\n"}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Executes a fetcher callback on every visited vertex in the block graph starting from an entrypoint block, until the callback returns T
, or until there are no more blocks to explore.
Executes the fetcher callback on every visited vertex in the block graph starting from an entrypoint block, and until the callback returns T
, or until exhausted all reachable vertices.
Same as #on(entrypoint : Block, ignore : Nil)
, the difference being that immediately adjacent block ignore list is taken into account.
Index of the code block in a continuation block.
"},{"id":"C_STACK_AT","name":"C_STACK_AT","value":"1","doc":"Index of the stack block in a continuation block.","summary":"Index of the stack block in a continuation block.
"},{"id":"MAX_CONTS","name":"MAX_CONTS","value":"1024","doc":"Maximum amount of scheduled continuations in `conts`. After\npassing this number, `Error` is raised to bring attention\nto such dangerous depth.","summary":"Maximum amount of scheduled continuations in #conts
.
Maximum number of engines that can be created.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"An engine object is responsible for managing a *continuations block*.\n\nContinuations block consists of *continuatio**n** blocks*.\n\nCanonical continuation blocks themselves contain two blocks\n(see `Engine.cont`):\n\n- *Code block*, more commonly known as simply the block\n (and as *active* block when its continuation is active,\n i.e., when it's being evaluated),\n\n- *Stack block*, more commonly known as simply the stack\n (and as *active* stack when its continuation is active,\n i.e., when it's being evaluated).\n\n`Engine#schedule` is used to create a continuation block\ngiven a `Schedulable` object (usually a `Form`, and in rarer\ncases an `Entry`) and a stack block. It then adds the\ncontinuation block to the continuations block -- effectively\nscheduling it for execution *on the next exhaust loop cycle*.\n\nNote that there are two other methods linked with execution\nand implemented by all forms: `on_open`, and `on_parent_open`.\nThey *perform* whatever action the form wants rather than\nsimply *scheduling* it to be performed some time in the\nfuture. Namely, `on_open` is invoked whenever the form at\nhand is itself the target of opening (aka execution, aka\nevaluation), and `on_parent_open` is invoked when a block\ncontaining the form at hand (its parent block) is the target\nof opening.\n\nAn engine's *exhaust loop* is where most of the magic happens.\nIt is organized very much like the fetch-decode-execute cycle\nin CPUs.\n\nFor *fetch*, the engine finds the top (see `Block#top`)\ncontinuation block, then finds the top form on the code\nblock, and invokes the `on_parent_open` method on it.\n\nThis method is analogous to *decoding* followed by *execution*.\nThe form is free to choose how it wants to make sense of itself,\ngiven an engine. Some forms (e.g. words) end up scheduling\nnew continuation blocks `on_parent_open`, making the engine\ngo through them first.\n\nAfter the cursor of the active block hits the end, `Engine`\ndrops (see `Block#drop`) the continuation block (thereby\n*closing* the code block).\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\nstack = Block.new\n\nengine = Engine.new(caps)\nengine.schedule(block, stack)\nengine.exhaust\n\nputs stack # [ 3 ]\n\n# Or, shorter:\n\ncaps = CapabilityCollection.with_default.enable_all\nblock = Block.new(caps.block).slurp(\"1 2 +\")\n\nputs Engine.exhaust(caps, block) # [ 3 ]\n```","summary":"An engine object is responsible for managing a continuations block.
","class_methods":[{"html_id":"cont(*,block,stack)-class-method","name":"cont","doc":"Creates and returns a canonical continuation block.\n\nA continuation block must include two blocks: the first is\ncalled simply the *block* (found at `C_BLOCK_AT`), and the\nsecond is called the *stack* block (found at `C_STACK_AT`).","summary":"Creates and returns a canonical continuation block.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"args_string":"(*, block, stack)","args_html":"(*, block, stack)","location":{"filename":"src/novika/engine.cr","line_number":170,"url":null},"def":{"name":"cont","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":""},{"name":"stack","external_name":"stack","restriction":""}],"splat_index":0,"visibility":"Public","body":"Block.with([block, stack] of Form, leaf: false)"}},{"html_id":"current-class-method","name":"current","doc":"Returns the current engine. Raises a BUG exception if\nthere is no current engine.","summary":"Returns the current engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":109,"url":null},"def":{"name":"current","visibility":"Public","body":"@@stack.last? || (raise(\"BUG: there is no current engine\"))"}},{"html_id":"exhaust(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"exhaust!(capabilities:CapabilityCollection,schedulable,stack=nil):Block-class-method","name":"exhaust!","doc":"Schedules *schedulable* and exhausts immediately. Returns the\nresulting *stack* (creates one if `nil`).\n\nUseful for when you need the result of *schedulable*\nimmediately.\n\nFor details see `Engine#schedule!`.\n\n```\ncaps = CapabilityCollection.with_default.enable_all\nresult = Engine.exhaust(caps, Block.new(caps.block).slurp(\"1 2 +\"))\nresult.top # 3 : Novika::Decimal\n```","summary":"Schedules schedulable and exhausts immediately.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"args_string":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","args_html":"(capabilities : CapabilityCollection, schedulable, stack = nil) : Block","location":{"filename":"src/novika/engine.cr","line_number":174,"url":null},"def":{"name":"exhaust!","args":[{"name":"capabilities","external_name":"capabilities","restriction":"CapabilityCollection"},{"name":"schedulable","external_name":"schedulable","restriction":""},{"name":"stack","default_value":"nil","external_name":"stack","restriction":""}],"return_type":"Block","visibility":"Public","body":"stack || (stack = Block.new)\nEngine.new(capabilities) do |engine|\n engine.schedule!(schedulable, stack)\n engine.exhaust\nend\nstack\n"}},{"html_id":"pop(engine:Engine):Engine|Nil-class-method","name":"pop","doc":"Pops *engine* from the engine stack. Raises a BUG exception\n(and does not pop!) if the current engine is not *engine*\n(or if it is absent).","summary":"Pops engine from the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine | Nil","args_html":"(engine : Engine) : Engine | Nil","location":{"filename":"src/novika/engine.cr","line_number":135,"url":null},"def":{"name":"pop","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine | ::Nil","visibility":"Public","body":"if current.same?(engine)\nelse\n raise(\"BUG: lost track of the engine stack: unexpected engine on top!\")\nend\n@@stack.pop\n"}},{"html_id":"push(caps:CapabilityCollection)-class-method","name":"push","doc":"Pushes a new engine with the given capability collection *caps*.\n\nMake sure that you `pop` it yourself or that you know what\nyou're doing!","summary":"Pushes a new engine with the given capability collection caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/engine.cr","line_number":128,"url":null},"def":{"name":"push","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"push(new(caps))"}},{"html_id":"trackers-class-method","name":"trackers","doc":"Holds an array of exhaust tracker objects associated with\nall instances of `Engine`. These objects intercept forms\nbefore/after opening in `Engine#exhaust`. This e.g. allows\nfrontends to analyze/track forms and/or matching blocks.","summary":"Holds an array of exhaust tracker objects associated with all instances of Engine
.
Yields an instance of Engine
.
Pushes engine onto the engine stack.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : Engine","args_html":"(engine : Engine) : Engine","location":{"filename":"src/novika/engine.cr","line_number":114,"url":null},"def":{"name":"push","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"Engine","visibility":"Public","body":"if @@stack.size.in?(0..MAX_ENGINES)\nelse\n raise(Error.new(\"bad engine stack depth: deep recursion in a __metaword__?\"))\nend\n@@stack << engine\nengine\n"}}],"instance_methods":[{"html_id":"block-instance-method","name":"block","doc":"Returns the block of the active continuation.","summary":"Returns the block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":204,"url":null},"def":{"name":"block","visibility":"Public","body":"(cont.at(C_BLOCK_AT)).a(Block)"}},{"html_id":"capabilities:CapabilityCollection-instance-method","name":"capabilities","doc":"Returns the capability collection used by this engine.","summary":"Returns the capability collection used by this engine.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":144,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"cont-instance-method","name":"cont","doc":"Returns the active continuation.","summary":"Returns the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":199,"url":null},"def":{"name":"cont","visibility":"Public","body":"conts.top.a(Block)"}},{"html_id":"conts:Novika::Block-instance-method","name":"conts","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Novika::Block)-instance-method","name":"conts=","doc":"Holds the continuations block (aka continuations stack).","summary":"Holds the continuations block (aka continuations stack).
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"args_string":"(conts : Novika::Block)","args_html":"(conts : Novika::Block)","location":{"filename":"src/novika/engine.cr","line_number":147,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"::Novika::Block"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"die(*args,**options)-instance-method","name":"die","doc":"See `Form#die`.","summary":"See Form#die
.
See Form#die
.
Returns the relevant death handler, or nil.
","abstract":false,"args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"args_string":"(avoid_prototype = nil)","args_html":"(avoid_prototype = nil)","location":{"filename":"src/novika/engine.cr","line_number":279,"url":null},"def":{"name":"drop_until_death_handler?","args":[{"name":"avoid_prototype","default_value":"nil","external_name":"avoid_prototype","restriction":""}],"visibility":"Public","body":"while !conts.tape.empty?\n entry = block.entry_for?(Hook.died)\n conts.drop\n if entry\n else\n next\n end\n handler = entry_to_death_handler_block(entry)\n if avoid_prototype && (handler.prototype.same?(avoid_prototype))\n else\n return handler\n end\nend"}},{"html_id":"each_active_block(&)-instance-method","name":"each_active_block","doc":"Yields active blocks, starting from the oldest active block\nup to the current active block.","summary":"Yields active blocks, starting from the oldest active block up to the current active block.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":215,"url":null},"def":{"name":"each_active_block","yields":1,"block_arity":1,"visibility":"Public","body":"conts.each do |cont|\n yield ((cont.a(Block)).at(C_BLOCK_AT)).a(Block)\nend"}},{"html_id":"execute(form:Form)-instance-method","name":"execute","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form)","args_html":"(form : Form)","location":{"filename":"src/novika/engine.cr","line_number":293,"url":null},"def":{"name":"execute","args":[{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"begin\n form.on_parent_open(self)\nrescue error : Error\n error.conts || (error.conts = conts.instance)\n if handler = drop_until_death_handler?(avoid_prototype: block.prototype)\n else\n raise(error)\n end\n schedule(handler, stack: conts.count.zero? ? Block.with(error) : stack.add(error))\nend"}},{"html_id":"exhaust-instance-method","name":"exhaust","doc":"Exhausts all scheduled continuations, starting from the\ntopmost (see `Block#top`) continuation in `conts`.","summary":"Exhausts all scheduled continuations, starting from the topmost (see Block#top
) continuation in #conts
.
See Schedulable#schedule
.
Main authorized point for adding continuations unsafely.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Block"}],"args_string":"(other : Block)","args_html":"(other : Block)","location":{"filename":"src/novika/engine.cr","line_number":232,"url":null},"def":{"name":"schedule!","args":[{"name":"other","external_name":"other","restriction":"Block"}],"visibility":"Public","body":"if conts.count > MAX_CONTS\n die(\"recursion or block open is too deep (> #{MAX_CONTS})\")\nend\ntap do\n conts.add(other)\nend\n"}},{"html_id":"schedule!(*,block:Block,stack:Block)-instance-method","name":"schedule!","doc":"Schedules a continuation with the given *block* and *stack*.","summary":"Schedules a continuation with the given block and stack.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"args_string":"(*, block : Block, stack : Block)","args_html":"(*, block : Block, stack : Block)","location":{"filename":"src/novika/engine.cr","line_number":241,"url":null},"def":{"name":"schedule!","args":[{"name":"","external_name":"","restriction":""},{"name":"block","external_name":"block","restriction":"Block"},{"name":"stack","external_name":"stack","restriction":"Block"}],"splat_index":0,"visibility":"Public","body":"schedule!(Engine.cont(block: block, stack: stack))"}},{"html_id":"stack-instance-method","name":"stack","doc":"Returns the stack block of the active continuation.","summary":"Returns the stack block of the active continuation.
","abstract":false,"location":{"filename":"src/novika/engine.cr","line_number":209,"url":null},"def":{"name":"stack","visibility":"Public","body":"(cont.at(C_STACK_AT)).a(Block)"}}]},{"html_id":"novika/Novika/Entry","path":"Novika/Entry.html","kind":"class","full_name":"Novika::Entry","name":"Entry","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/dict.cr","line_number":172,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a dictionary entry. Dictionary entries hold the\nvalue form.","summary":"Represents a dictionary entry.
","constructors":[{"html_id":"new(form:Form,opener:Bool=false)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"args_string":"(form : Form, opener : Bool = false)","args_html":"(form : Form, opener : Bool = false)","location":{"filename":"src/novika/dict.cr","line_number":178,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Form"},{"name":"opener","default_value":"false","external_name":"opener","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(form, opener)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns `true` if this reference is the same as *other*. Invokes `same?`.","summary":"Returns true
if this reference is the same as other.
See Object#hash(hasher)
Safe #schedule
.
Unsafe #schedule
.
How many trace entries to display at max.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds and accepts information about an error.\n\nErrors are raised when a certain case is undesired, unhandleable,\nor otherwise inappropriate to some form of computation.\n\nErrors can be *handled* and *unhandled*. *Unhandled* errors\ngenerate an error `report` (generally to STDERR, but this\ndepends on the frontend). They are fatal for the program\nthey occur in.\n\n*Death handlers*, or *death traps*, when set up in code blocks\nand/or their relatives, allow errors to be *handled*. For this\nreason, errors are Novika `Form`s, and can be manipulated,\nreported, and inspected from Novika.","summary":"Holds and accepts information about an error.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":39,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"error\""}}],"constructors":[{"html_id":"new(details:String,form:Novika::Form|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"args_string":"(details : String, form : Novika::Form | Nil = nil)","args_html":"(details : String, form : Novika::Form | Nil = nil)","location":{"filename":"src/novika/error.cr","line_number":32,"url":null},"def":{"name":"new","args":[{"name":"details","external_name":"details","restriction":"::String"},{"name":"form","default_value":"nil","external_name":"form","restriction":"::Novika::Form | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(details, form)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"conts:Block|Nil-instance-method","name":"conts","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts","return_type":"Block | ::Nil","visibility":"Public","body":"@conts"}},{"html_id":"conts=(conts:Block|Nil)-instance-method","name":"conts=","doc":"Holds a reference to the continuations block at the time\nof death.","summary":"Holds a reference to the continuations block at the time of death.
","abstract":false,"args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"args_string":"(conts : Block | Nil)","args_html":"(conts : Block | Nil)","location":{"filename":"src/novika/error.cr","line_number":30,"url":null},"def":{"name":"conts=","args":[{"name":"conts","external_name":"conts","restriction":"Block | ::Nil"}],"visibility":"Public","body":"@conts = conts"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":35,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"error: '\") << details) << \"'\""}},{"html_id":"details:String-instance-method","name":"details","doc":"Returns a string describing the reasons of this error.","summary":"Returns a string describing the reasons of this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":23,"url":null},"def":{"name":"details","return_type":"String","visibility":"Public","body":"@details"}},{"html_id":"form:Form-instance-method","name":"form","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form","return_type":"Form","visibility":"Public","body":"if (value = @form).nil?\n ::raise(NilAssertionError.new(\"Novika::Error#form cannot be nil\"))\nelse\n value\nend"}},{"html_id":"form?:Form|Nil-instance-method","name":"form?","doc":"Returns the form that (speculatively) caused this error.","summary":"Returns the form that (speculatively) caused this error.
","abstract":false,"location":{"filename":"src/novika/error.cr","line_number":26,"url":null},"def":{"name":"form?","return_type":"Form | ::Nil","visibility":"Public","body":"@form"}},{"html_id":"report(io:IO)-instance-method","name":"report","doc":"Reports about this error to *io*.\n\nNote: Colorize is used for colors and emphasis. If you\ndo not want Colorize in *io*, you can temporarily disable\nit by setting `Colorize.enabled = false`.","summary":"Reports about this error to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/error.cr","line_number":48,"url":null},"def":{"name":"report","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"if conts = self.conts\n b = Math.max(0, conts.count - MAX_TRACE)\n e = conts.count\n if b.zero?\n else\n ((io << \" │ … \") << (b - 1)) << \" continuation(s) omitted …\"\n io.puts\n end\n (b...e).each do |index|\n io << \" ╿ due to \"\n cont = (conts.at(index)).as?(Block)\n code = cont.try do |__arg0|\n (__arg0.at?(Engine::C_BLOCK_AT)).as?(Block)\n end\n if cont && code\n else\n io.puts(\"[malformed continuation]\")\n next\n end\n if top = code.top?\n ((io << \"'\") << (top || \"[nothing]\").colorize.bold) << \"', which was opened here:\"\n else\n io << \"the following block:\"\n end\n io.puts\n io << \" │ \"\n code.spot(io)\n io.puts\n end\nend\nif form?\n io.puts(\" ╿ this form is invalid, and is the cause of death:\")\n (io << \" │ \") << form\n io.puts\nend\n(io << \"Sorry: \".colorize.red.bold) << details\ncase details.byte_at?(details.bytesize - 1)\nwhen '!', '?', '.'\nelse\n io << '.'\nend\nio.puts\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/error.cr","line_number":96,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << details) << \"]\""}}]},{"html_id":"novika/Novika/False","path":"Novika/False.html","kind":"struct","full_name":"Novika::False","name":"False","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":63,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a falsey `Boolean`. `False` is the only falsey\nform in Novika.","summary":"Represents a falsey Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":64,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean false\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/boolean.cr","line_number":72,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"b"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/boolean.cr","line_number":76,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"false\""}}]},{"html_id":"novika/Novika/FFI","path":"Novika/FFI.html","kind":"module","full_name":"Novika::FFI","name":"FFI","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":3,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/FFI/Cchar","path":"Novika/FFI/Cchar.html","kind":"struct","full_name":"Novika::FFI::Cchar","name":"Cchar","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":368,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C char (a u8).\nIn Novika, char is represented by a single-character quote.","summary":"Type-side and value-side representation of C char (a u8).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":396,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":384,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"form.first_byte?.try do |byte|\n new(byte)\nend"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":388,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form.to_u8)"}},{"html_id":"matches?(value:Cchar)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"args_string":"(value : Cchar)","args_html":"(value : Cchar)","location":{"filename":"src/novika/ffi.cr","line_number":417,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cchar"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":421,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.uint8"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":400,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"char\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":413,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"new((box.as(::Pointer(UInt8))).value)"}}],"constructors":[{"html_id":"new(char:UInt8)-class-method","name":"new","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"args_string":"(char : UInt8)","args_html":"(char : UInt8)","location":{"filename":"src/novika/ffi.cr","line_number":372,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"UInt8"}],"visibility":"Public","body":"_ = allocate\n_.initialize(char)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":404,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @char)).as(::Pointer(Void))"}},{"html_id":"to_crystal-instance-method","name":"to_crystal","doc":"Returns the corresponding Crystal character.","summary":"Returns the corresponding Crystal character.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":376,"url":null},"def":{"name":"to_crystal","visibility":"Public","body":"@char.chr"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":380,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":392,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"'\") << to_crystal) << \"'\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":408,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @char\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Cstr","path":"Novika/FFI/Cstr.html","kind":"struct","full_name":"Novika::FFI::Cstr","name":"Cstr","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":428,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of C string (a u8 pointer).\nIn Novika, C string is represented by a quote.","summary":"Type-side and value-side representation of C string (a u8 pointer).
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":456,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Quote)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/ffi.cr","line_number":460,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"new(form.string)"}},{"html_id":"matches?(value:Cstr)-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"args_string":"(value : Cstr)","args_html":"(value : Cstr)","location":{"filename":"src/novika/ffi.cr","line_number":486,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"Cstr"}],"visibility":"Public","body":"true"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":490,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":464,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"cstr\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":481,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"handle = Pointer(UInt8).new((box.as(::Pointer(UInt64))).value)\nhandle.null? ? UntypedPointer.none : new(String.new(handle))\n"}}],"constructors":[{"html_id":"new(string:String)-class-method","name":"new","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"}],"args_string":"(string : String)","args_html":"(string : String)","location":{"filename":"src/novika/ffi.cr","line_number":432,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @string == (other.@string)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":468,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"write_to!((Pointer(UInt64).malloc(1)).as(::Pointer(Void)))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the corresponding Crystal string.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":436,"url":null},"def":{"name":"to_crystal","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":440,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Quote.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":452,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"\\\"\") << to_crystal) << \"\\\"\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":472,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"bytes = Pointer(UInt8).malloc(@string.bytesize + 1)\nbytes.copy_from(@string.to_unsafe, @string.bytesize)\nbytes[@string.bytesize + 1] = 0\n(base.as(::Pointer(UInt64))).value = bytes.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/DefaultTypeParser","path":"Novika/FFI/DefaultTypeParser.html","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows all parse-able types, from ints to `nothing` to\nstructs and unions.","summary":"Allows all parse-able types, from ints to nothing
to structs and unions.
Type-side and value-side representation of Float32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":238,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/F64","path":"Novika/FFI/F64.html","kind":"struct","full_name":"Novika::FFI::F64","name":"F64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":239,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Float64`.","summary":"Type-side and value-side representation of Float64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Float64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_f64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":239,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Float64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/FixedArityFunction","path":"Novika/FFI/FixedArityFunction.html","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},"ancestors":[{"html_id":"novika/Novika/FFI/Function","kind":"struct","full_name":"Novika::FFI::Function","name":"Function"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1035,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Calls a fixed-arity C function.","summary":"Calls a fixed-arity C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),argtypes:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), argtypes : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1038,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"argtypes","external_name":"argtypes","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, argtypes, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1056,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"args = Array(ForeignValue).new(@argtypes.size)\n@argtypes.reverse_each do |argtype|\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n args.unshift(arg)\nend\n(call(args)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1036,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]},{"html_id":"novika/Novika/FFI/ForeignType","path":"Novika/FFI/ForeignType.html","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":28,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for Novika FFI types.","summary":"Base type for Novika FFI types.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":30,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"from(form:Form):ForeignValue-instance-method","name":"from","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nDies if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue","args_html":"(form : Form) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":48,"url":null},"def":{"name":"from","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue","visibility":"Public","body":"(from?(form)) || (raise(Error.new(\"could not convert #{form} to foreign type #{self}\")))"}},{"html_id":"from?(form:Form):ForeignValue|Nil-instance-method","name":"from?","doc":"Instantiates a foreign value of this foreign type from\nthe given *form*.\n\nReturns nil if conversion is impossible.","summary":"Instantiates a foreign value of this foreign type from the given form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(form : Form) : ForeignValue | Nil","args_html":"(form : Form) : ForeignValue | Nil","location":{"filename":"src/novika/ffi.cr","line_number":56,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Form"}],"return_type":"ForeignValue | ::Nil","visibility":"Public","body":""}},{"html_id":"matches?(value:ForeignValue):Bool-instance-method","name":"matches?","doc":"Returns whether this type corresponds to the given *value*.","summary":"Returns whether this type corresponds to the given value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(value : ForeignValue) : Bool","args_html":"(value : ForeignValue) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":60,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"ForeignValue"}],"return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":40,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"(to_ffi_type.@type).value.size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":37,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Base type for Novika FFI values (both heap & stack allocated).
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":7,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":""}},{"html_id":"must_be_of(type:ForeignType)-instance-method","name":"must_be_of","doc":"Raises if this value is not of the given `ForeignType` *type*.","summary":"Raises if this value is not of the given ForeignType
type.
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":17,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":true,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":11,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/Function","path":"Novika/FFI/Function.html","kind":"struct","full_name":"Novika::FFI::Function","name":"Function","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":1024,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/FixedArityFunction","kind":"struct","full_name":"Novika::FFI::FixedArityFunction","name":"FixedArityFunction"},{"html_id":"novika/Novika/FFI/VariadicFunction","kind":"struct","full_name":"Novika::FFI::VariadicFunction","name":"VariadicFunction"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type for C function call interfaces.","summary":"Base type for C function call interfaces.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":true,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1031,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":true,"location":{"filename":"src/novika/ffi.cr","line_number":1026,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1024,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/I16","path":"Novika/FFI/I16.html","kind":"struct","full_name":"Novika::FFI::I16","name":"I16","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":234,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int16`.","summary":"Type-side and value-side representation of Int16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":234,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I32","path":"Novika/FFI/I32.html","kind":"struct","full_name":"Novika::FFI::I32","name":"I32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int32`.","summary":"Type-side and value-side representation of Int32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":235,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I64","path":"Novika/FFI/I64.html","kind":"struct","full_name":"Novika::FFI::I64","name":"I64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int64`.","summary":"Type-side and value-side representation of Int64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":236,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/I8","path":"Novika/FFI/I8.html","kind":"struct","full_name":"Novika::FFI::I8","name":"I8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":233,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `Int8`.","summary":"Type-side and value-side representation of Int8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(Int8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_i8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":233,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(Int8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/InlineStructType","path":"Novika/FFI/InlineStructType.html","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":785,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of an inline struct, e.g. one returned\nfrom a function or passed as an argument, aka stack-allocated\nstructs (like Crystal `struct`).","summary":"Type-side representation of an inline struct, e.g.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":790,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:InlineStructView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"args_string":"(view : InlineStructView) : Bool","args_html":"(view : InlineStructView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":806,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"InlineStructView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":786,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"padded_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":802,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.struct(@layout.map_desc_with_index do |__arg2|\n __arg2.type.to_ffi_type\nend)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":810,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":794,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"InlineStructView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/InlineStructView","path":"Novika/FFI/InlineStructView.html","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of an inline struct, aka\nstack-allocated struct. Allows to read and write fields (see\n`StructView`). Similar to the `.` operator in C.","summary":"Value-side representation of an inline struct, aka stack-allocated struct.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":974,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":984,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"~⟨\"\nsuper(io)\nio << \"⟩\"\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":978,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.padded_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/Nothing","path":"Novika/FFI/Nothing.html","kind":"struct","full_name":"Novika::FFI::Nothing","name":"Nothing","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":330,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of void. All value-side\nmethods raise.","summary":"Type-side and value-side representation of void.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":345,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be allocated\")"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":361,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.void"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":353,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"void\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":357,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"Nothing.new"}}],"constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":334,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be boxed\")"}},{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":330,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":342,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":349,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"(void)\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":338,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"raise(\"BUG: nothing cannot be written\")"}}]},{"html_id":"novika/Novika/FFI/StructFieldDesc","path":"Novika/FFI/StructFieldDesc.html","kind":"struct","full_name":"Novika::FFI::StructFieldDesc","name":"StructFieldDesc","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":500,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Holds the description of a struct field: its id (purely for\nconvenience), type (one of `ForeignType`s), and, most\nimportantly, *offset*.","summary":"Holds the description of a struct field: its id (purely for convenience), type (one of ForeignType
s), and, most importantly, offset.
offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : ForeignValue","args_html":"(base : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":507,"url":null},"def":{"name":"fetch!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"type.unbox(Pointer(Void).new(base.address + offset))"}},{"html_id":"id:String-instance-method","name":"id","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"offset:UInt64-instance-method","name":"offset","abstract":false,"def":{"name":"offset","return_type":"UInt64","visibility":"Public","body":"@offset"}},{"html_id":"put!(base:Pointer(Void),value:ForeignValue)-instance-method","name":"put!","doc":"Writes *value* at *base* plus this field's offset, assuming\n*base* points to the start of the struct this field is a\nmember of.\n\nThe latter is not enforced; therefore, this method is considered\n**unsafe**.","summary":"Writes value at base plus this field's offset, assuming base points to the start of the struct this field is a member of.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(base : Pointer(Void), value : ForeignValue)","args_html":"(base : Pointer(Void), value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":517,"url":null},"def":{"name":"put!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"value.must_be_of(type)\nvalue.write_to!(Pointer(Void).new(base.address + offset))\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":522,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"(\") << type) << \" \") << id) << \")\""}},{"html_id":"type:ForeignType-instance-method","name":"type","abstract":false,"def":{"name":"type","return_type":"ForeignType","visibility":"Public","body":"@type"}}]},{"html_id":"novika/Novika/FFI/StructLayout","path":"Novika/FFI/StructLayout.html","kind":"class","full_name":"Novika::FFI::StructLayout","name":"StructLayout","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":551,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Allows to describe structs which can then be constructed,\nretrieved, read, and written to.\n\n```\npoint_s = StructLayout.new(\"Point\")\npoint_s.add(\"x\", F64)\npoint_s.add(\"y\", F64)\n\nrect_s = StructLayout.new(\"Rect\")\nrect_s.add(\"origin\", point_s.reference)\nrect_s.add(\"corner\", point_s.inline)\n\norigin = point_s.reference.make!\norigin[\"x\"] = F64.new(123)\norigin[\"y\"] = F64.new(456)\n\ncorner = point_s.inline.make!\ncorner[\"x\"] = F64.new(234)\ncorner[\"y\"] = F64.new(567)\n\nrect = rect_s.reference.make!\nrect[\"origin\"] = origin\nrect[\"corner\"] = corner\n```","summary":"Allows to describe structs which can then be constructed, retrieved, read, and written to.
","constructors":[{"html_id":"new-class-method","name":"new","doc":"Creates an empty struct layout.","summary":"Creates an empty struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":563,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif object_id == other.object_id\nelse\n return false\nend\ntrue\n"}},{"html_id":"add(id,type:ForeignType)-instance-method","name":"add","doc":"Appends a field called *id*, of the given *type*, to this\nstruct's list of fields.\n\nSimilar to struct ids, *id* is irrelevant to FFI and is simply\n*one of* the ways to access struct fields.","summary":"Appends a field called id, of the given type, to this struct's list of fields.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(id, type : ForeignType)","args_html":"(id, type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":605,"url":null},"def":{"name":"add","args":[{"name":"id","external_name":"id","restriction":""},{"name":"type","external_name":"type","restriction":"ForeignType"}],"visibility":"Public","body":"if type.is_a?(InlineStructType)\n offset = add(type.padded_size, type.alignment)\nelse\n offset = add(type.to_ffi_type)\nend\n@fields << (StructFieldDesc.new(id, type, offset))\n"}},{"html_id":"alignment:UInt64-instance-method","name":"alignment","doc":"Returns the alignment of this struct layout.","summary":"Returns the alignment of this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":557,"url":null},"def":{"name":"alignment","return_type":"UInt64","visibility":"Public","body":"@alignment"}},{"html_id":"desc(index:Int32)-instance-method","name":"desc","doc":"Retrieves field description given the field's *index*.","summary":"Retrieves field description given the field's index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int32"}],"args_string":"(index : Int32)","args_html":"(index : Int32)","location":{"filename":"src/novika/ffi.cr","line_number":642,"url":null},"def":{"name":"desc","args":[{"name":"index","external_name":"index","restriction":"Int32"}],"visibility":"Public","body":"@fields[index]"}},{"html_id":"desc(id:String)-instance-method","name":"desc","doc":"Retrieves field description given the field's *id*entifier.\nRaises if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":654,"url":null},"def":{"name":"desc","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(desc?(id)) || (raise(\"BUG: no such field: #{id}\"))"}},{"html_id":"desc?(id:String)-instance-method","name":"desc?","doc":"Retrieves field description given the field's *id*entifier.\nReturns nil if no such field exists.","summary":"Retrieves field description given the field's identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":648,"url":null},"def":{"name":"desc?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)).try do |index|\n @fields.unsafe_fetch(index)\nend"}},{"html_id":"each_desc_with_index(&)-instance-method","name":"each_desc_with_index","doc":"Yields field descriptions and their indices to the block.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":659,"url":null},"def":{"name":"each_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.each_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"field_count-instance-method","name":"field_count","doc":"Returns the amount of fields in this struct layout.","summary":"Returns the amount of fields in this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":619,"url":null},"def":{"name":"field_count","visibility":"Public","body":"@fields.size"}},{"html_id":"has_field?(id:String)-instance-method","name":"has_field?","doc":"Returns whether this layout contains a field with the\ngiven *id*entifier.","summary":"Returns whether this layout contains a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":625,"url":null},"def":{"name":"has_field?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.any? do |__arg0|\n __arg0.id == id\nend"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Returns whether this and *other* layouts are the same\nlayout. Uses reference equality (like `same?`) rather\nthan deep equality.","summary":"Returns whether this and other layouts are the same layout.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = object_id.hash(hasher)\nhasher\n"}},{"html_id":"index(id:String)-instance-method","name":"index","doc":"Returns the index of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the index of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":637,"url":null},"def":{"name":"index","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"(index?(id)) || (raise(\"BUG: no such field in struct layout: #{id}\"))"}},{"html_id":"index?(id:String)-instance-method","name":"index?","doc":"Returns the index of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the index of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":631,"url":null},"def":{"name":"index?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@fields.index() do |__arg1|\n __arg1.id == id\nend"}},{"html_id":"inline-instance-method","name":"inline","doc":"Returns an inline struct type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.inline`\ninstead of saving it in a variable and using that variable.","summary":"Returns an inline struct type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":683,"url":null},"def":{"name":"inline","visibility":"Public","body":"InlineStructType.new(self)"}},{"html_id":"map_desc_with_index(&)-instance-method","name":"map_desc_with_index","doc":"Yields field descriptions and their indices to the block.\nReturns an array of block results.","summary":"Yields field descriptions and their indices to the block.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":665,"url":null},"def":{"name":"map_desc_with_index","yields":2,"block_arity":2,"visibility":"Public","body":"@fields.map_with_index do |field, index|\n yield field, index\nend"}},{"html_id":"max_field_size:UInt64-instance-method","name":"max_field_size","doc":"Returns the maximum field size in this struct.","summary":"Returns the maximum field size in this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":560,"url":null},"def":{"name":"max_field_size","return_type":"UInt64","visibility":"Public","body":"@max_field_size"}},{"html_id":"padded_size:UInt64-instance-method","name":"padded_size","doc":"Returns the padded size of this struct. Simply put, this is how\nmuch bytes you'd need to allocate for this struct layout.","summary":"Returns the padded size of this struct.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":554,"url":null},"def":{"name":"padded_size","return_type":"UInt64","visibility":"Public","body":"@padded_size"}},{"html_id":"reference-instance-method","name":"reference","doc":"Returns a struct reference type layed out according to this struct\nlayout. You can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.reference`\ninstead of saving it in a variable and using that variable.","summary":"Returns a struct reference type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":674,"url":null},"def":{"name":"reference","visibility":"Public","body":"StructReferenceType.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":696,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive(:to_s) do\n io << \"⟪\"\n @fields.join(io, \", \") do |field, io|\n ((io << field.id) << \"=\") << field.type\n end\n io << \"⟫\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"union-instance-method","name":"union","doc":"Returns a union type layed out according to this struct layout.\nYou can then use it in your struct field / argument types.\n\nNote: this method costs nothing. Feel free to spam `.union`\ninstead of saving it in a variable and using that variable.","summary":"Returns a union type layed out according to this struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":692,"url":null},"def":{"name":"union","visibility":"Public","body":"UnionType.new(self)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceType","path":"Novika/FFI/StructReferenceType.html","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":750,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct (like Crystal `class`).","summary":"Type-side representation of a struct reference, aka struct pointer, aka heap-allocated struct (like Crystal class
).
Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":751,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"matches?(pointer:UntypedPointer)-instance-method","name":"matches?","abstract":false,"args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"args_string":"(pointer : UntypedPointer)","args_html":"(pointer : UntypedPointer)","location":{"filename":"src/novika/ffi.cr","line_number":772,"url":null},"def":{"name":"matches?","args":[{"name":"pointer","external_name":"pointer","restriction":"UntypedPointer"}],"visibility":"Public","body":"pointer.none?"}},{"html_id":"matches?(view:StructReferenceView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"args_string":"(view : StructReferenceView) : Bool","args_html":"(view : StructReferenceView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":768,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"StructReferenceView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":764,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":776,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"&\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":755,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"StructReferenceView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/StructReferenceView","path":"Novika/FFI/StructReferenceView.html","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":922,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a struct reference, aka struct\npointer, aka heap-allocated struct. Allows to read and write\nfields (see `StructView`). Similar to the `->` operator in C.","summary":"Value-side representation of a struct reference, aka struct pointer, aka heap-allocated struct.
","instance_methods":[{"html_id":"==(other:StructReferenceView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"args_string":"(other : StructReferenceView)","args_html":"(other : StructReferenceView)","location":{"filename":"src/novika/ffi.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructReferenceView"}],"visibility":"Public","body":"if @handle == (other.@handle)\n return true\nend\nif size == other.size\nelse\n return false\nend\nresult = false\nexecuted = exec_recursive_by_handle(:==) do\n result = super(other)\nend\nexecuted && result\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":923,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @handle.address)).as(::Pointer(Void))"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":958,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"executed = exec_recursive_by_handle(:to_s) do\n io << \"&⟨\"\n super(io)\n io << \"⟩\"\nend\nif executed\nelse\n io << \"[reflection]\"\nend\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":927,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @handle.address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/StructType","path":"Novika/FFI/StructType.html","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":714,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructType","kind":"struct","full_name":"Novika::FFI::InlineStructType","name":"InlineStructType"},{"html_id":"novika/Novika/FFI/StructReferenceType","kind":"struct","full_name":"Novika::FFI::StructReferenceType","name":"StructReferenceType"},{"html_id":"novika/Novika/FFI/UnionType","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *type* side of structs.","summary":"Base type of the type side of structs.
","constructors":[{"html_id":"new(layout:StructLayout)-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"args_string":"(layout : StructLayout)","args_html":"(layout : StructLayout)","location":{"filename":"src/novika/ffi.cr","line_number":717,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"StructLayout"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"alignment(*args,**options)-instance-method","name":"alignment","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
Constructs a struct view for this struct type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":739,"url":null},"def":{"name":"make!","return_type":"StructView","visibility":"Public","body":"view_for(Pointer(Void).malloc(@layout.padded_size))"}},{"html_id":"padded_size(*args,**options)-instance-method","name":"padded_size","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See StructLayout
.
See StructLayout
.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":true,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":725,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/FFI/StructView","path":"Novika/FFI/StructView.html","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":853,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"subclasses":[{"html_id":"novika/Novika/FFI/InlineStructView","kind":"struct","full_name":"Novika::FFI::InlineStructView","name":"InlineStructView"},{"html_id":"novika/Novika/FFI/StructReferenceView","kind":"struct","full_name":"Novika::FFI::StructReferenceView","name":"StructReferenceView"},{"html_id":"novika/Novika/FFI/UnionView","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Base type of the *value* side of structs.\n\nImplements `Indexable` and `Indexable::Mutable` over the fields in\nthe struct, allowing you to iterate, read, and change them (with\nsome casting from and to `ForeignValue` though.)","summary":"Base type of the value side of structs.
","constructors":[{"html_id":"new(layout:Novika::FFI::StructLayout,handle:Pointer(Void))-class-method","name":"new","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","args_html":"(layout : Novika::FFI::StructLayout, handle : Pointer(Void))","location":{"filename":"src/novika/ffi.cr","line_number":861,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, handle)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:StructView)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StructView"}],"args_string":"(other : StructView)","args_html":"(other : StructView)","location":{"filename":"src/novika/ffi.cr","line_number":912,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"StructView"}],"visibility":"Public","body":"equals?(other) do |a, b|\n a == b\nend"}},{"html_id":"[](id:String)-instance-method","name":"[]","doc":"Returns the value of a field with the given *id*entifier.\nDies if there is no such field.","summary":"Returns the value of a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":889,"url":null},"def":{"name":"[]","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"unsafe_fetch(@layout.index(id))"}},{"html_id":"[]=(id:String,value:ForeignValue)-instance-method","name":"[]=","doc":"Assigns *value* to a field with the given *id*entifier.","summary":"Assigns value to a field with the given identifier.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(id : String, value : ForeignValue)","args_html":"(id : String, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":883,"url":null},"def":{"name":"[]=","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"unsafe_put(@layout.index(id), value)"}},{"html_id":"[]?(id:String)-instance-method","name":"[]?","doc":"Returns the value of a field with the given *id*entifier,\nor nil if there is no such field.","summary":"Returns the value of a field with the given identifier, or nil if there is no such field.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/ffi.cr","line_number":895,"url":null},"def":{"name":"[]?","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"if index = @layout.index?(id)\n unsafe_fetch(index)\nend"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the pointer address of the struct this view refers to.","summary":"Returns the pointer address of the struct this view refers to.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/ffi.cr","line_number":868,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"has_field?(*args,**options)-instance-method","name":"has_field?","doc":"See `StructLayout`.","summary":"See StructLayout
.
See StructLayout
.
See Object#hash(hasher)
Returns this view's struct layout.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":859,"url":null},"def":{"name":"layout","return_type":"StructLayout","visibility":"Public","body":"@layout"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":870,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_form?:Form|Nil-instance-method","name":"to_form?","doc":"Determines the best form type to represent this foreign\nvalue, then builds and returns a form of that type.\n\nReturns nil if *value* is nothing.","summary":"Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":901,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"StructViewForm.new(self)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":905,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@layout.each_desc_with_index do |desc, index|\n ((io << desc.id) << \"=\") << (unsafe_fetch(index))\n if index == (@layout.field_count - 1)\n else\n io << \", \"\n end\nend"}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":878,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"(@layout.desc(index)).fetch!(@handle)"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":874,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"(@layout.desc(index)).put!(@handle, value)"}}]},{"html_id":"novika/Novika/FFI/TypeParser","path":"Novika/FFI/TypeParser.html","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":67,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/FFI/DefaultTypeParser","kind":"struct","full_name":"Novika::FFI::DefaultTypeParser","name":"DefaultTypeParser"},{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"An object used to translate `Word`s (representing a foreign type)\ninto actual `ForeignType`s.","summary":"An object used to translate Word
s (representing a foreign type) into actual ForeignType
s.
Initializes a parser object from this, a block that will be asked for word definitions in case they are needed, and typename, which is the word-to-be-parsed itself.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"args_string":"(this : Block, typename : Word)","args_html":"(this : Block, typename : Word)","location":{"filename":"src/novika/ffi.cr","line_number":78,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"typename","external_name":"typename","restriction":"Word"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":92,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.inline"}},{"html_id":"on_primitive(type:ForeignType):ForeignType-instance-method","name":"on_primitive","doc":"Primitive *type* middleware.","summary":"Primitive type middleware.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"args_string":"(type : ForeignType) : ForeignType","args_html":"(type : ForeignType) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":82,"url":null},"def":{"name":"on_primitive","args":[{"name":"type","external_name":"type","restriction":"ForeignType"}],"return_type":"ForeignType","visibility":"Public","body":"type"}},{"html_id":"on_struct_reference(form:StructLayoutForm):ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":97,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.reference"}},{"html_id":"on_union(form:StructLayoutForm):ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : ForeignType","args_html":"(form : StructLayoutForm) : ForeignType","location":{"filename":"src/novika/ffi.cr","line_number":87,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"ForeignType","visibility":"Public","body":"form.layout.union"}},{"html_id":"parse:ForeignType-instance-method","name":"parse","doc":"Performs the parsing. Returns the resulting type.","summary":"Performs the parsing.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":102,"url":null},"def":{"name":"parse","return_type":"ForeignType","visibility":"Public","body":"case @typename.id\nwhen \"u8\"\n return on_primitive(U8)\nwhen \"u16\"\n return on_primitive(U16)\nwhen \"u32\"\n return on_primitive(U32)\nwhen \"u64\"\n return on_primitive(U64)\nwhen \"i8\"\n return on_primitive(I8)\nwhen \"i16\"\n return on_primitive(I16)\nwhen \"i32\"\n return on_primitive(I32)\nwhen \"i64\"\n return on_primitive(I64)\nwhen \"f32\"\n return on_primitive(F32)\nwhen \"f64\"\n return on_primitive(F64)\nwhen \"cstr\"\n return on_primitive(Cstr)\nwhen \"char\"\n return on_primitive(Cchar)\nwhen \"pointer\"\n return on_primitive(UntypedPointer)\nwhen \"nothing\"\n return on_primitive(Nothing)\nwhen .prefixed_by?('?')\n handler = ->on_union(StructLayoutForm)\nwhen .prefixed_by?('~')\n handler = ->on_inline_struct(StructLayoutForm)\nwhen .prefixed_by?('&')\n handler = ->on_struct_reference(StructLayoutForm)\nelse\n @typename.die(\"could not recognize foreign type. Did you mean ⸢~#{@typename}⸥ (inline struct), ⸢{@typename}⸥ (reference to struct), or ⸢?#{@typename}⸥ (union)?\")\nend\nraw = Word.new(@typename.id.lchop)\nform = @this.form_for(raw)\nif form.is_a?(StructLayoutForm)\nelse\n @typename.die(\"expected struct layout to be value form, not: #{form.class.typedesc}\")\nend\nhandler.call(form)\n"}}],"types":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","path":"Novika/FFI/TypeParser/ForbidsNothing.html","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing","abstract":false,"locations":[{"filename":"src/novika/ffi.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/FFI/ValueTypeParser","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser"},{"html_id":"novika/Novika/StructLayoutParser","kind":"struct","full_name":"Novika::StructLayoutParser","name":"StructLayoutParser"}],"namespace":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"doc":"If included, the parser would die upon encountering `nothing`.","summary":"If included, the parser would die upon encountering nothing
.
Type-side and value-side representation of UInt16
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt16).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u16\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":229,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt16))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U32","path":"Novika/FFI/U32.html","kind":"struct","full_name":"Novika::FFI::U32","name":"U32","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":230,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt32`.","summary":"Type-side and value-side representation of UInt32
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt32).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u32\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":230,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt32))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U64","path":"Novika/FFI/U64.html","kind":"struct","full_name":"Novika::FFI::U64","name":"U64","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":231,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt64`.","summary":"Type-side and value-side representation of UInt64
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u64\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":231,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/U8","path":"Novika/FFI/U8.html","kind":"struct","full_name":"Novika::FFI::U8","name":"U8","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":228,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of `UInt8`.","summary":"Type-side and value-side representation of UInt8
.
Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt8).malloc(1, @value)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(to_crystal)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << @value) << \"_u8\""}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":228,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt8))).value = @value\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UnionType","path":"Novika/FFI/UnionType.html","kind":"struct","full_name":"Novika::FFI::UnionType","name":"UnionType","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},"ancestors":[{"html_id":"novika/Novika/FFI/StructType","kind":"struct","full_name":"Novika::FFI::StructType","name":"StructType"},{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Type-side* representation of a union.","summary":"Type-side representation of a union.
","instance_methods":[{"html_id":"alloc:Pointer(Void)-instance-method","name":"alloc","doc":"Allocates memory for this type. Returns a pointer to that memory.","summary":"Allocates memory for this type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":822,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"Pointer(Void).malloc(self.sizeof)"}},{"html_id":"matches?(view:UnionView):Bool-instance-method","name":"matches?","abstract":false,"args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"args_string":"(view : UnionView) : Bool","args_html":"(view : UnionView) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":838,"url":null},"def":{"name":"matches?","args":[{"name":"view","external_name":"view","restriction":"UnionView"}],"return_type":"Bool","visibility":"Public","body":"@layout.same?(view.layout)"}},{"html_id":"sizeof:UInt64-instance-method","name":"sizeof","doc":"Returns the size of this type, in bytes.","summary":"Returns the size of this type, in bytes.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":818,"url":null},"def":{"name":"sizeof","return_type":"UInt64","visibility":"Public","body":"@layout.max_field_size"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-instance-method","name":"to_ffi_type","doc":"Returns the corresponding LibFFI type.","summary":"Returns the corresponding LibFFI type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":834,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":842,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"⋃\"\nsuper(io)\n"}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-instance-method","name":"unbox","doc":"Retrieves `ForeignValue` of this type from the given void\npointer *box*.","summary":"Retrieves ForeignValue
of this type from the given void pointer box.
Returns the struct view corresponding to this struct type, wrapped around the given handle.
","abstract":false,"args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"args_string":"(handle : Pointer(Void)) : StructView","args_html":"(handle : Pointer(Void)) : StructView","location":{"filename":"src/novika/ffi.cr","line_number":826,"url":null},"def":{"name":"view_for","args":[{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"}],"return_type":"StructView","visibility":"Public","body":"UnionView.new(@layout, handle)"}}]},{"html_id":"novika/Novika/FFI/UnionView","path":"Novika/FFI/UnionView.html","kind":"struct","full_name":"Novika::FFI::UnionView","name":"UnionView","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},"ancestors":[{"html_id":"novika/Novika/FFI/StructView","kind":"struct","full_name":"Novika::FFI::StructView","name":"StructView"},{"html_id":"novika/Indexable/Mutable","kind":"module","full_name":"Indexable::Mutable","name":"Mutable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Indexable","kind":"module","full_name":"Indexable","name":"Indexable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":992,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"*Value-side* representation of a union.","summary":"Value-side representation of a union.
","instance_methods":[{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1008,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"size-instance-method","name":"size","doc":"Returns the number of elements in this container.","summary":"Returns the number of elements in this container.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":993,"url":null},"def":{"name":"size","visibility":"Public","body":"@layout.field_count"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":1018,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"(⋃ \") << @layout) << \")\""}},{"html_id":"unsafe_fetch(index:Int)-instance-method","name":"unsafe_fetch","doc":"Returns the element at the given *index*, without doing any bounds check.\n\n`Indexable` makes sure to invoke this method with *index* in `0...size`,\nso converting negative indices to positive ones is not needed here.\n\nClients never invoke this method directly. Instead, they access\nelements with `#[](index)` and `#[]?(index)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Returns the element at the given index, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"}],"args_string":"(index : Int)","args_html":"(index : Int)","location":{"filename":"src/novika/ffi.cr","line_number":1003,"url":null},"def":{"name":"unsafe_fetch","args":[{"name":"index","external_name":"index","restriction":"Int"}],"visibility":"Public","body":"desc = @layout.desc(index)\ndesc.type.unbox(@handle)\n"}},{"html_id":"unsafe_put(index:Int,value:ForeignValue)-instance-method","name":"unsafe_put","doc":"Sets the element at the given *index* to *value*, without doing any bounds\ncheck.\n\n`Indexable::Mutable` makes sure to invoke this method with *index* in\n`0...size`, so converting negative indices to positive ones is not needed\nhere.\n\nClients never invoke this method directly. Instead, they modify elements\nwith `#[]=(index, value)`.\n\nThis method should only be directly invoked if you are absolutely\nsure the index is in bounds, to avoid a bounds check for a small boost\nof performance.","summary":"Sets the element at the given index to value, without doing any bounds check.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"args_string":"(index : Int, value : ForeignValue)","args_html":"(index : Int, value : ForeignValue)","location":{"filename":"src/novika/ffi.cr","line_number":997,"url":null},"def":{"name":"unsafe_put","args":[{"name":"index","external_name":"index","restriction":"Int"},{"name":"value","external_name":"value","restriction":"ForeignValue"}],"visibility":"Public","body":"desc = @layout.desc(index)\nvalue.must_be_of(desc.type)\nvalue.write_to!(@handle)\n"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":1012,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"@handle.move_to(base, @layout.max_field_size)\nbase\n"}}]},{"html_id":"novika/Novika/FFI/UntypedPointer","path":"Novika/FFI/UntypedPointer.html","kind":"struct","full_name":"Novika::FFI::UntypedPointer","name":"UntypedPointer","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":242,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/ForeignValue","kind":"module","full_name":"Novika::FFI::ForeignValue","name":"ForeignValue"}],"extended_modules":[{"html_id":"novika/Novika/FFI/ForeignType","kind":"module","full_name":"Novika::FFI::ForeignType","name":"ForeignType"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Type-side and value-side representation of pointers.","summary":"Type-side and value-side representation of pointers.
","class_methods":[{"html_id":"alloc:Pointer(Void)-class-method","name":"alloc","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":264,"url":null},"def":{"name":"alloc","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, 0)).as(::Pointer(Void))"}},{"html_id":"from?(form:Hole)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Hole"}],"args_string":"(form : Hole)","args_html":"(form : Hole)","location":{"filename":"src/novika/ffi.cr","line_number":268,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Hole"}],"visibility":"Public","body":"new(form.address)"}},{"html_id":"from?(form:StructViewForm)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"args_string":"(form : StructViewForm)","args_html":"(form : StructViewForm)","location":{"filename":"src/novika/ffi.cr","line_number":272,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"StructViewForm"}],"visibility":"Public","body":"if view = form.view.as?(StructReferenceView)\nelse\n raise(Error.new(\"cannot implicitly take pointer of struct view that is not a reference struct view\"))\nend\nnew(view.address)\n"}},{"html_id":"from?(form:Decimal)-class-method","name":"from?","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/ffi.cr","line_number":282,"url":null},"def":{"name":"from?","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"new(form)"}},{"html_id":"matches?(value:UntypedPointer):Bool-class-method","name":"matches?","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"args_string":"(value : UntypedPointer) : Bool","args_html":"(value : UntypedPointer) : Bool","location":{"filename":"src/novika/ffi.cr","line_number":317,"url":null},"def":{"name":"matches?","args":[{"name":"value","external_name":"value","restriction":"UntypedPointer"}],"return_type":"Bool","visibility":"Public","body":"true"}},{"html_id":"none-class-method","name":"none","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":252,"url":null},"def":{"name":"none","visibility":"Public","body":"new(0)"}},{"html_id":"to_ffi_type:Crystal::FFI::Type-class-method","name":"to_ffi_type","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":321,"url":null},"def":{"name":"to_ffi_type","return_type":"Crystal::FFI::Type","visibility":"Public","body":"Crystal::FFI::Type.pointer"}},{"html_id":"to_s(io)-class-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":305,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"pointer\""}},{"html_id":"unbox(box:Pointer(Void)):ForeignValue-class-method","name":"unbox","abstract":false,"args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"args_string":"(box : Pointer(Void)) : ForeignValue","args_html":"(box : Pointer(Void)) : ForeignValue","location":{"filename":"src/novika/ffi.cr","line_number":309,"url":null},"def":{"name":"unbox","args":[{"name":"box","external_name":"box","restriction":"::Pointer(Void)"}],"return_type":"ForeignValue","visibility":"Public","body":"if box.null?\n raise(Error.new(\"attempt to unbox none (C nullptr)\"))\nend\nUntypedPointer.new((box.as(::Pointer(UInt64))).value)\n"}}],"constructors":[{"html_id":"new(decimal)-class-method","name":"new","abstract":false,"args":[{"name":"decimal","external_name":"decimal","restriction":""}],"args_string":"(decimal)","args_html":"(decimal)","location":{"filename":"src/novika/ffi.cr","line_number":248,"url":null},"def":{"name":"new","args":[{"name":"decimal","external_name":"decimal","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(decimal)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @address == (other.@address)\nelse\n return false\nend\ntrue\n"}},{"html_id":"box:Pointer(Void)-instance-method","name":"box","doc":"Wraps this value in a void pointer.","summary":"Wraps this value in a void pointer.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":286,"url":null},"def":{"name":"box","return_type":"::Pointer(Void)","visibility":"Public","body":"(Pointer(UInt64).malloc(1, @address)).as(::Pointer(Void))"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Determines the best form type to represent this foreign value, then builds and returns a form of that type.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":260,"url":null},"def":{"name":"to_form?","return_type":"Form | ::Nil","visibility":"Public","body":"Decimal.new(@address)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/ffi.cr","line_number":295,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if none?\n io << \"(none)\"\nelse\n io << \"(0x\"\n @address.to_s(io, base: 16)\n io << \")\"\nend"}},{"html_id":"write_to!(base:Pointer(Void)):Pointer(Void)-instance-method","name":"write_to!","doc":"Writes this value starting at the given *base* pointer.\nReturns the *base* pointer.","summary":"Writes this value starting at the given base pointer.
","abstract":false,"args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"args_string":"(base : Pointer(Void)) : Pointer(Void)","args_html":"(base : Pointer(Void)) : Pointer(Void)","location":{"filename":"src/novika/ffi.cr","line_number":290,"url":null},"def":{"name":"write_to!","args":[{"name":"base","external_name":"base","restriction":"::Pointer(Void)"}],"return_type":"::Pointer(Void)","visibility":"Public","body":"(base.as(::Pointer(UInt64))).value = @address\nbase\n"}}]},{"html_id":"novika/Novika/FFI/ValueTypeParser","path":"Novika/FFI/ValueTypeParser.html","kind":"struct","full_name":"Novika::FFI::ValueTypeParser","name":"ValueTypeParser","abstract":false,"superclass":{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},"ancestors":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"},{"html_id":"novika/Novika/FFI/TypeParser","kind":"struct","full_name":"Novika::FFI::TypeParser","name":"TypeParser"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/ffi.cr","line_number":159,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/FFI/TypeParser/ForbidsNothing","kind":"module","full_name":"Novika::FFI::TypeParser::ForbidsNothing","name":"ForbidsNothing"}],"namespace":{"html_id":"novika/Novika/FFI","kind":"module","full_name":"Novika::FFI","name":"FFI"},"doc":"Same as `DefaultTypeParser`, but forbids nothing.\n\n```\n# this : Block\n\nparser = ValueTypeParser.new(this, Word.new(\"i32\"))\nparser.parse # => I32\n\n# ...\n\nparser = ValueTypeParser.new(this, Word.new(\"nothing\"))\nparser.parse # Dies: nothing is not a value type.\n```","summary":"Same as DefaultTypeParser
, but forbids nothing.
Calls a variadic C function.
","constructors":[{"html_id":"new(id:String,handle:Pointer(Void),fixed_arg_types:Array(ForeignType),var_arg_allowed:Array(ForeignType),return_type:ForeignType)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"args_string":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","args_html":"(id : String, handle : Pointer(Void), fixed_arg_types : Array(ForeignType), var_arg_allowed : Array(ForeignType), return_type : ForeignType)","location":{"filename":"src/novika/ffi.cr","line_number":1071,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"},{"name":"handle","external_name":"handle","restriction":"::Pointer(Void)"},{"name":"fixed_arg_types","external_name":"fixed_arg_types","restriction":"Array(ForeignType)"},{"name":"var_arg_allowed","external_name":"var_arg_allowed","restriction":"Array(ForeignType)"},{"name":"return_type","external_name":"return_type","restriction":"ForeignType"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id, handle, fixed_arg_types, var_arg_allowed, return_type)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"call(block:Block):Form|Nil-instance-method","name":"call","doc":"Drops arguments from *block* and calls this function.\nReturns the resulting form, or nil in case this function\nreturns `Nothing` (C `void`).","summary":"Drops arguments from block and calls this function.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : Form | Nil","args_html":"(block : Block) : Form | Nil","location":{"filename":"src/novika/ffi.cr","line_number":1080,"url":null},"def":{"name":"call","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"Form | ::Nil","visibility":"Public","body":"var_args_block = block.drop.a(Block)\nnargs_total = @fixed_arg_types.size + var_args_block.count\nffi_args = Array(ForeignValue).new(nargs_total)\nffi_types = Array(Crystal::FFI::Type).new(nargs_total)\n@fixed_arg_types.reverse_each do |argtype|\n ffi_types.unshift(argtype.to_ffi_type)\n arg = argtype.from(block.drop)\n arg.must_be_of(argtype)\n ffi_args.unshift(arg)\nend\nvar_args_block.each do |form|\n candidates = @var_arg_allowed.map do |type|\n {type, type.from?(form)}\n end.select do |_, value|\n value\n end\n if candidates.size == 1\n else\n form.die(\"unable to convert to foreign value: too many or no type candidates for form. Make sure you've specified the corresponding foreign type in the variadic function's list of allowed types, and no conflicts between types exist (e.g. both i32 and i64; this is currently unsupported)\")\n end\n candidate = candidates[0]\n candidate_type, candidate_value = candidate\n candidate_value = candidate_value.not_nil!\n ffi_types << candidate_type.to_ffi_type\n ffi_args << candidate_value\nend\nffi_args.each do |arg|\n case arg\n when U8, U16, I8, I16\n block.die(\"bad argtype in variadic call: promote to i32 first: #{arg}\")\n when F32\n block.die(\"bad argtype in variadic call: promote to f64 first: #{arg}\")\n end\nend\ncif = Crystal::FFI::CallInterface.variadic(return_type: @return_type.to_ffi_type, arg_types: ffi_types, fixed_args: @fixed_arg_types.size)\ncargs = Pointer(::Pointer(Void)).malloc(ffi_args.size) do |index|\n ffi_args[index].box\nend\ncreturn = Pointer(Void).malloc(@return_type.sizeof)\ncif.call(@handle, cargs, creturn)\n(@return_type.unbox(creturn)).to_form?\n"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this function.","summary":"Returns the identifier of this function.
","abstract":false,"location":{"filename":"src/novika/ffi.cr","line_number":1069,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}}]}]},{"html_id":"novika/Novika/ForeignFunction","path":"Novika/ForeignFunction.html","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::Function`.","summary":"A thin wrapper around FFI::Function
.
Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":12,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"stack = engine.stack\nvalue = @function.call(stack)\nvalue.try(&.onto(stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":29,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign function: \") << @function.id) << \"]\""}}]},{"html_id":"novika/Novika/Form","path":"Novika/Form.html","kind":"module","full_name":"Novika::Form","name":"Form","abstract":false,"ancestors":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":98,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Builtin","kind":"struct","full_name":"Novika::Builtin","name":"Builtin"},{"html_id":"novika/Novika/Byteslice","kind":"struct","full_name":"Novika::Byteslice","name":"Byteslice"},{"html_id":"novika/Novika/Color","kind":"struct","full_name":"Novika::Color","name":"Color"},{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"},{"html_id":"novika/Novika/Error","kind":"class","full_name":"Novika::Error","name":"Error"},{"html_id":"novika/Novika/ForeignFunction","kind":"struct","full_name":"Novika::ForeignFunction","name":"ForeignFunction"},{"html_id":"novika/Novika/Hole","kind":"struct","full_name":"Novika::Hole","name":"Hole"},{"html_id":"novika/Novika/Library","kind":"class","full_name":"Novika::Library","name":"Library"},{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/QuotedWord","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord"},{"html_id":"novika/Novika/StructLayoutForm","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"},{"html_id":"novika/Novika/Word","kind":"struct","full_name":"Novika::Word","name":"Word"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Form is an umbrella for words and blocks. Since some words\n(like numbers, quotes) are just too different from words as\nwe know them, they have their own types directly subordinate\nto Form.\n\nMake sure to override `self.typedesc` to avoid weird unrelated\nCrystal errors. Crystal breaks at class-level inheritance.","summary":"Form is an umbrella for words and blocks.
","instance_methods":[{"html_id":"a(type:T.class):TforallT-instance-method","name":"a","doc":"Asserts that this form is of the given *type*. Dies if\nit's not.","summary":"Asserts that this form is of the given type.
","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"T.class"}],"args_string":"(type : T.class) : T forall T","args_html":"(type : T.class) : T forall T","location":{"filename":"src/novika/forms/form.cr","line_number":146,"url":null},"def":{"name":"a","args":[{"name":"type","external_name":"type","restriction":"T.class"}],"return_type":"T","visibility":"Public","body":"self.is_a?(T) ? self : afail(T)"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/form.cr","line_number":114,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"a form\""}},{"html_id":"desc:String-instance-method","name":"desc","doc":"Returns a string description of this form.","summary":"Returns a string description of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":119,"url":null},"def":{"name":"desc","return_type":"String","visibility":"Public","body":"String.build do |io|\n desc(io)\nend"}},{"html_id":"die(details:String)-instance-method","name":"die","doc":"Raises an `Error` providing *details*.","summary":"Raises an Error
providing details.
Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/form.cr","line_number":162,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"effect-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":167,"url":null},"def":{"name":"effect","visibility":"Public","body":"String.build do |io|\n effect(io)\nend"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":130,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"on_parent_open(engine)"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/form.cr","line_number":135,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"onto(engine.stack)"}},{"html_id":"onto(block:Block):self-instance-method","name":"onto","doc":"Adds this form to *block*.","summary":"Adds this form to block.
","abstract":false,"args":[{"name":"block","external_name":"block","restriction":"Block"}],"args_string":"(block : Block) : self","args_html":"(block : Block) : self","location":{"filename":"src/novika/forms/form.cr","line_number":140,"url":null},"def":{"name":"onto","args":[{"name":"block","external_name":"block","restriction":"Block"}],"return_type":"self","visibility":"Public","body":"tap do\n block.add(self)\nend"}},{"html_id":"sel(a,b)-instance-method","name":"sel","doc":"Selects either *a* or *b*. Novika defines `False` to be the\nonly form selecting *b*. All other forms select *a*.","summary":"Selects either a or b.
","abstract":false,"args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"args_string":"(a, b)","args_html":"(a, b)","location":{"filename":"src/novika/forms/form.cr","line_number":125,"url":null},"def":{"name":"sel","args":[{"name":"a","external_name":"a","restriction":""},{"name":"b","external_name":"b","restriction":""}],"visibility":"Public","body":"a"}},{"html_id":"to_quote:Quote-instance-method","name":"to_quote","doc":"Returns this form's quote representation.","summary":"Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/form.cr","line_number":151,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"Quote.new(to_s)"}}]},{"html_id":"novika/Novika/Frontend","path":"Novika/Frontend.html","kind":"module","full_name":"Novika::Frontend","name":"Frontend","abstract":false,"locations":[{"filename":"src/common.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"err(message,io=STDERR)-instance-method","name":"err","doc":"Appends a \"sorry\" *message* to *io*","summary":"Appends a "sorry" message to io
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"args_string":"(message, io = STDERR)","args_html":"(message, io = STDERR)","location":{"filename":"src/common.cr","line_number":10,"url":null},"def":{"name":"err","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDERR","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Sorry\".colorize.red.bold) << \": \") << message"}},{"html_id":"errln(message,io=STDERR)-instance-method","name":"errln","doc":"Calls `err`, and appends a newline, both using\nwith *io*.","summary":"Calls #err
, and appends a newline, both using with io.
Appends a "note" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":20,"url":null},"def":{"name":"note","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Note\".colorize.blue.bold) << \": \") << message"}},{"html_id":"noteln(message,io=STDOUT)-instance-method","name":"noteln","doc":"Calls `note`, and appends a newline, both using\nwith *io*.","summary":"Calls #note
, and appends a newline, both using with io.
Appends an "ok" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":15,"url":null},"def":{"name":"ok","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Ok\".colorize.green.bold) << \": \") << message"}},{"html_id":"okln(message,io=STDOUT)-instance-method","name":"okln","doc":"Calls `ok`, and appends a newline, both using\nwith *io*.","summary":"Calls #ok
, and appends a newline, both using with io.
Appends a "wait" message to io.
","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"args_string":"(message, io = STDOUT)","args_html":"(message, io = STDOUT)","location":{"filename":"src/common.cr","line_number":5,"url":null},"def":{"name":"wait","args":[{"name":"message","external_name":"message","restriction":""},{"name":"io","default_value":"STDOUT","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Wait\".colorize.bold) << \": \") << message"}},{"html_id":"wait(msg,*,okokmsg,&)-instance-method","name":"wait","doc":"Issues a `wait` message *msg*, yields, then follows with\nan OK message *okmsg*.","summary":"Issues a #wait
message msg, yields, then follows with an OK message okmsg.
Calls #wait
, and appends a newline, both using with io.
Novika command-line frontend entry point.
","abstract":false,"args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"args_string":"(args = ARGV, cwd = Path[ENV[\"NOVIKA_CWD\"]? || Dir.current])","args_html":"(args = ARGV, cwd = Path[ENV["NOVIKA_CWD"]? || Dir.current])","location":{"filename":"src/cli.cr","line_number":408,"url":null},"def":{"name":"start","args":[{"name":"args","default_value":"ARGV","external_name":"args","restriction":""},{"name":"cwd","default_value":"Path[ENV[\"NOVIKA_CWD\"]? || Dir.current]","external_name":"cwd","restriction":""}],"visibility":"Public","body":"begin\n args = args.dup\n Colorize.enabled = Novika.colorful?\n if args.any?(/^\\-{1,2}:?(?:h(?:elp)?|\\?)$/)\n help(STDOUT)\n exit(0)\n end\n profiler = nil\n dry_list = false\n dry_list_sm = false\n dry_tree = false\n help_mode = false\n abort_on_permission_request = false\n args.reject! do |arg|\n case arg\n when /^\\-:profile(?::([1-9]\\d*))?$/\n profiler = Profiler.new($~[1]?.try(&.to_u64) || 16_u64)\n when /^\\-:dry-list$/\n dry_list = true\n when /^\\-:dry-tree$/\n dry_tree = true\n when /^\\+:dry-list-sm$/\n dry_list_sm = true\n when /^\\-:abort-on-permission-request$/\n abort_on_permission_request = true\n when /^help$/\n help_mode = true\n else\n next false\n end\n true\n end\n profiler.try do |prof|\n Engine.trackers << prof\n end\n resolver = RunnableResolver.new(cwd, args)\n resolver.on_permissions_gets do |string|\n if abort_on_permission_request\n abort\n end\n print(string, \" \")\n gets\n end\n resolver.on_permissions_print do |string|\n print(string)\n end\n resolver.after_container_rewritten do |container|\n if dry_tree\n else\n next\n end\n puts(container)\n end\n resolver.after_response do |hook|\n if dry_tree\n exit(0)\n end\n hook.response.each_ignored_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.note(\"this runnable is not allowed here, and will be ignored: #{runnable}\", io)\n end\n end\n if help_mode\n else\n next\n end\n first = true\n hook.each_queried_for_preamble_with_group do |preamble, group|\n if first\n first = false\n else\n print(\"\\n\\n\")\n end\n puts(preamble)\n end\n if first\n help(STDOUT)\n end\n exit(0)\n end\n resolver.after_program do |hook|\n if dry_list\n else\n next\n end\n if dry_list_sm\n else\n puts(\"--> Showing environment designations (which environment is going to run which file).\\n--> Order matters, and is exactly the execution order.\")\n puts\n end\n hook.each_designation do |designation|\n designation.to_s(STDOUT, sm: dry_list_sm)\n puts\n end\n exit(0)\n end\n resolver.after_permissions do |hook|\n begin\n hook.run\n ensure\n profiler.try do |prof|\n puts(prof.to_table)\n end\n end\n end\n if resolver.resolve?\n else\n help(STDOUT)\n exit(0)\n end\nrescue e : Resolver::RunnableError\n e.runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n exit(1)\nrescue e : Resolver::ResponseRejectedError\n e.response.each_rejected_runnable do |runnable|\n runnable.backtrace(STDERR, indent: 2) do |io|\n Frontend.err(e.message, io)\n end\n end\n exit(1)\nrescue e : Resolver::MoreThanOneAppError\n e.apps.each do |app|\n app.backtrace(STDERR, indent: 2) do |io|\n Frontend.noteln(\"could not run this app because it's not the only one\", io)\n end\n end\n Frontend.errln(e.message)\n exit(1)\nrescue e : Resolver::ResolverError\n Frontend.errln(e.message)\nrescue e : Error\n e.report(STDERR)\n exit(1)\nend"}}],"types":[{"html_id":"novika/Novika/Frontend/CLI/Profiler","path":"Novika/Frontend/CLI/Profiler.html","kind":"class","full_name":"Novika::Frontend::CLI::Profiler","name":"Profiler","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/cli.cr","line_number":16,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/IExhaustTracker","kind":"module","full_name":"Novika::IExhaustTracker","name":"IExhaustTracker"}],"namespace":{"html_id":"novika/Novika/Frontend/CLI","kind":"module","full_name":"Novika::Frontend::CLI","name":"CLI"},"doc":"A crude sample-based profiler which is triggered on every\nform the engine tries to execute.\n\nCounts the amount of times a form was attempted to be open\nby the engine.\n\nYou can use `to_table` to convert a snapshot of data to a\n`Tablo::Table` table.","summary":"A crude sample-based profiler which is triggered on every form the engine tries to execute.
","constructors":[{"html_id":"new(period:UInt64=32_u64)-class-method","name":"new","doc":"Initializes this profiler.\n\n*period* is the period between samples, in Engine loop\nticks. The less the value, the more samples are taken\nand the more precise the results are (but the program\nmay run slower).","summary":"Initializes this profiler.
","abstract":false,"args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"args_string":"(period : UInt64 = 32_u64)","args_html":"(period : UInt64 = 32_u64)","location":{"filename":"src/cli.cr","line_number":48,"url":null},"def":{"name":"new","args":[{"name":"period","default_value":"32_u64","external_name":"period","restriction":"::UInt64"}],"visibility":"Public","body":"_ = allocate\n_.initialize(period)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_form_begin(engine:Engine,form:Form)-instance-method","name":"on_form_begin","doc":"Invoked before *engine* opens the given *form*.","summary":"Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/cli.cr","line_number":64,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if (@ticks - @start) >= @period\nelse\n @ticks = @ticks + 1\n return\nend\nengine.each_active_block do |block|\n profile = @profiles[repr = encode(block)]\n profile.sample\n @profiles[repr] = profile\nend\n@start = @ticks\n@ticks = @ticks + 1\n"}},{"html_id":"to_table(cutoff=0.01)-instance-method","name":"to_table","doc":"Assembles and returns the data from this profiler as\na `Tablo::Table`.\n\n*cutoff* specifies the ratio [0-1] below which profiles\nshould be rejected (i.e., too insignificant).","summary":"Assembles and returns the data from this profiler as a Tablo::Table
.
Represents a profile entry.
","constructors":[{"html_id":"new(str:String)-class-method","name":"new","abstract":false,"args":[{"name":"str","external_name":"str","restriction":"String"}],"args_string":"(str : String)","args_html":"(str : String)","location":{"filename":"src/cli.cr","line_number":21,"url":null},"def":{"name":"new","args":[{"name":"str","external_name":"str","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(str)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"<=>(other:Profile)-instance-method","name":"<=>","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Profile"}],"args_string":"(other : Profile)","args_html":"(other : Profile)","location":{"filename":"src/cli.cr","line_number":25,"url":null},"def":{"name":"<=>","args":[{"name":"other","external_name":"other","restriction":"Profile"}],"visibility":"Public","body":"@samples <=> (other.@samples)"}},{"html_id":"ratio(whole:Float64)-instance-method","name":"ratio","abstract":false,"args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"args_string":"(whole : Float64)","args_html":"(whole : Float64)","location":{"filename":"src/cli.cr","line_number":33,"url":null},"def":{"name":"ratio","args":[{"name":"whole","external_name":"whole","restriction":"Float64"}],"visibility":"Public","body":"@samples / whole"}},{"html_id":"sample-instance-method","name":"sample","abstract":false,"location":{"filename":"src/cli.cr","line_number":29,"url":null},"def":{"name":"sample","visibility":"Public","body":"@samples = @samples + 1"}},{"html_id":"to_row?(nperiods)-instance-method","name":"to_row?","abstract":false,"args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"args_string":"(nperiods)","args_html":"(nperiods)","location":{"filename":"src/cli.cr","line_number":37,"url":null},"def":{"name":"to_row?","args":[{"name":"nperiods","external_name":"nperiods","restriction":""}],"visibility":"Public","body":"[@str, @samples]"}}]}]}]},{"html_id":"novika/Novika/Frontend/Nkas","path":"Novika/Frontend/Nkas.html","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas","abstract":false,"locations":[{"filename":"src/nkas.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Frontend/Nkas","kind":"module","full_name":"Novika::Frontend::Nkas","name":"Nkas"}],"namespace":{"html_id":"novika/Novika/Frontend","kind":"module","full_name":"Novika::Frontend","name":"Frontend"},"instance_methods":[{"html_id":"help(io)-instance-method","name":"help","doc":"Appends information about the tool to *io*.","summary":"Appends information about the tool to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/nkas.cr","line_number":8,"url":null},"def":{"name":"help","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"nkas - Novika image assembler for Novika #{Novika::VERSION}\\n\\nSyntax:\\n\\n nkas [switches] [queries]Holds all information about a block.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock]","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 2, cls: Novika::FrozenBlock, onlyif: nil, verify: nil}, {type: \"basic\", name: id, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: \"group\", name: tape, cls: Tape, onlyif: -> do\n has_tape\nend, verify: nil, value: nil}, {type: \"group\", name: dict, cls: Dict, onlyif: -> do\n has_dict\nend, verify: nil, value: nil}, {type: \"group\", name: friends, cls: Friends, onlyif: -> do\n has_friends\nend, verify: nil, value: nil}, {type: \"basic\", name: parent, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n has_parent\nend, verify: nil, value: nil}, {type: \"basic\", name: prototype, cls: BlockRefSnapshot | ::Nil, onlyif: -> do\n is_instance\nend, verify: nil, value: nil}, {type: \"string\", name: comment, cls: String, onlyif: -> do\n has_comment\nend, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(id,tape,dict,friends,parent,prototype,comment)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"args_string":"(id, tape, dict, friends, parent, prototype, comment)","args_html":"(id, tape, dict, friends, parent, prototype, comment)","location":{"filename":"src/novika/image.cr","line_number":487,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":""},{"name":"tape","external_name":"tape","restriction":""},{"name":"dict","external_name":"dict","restriction":""},{"name":"friends","external_name":"friends","restriction":""},{"name":"parent","external_name":"parent","restriction":""},{"name":"prototype","external_name":"prototype","restriction":""},{"name":"comment","external_name":"comment","restriction":""}],"visibility":"Public","body":"frozen = new\nfrozen.id = id\nfrozen.has_tape = !(!tape)\nif tape\n frozen.tape.cursor = tape.cursor.to_u32\n frozen.tape.substrate = [] of TypedSnapshot\n tape.each do |form|\n if ts = TypedSnapshot.new(form)\n frozen.tape.substrate << ts\n end\n end\nend\nfrozen.has_dict = !(!dict)\nif dict\n frozen.dict.entries = [] of FrozenEntry\n dict.each do |key, entry|\n frozen.dict.entries << (FrozenEntry.new(key, entry))\n end\nend\nfrozen.has_friends = !(!friends)\nif friends\n frozen.friends.refs = [] of BlockRefSnapshot\n friends.each do |friend|\n friend = friend.as(Block)\n frozen.friends.refs << (BlockRefSnapshot.new(friend.object_id))\n end\nend\nfrozen.has_parent = !(!parent)\nif parent\n frozen.parent = BlockRefSnapshot.new(parent.object_id)\nend\nfrozen.is_instance = !(!prototype)\nif prototype\n frozen.prototype = BlockRefSnapshot.new(prototype.object_id)\nend\nfrozen.has_comment = !(!comment)\nif comment\n frozen.comment = comment\nend\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":422,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"comment:String-instance-method","name":"comment","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"def":{"name":"comment","return_type":"String","visibility":"Public","body":"@comment"}},{"html_id":"comment=(comment:String)-instance-method","name":"comment=","doc":"Holds the string comment, if one exists.","summary":"Holds the string comment, if one exists.
","abstract":false,"args":[{"name":"comment","external_name":"comment","restriction":"String"}],"args_string":"(comment : String)","args_html":"(comment : String)","def":{"name":"comment=","args":[{"name":"comment","external_name":"comment","restriction":"String"}],"visibility":"Public","body":"@comment = comment"}},{"html_id":"dict:Novika::FrozenBlock::Dict-instance-method","name":"dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"dict","visibility":"Public","body":"@dict"}},{"html_id":"dict=(dict:Novika::FrozenBlock::Dict)-instance-method","name":"dict=","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"args_string":"(dict : Novika::FrozenBlock::Dict)","args_html":"(dict : Novika::FrozenBlock::Dict)","def":{"name":"dict=","args":[{"name":"dict","external_name":"dict","restriction":"::Novika::FrozenBlock::Dict"}],"visibility":"Public","body":"@dict = dict"}},{"html_id":"friends:Novika::FrozenBlock::Friends-instance-method","name":"friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"friends","visibility":"Public","body":"@friends"}},{"html_id":"friends=(friends:Novika::FrozenBlock::Friends)-instance-method","name":"friends=","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"args_string":"(friends : Novika::FrozenBlock::Friends)","args_html":"(friends : Novika::FrozenBlock::Friends)","def":{"name":"friends=","args":[{"name":"friends","external_name":"friends","restriction":"::Novika::FrozenBlock::Friends"}],"visibility":"Public","body":"@friends = friends"}},{"html_id":"has_comment:Bool-instance-method","name":"has_comment","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment","return_type":"Bool","visibility":"Public","body":"@has_comment == 1"}},{"html_id":"has_comment=(has_comment:UInt8)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"args_string":"(has_comment : UInt8)","args_html":"(has_comment : UInt8)","def":{"name":"has_comment=","args":[{"name":"has_comment","external_name":"has_comment","restriction":"UInt8"}],"visibility":"Public","body":"@has_comment = has_comment"}},{"html_id":"has_comment=(value:Bool)-instance-method","name":"has_comment=","doc":"Whether this block has a comment.","summary":"Whether this block has a comment.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":437,"url":null},"def":{"name":"has_comment=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_comment = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_dict:Bool-instance-method","name":"has_dict","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict","return_type":"Bool","visibility":"Public","body":"@has_dict == 1"}},{"html_id":"has_dict=(has_dict:UInt8)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"args_string":"(has_dict : UInt8)","args_html":"(has_dict : UInt8)","def":{"name":"has_dict=","args":[{"name":"has_dict","external_name":"has_dict","restriction":"UInt8"}],"visibility":"Public","body":"@has_dict = has_dict"}},{"html_id":"has_dict=(value:Bool)-instance-method","name":"has_dict=","doc":"Whether this block has a dictionary.","summary":"Whether this block has a dictionary.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":428,"url":null},"def":{"name":"has_dict=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_dict = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_friends:Bool-instance-method","name":"has_friends","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends","return_type":"Bool","visibility":"Public","body":"@has_friends == 1"}},{"html_id":"has_friends=(has_friends:UInt8)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"args_string":"(has_friends : UInt8)","args_html":"(has_friends : UInt8)","def":{"name":"has_friends=","args":[{"name":"has_friends","external_name":"has_friends","restriction":"UInt8"}],"visibility":"Public","body":"@has_friends = has_friends"}},{"html_id":"has_friends=(value:Bool)-instance-method","name":"has_friends=","doc":"Whether this block has friends.","summary":"Whether this block has friends.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":430,"url":null},"def":{"name":"has_friends=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_friends = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_parent:Bool-instance-method","name":"has_parent","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent","return_type":"Bool","visibility":"Public","body":"@has_parent == 1"}},{"html_id":"has_parent=(has_parent:UInt8)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"args_string":"(has_parent : UInt8)","args_html":"(has_parent : UInt8)","def":{"name":"has_parent=","args":[{"name":"has_parent","external_name":"has_parent","restriction":"UInt8"}],"visibility":"Public","body":"@has_parent = has_parent"}},{"html_id":"has_parent=(value:Bool)-instance-method","name":"has_parent=","doc":"Whether this block has a parent.","summary":"Whether this block has a parent.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":432,"url":null},"def":{"name":"has_parent=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_parent = UInt8.new(value ? 1 : 0)"}},{"html_id":"has_tape:Bool-instance-method","name":"has_tape","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape","return_type":"Bool","visibility":"Public","body":"@has_tape == 1"}},{"html_id":"has_tape=(has_tape:UInt8)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"args_string":"(has_tape : UInt8)","args_html":"(has_tape : UInt8)","def":{"name":"has_tape=","args":[{"name":"has_tape","external_name":"has_tape","restriction":"UInt8"}],"visibility":"Public","body":"@has_tape = has_tape"}},{"html_id":"has_tape=(value:Bool)-instance-method","name":"has_tape=","doc":"Whether this block has tape.","summary":"Whether this block has tape.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"has_tape=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@has_tape = UInt8.new(value ? 1 : 0)"}},{"html_id":"id:UInt64-instance-method","name":"id","doc":"Block identifier (`BlockRefSnapshot`s will refer to\nthis frozen block by this identifier).","summary":"Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Block identifier (BlockRefSnapshot
s will refer to this frozen block by this identifier).
Whether this block is an instance (its prototype is other than itself).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance","return_type":"Bool","visibility":"Public","body":"@is_instance == 1"}},{"html_id":"is_instance=(is_instance:UInt8)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"args_string":"(is_instance : UInt8)","args_html":"(is_instance : UInt8)","def":{"name":"is_instance=","args":[{"name":"is_instance","external_name":"is_instance","restriction":"UInt8"}],"visibility":"Public","body":"@is_instance = is_instance"}},{"html_id":"is_instance=(value:Bool)-instance-method","name":"is_instance=","doc":"Whether this block is an instance (its prototype is other\nthan itself).","summary":"Whether this block is an instance (its prototype is other than itself).
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":435,"url":null},"def":{"name":"is_instance=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@is_instance = UInt8.new(value ? 1 : 0)"}},{"html_id":"parent:BlockRefSnapshot|Nil-instance-method","name":"parent","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"def":{"name":"parent","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@parent"}},{"html_id":"parent=(parent:BlockRefSnapshot|Nil)-instance-method","name":"parent=","doc":"Holds a ref to the parent block, in case there is a parent.","summary":"Holds a ref to the parent block, in case there is a parent.
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(parent : BlockRefSnapshot | Nil)","args_html":"(parent : BlockRefSnapshot | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"prototype:BlockRefSnapshot|Nil-instance-method","name":"prototype","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"def":{"name":"prototype","return_type":"BlockRefSnapshot | ::Nil","visibility":"Public","body":"@prototype"}},{"html_id":"prototype=(prototype:BlockRefSnapshot|Nil)-instance-method","name":"prototype=","doc":"Holds a ref to the block's prototype, in case it is\ndifferent from the block itself.","summary":"Holds a ref to the block's prototype, in case it is different from the block itself.
","abstract":false,"args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"args_string":"(prototype : BlockRefSnapshot | Nil)","args_html":"(prototype : BlockRefSnapshot | Nil)","def":{"name":"prototype=","args":[{"name":"prototype","external_name":"prototype","restriction":"BlockRefSnapshot | ::Nil"}],"visibility":"Public","body":"@prototype = prototype"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"tape:Novika::FrozenBlock::Tape-instance-method","name":"tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"tape","visibility":"Public","body":"@tape"}},{"html_id":"tape=(tape:Novika::FrozenBlock::Tape)-instance-method","name":"tape=","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"args_string":"(tape : Novika::FrozenBlock::Tape)","args_html":"(tape : Novika::FrozenBlock::Tape)","def":{"name":"tape=","args":[{"name":"tape","external_name":"tape","restriction":"::Novika::FrozenBlock::Tape"}],"visibility":"Public","body":"@tape = tape"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds *all* information about a block.","summary":"Holds all information about a block.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":421,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}],"types":[{"html_id":"novika/Novika/FrozenBlock/Dict","path":"Novika/FrozenBlock/Dict.html","kind":"class","full_name":"Novika::FrozenBlock::Dict","name":"Dict","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":459,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Dict]","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n entries.size\nend}, {type: \"array\", name: entries, cls: FrozenEntry, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of dictionary entries.","summary":"Holds the amount of dictionary entries.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"entries:Array(FrozenEntry)-instance-method","name":"entries","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"def":{"name":"entries","return_type":"Array(FrozenEntry)","visibility":"Public","body":"@entries"}},{"html_id":"entries=(entries:Array(FrozenEntry))-instance-method","name":"entries=","doc":"Holds dictionary entries.","summary":"Holds dictionary entries.
","abstract":false,"args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"args_string":"(entries : Array(FrozenEntry))","args_html":"(entries : Array(FrozenEntry))","def":{"name":"entries=","args":[{"name":"entries","external_name":"entries","restriction":"Array(FrozenEntry)"}],"visibility":"Public","body":"@entries = entries"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":459,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's dictionary entries,\nin case it has non-empty dictionary.","summary":"Holds information about the block's dictionary entries, in case it has non-empty dictionary.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Friends","path":"Novika/FrozenBlock/Friends.html","kind":"class","full_name":"Novika::FrozenBlock::Friends","name":"Friends","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":469,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Friends]","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n refs.size\nend}, {type: \"array\", name: refs, cls: BlockRefSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of block friends.","summary":"Holds the amount of block friends.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":469,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"refs:Array(BlockRefSnapshot)-instance-method","name":"refs","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"def":{"name":"refs","return_type":"Array(BlockRefSnapshot)","visibility":"Public","body":"@refs"}},{"html_id":"refs=(refs:Array(BlockRefSnapshot))-instance-method","name":"refs=","doc":"Holds references to block friends.","summary":"Holds references to block friends.
","abstract":false,"args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"args_string":"(refs : Array(BlockRefSnapshot))","args_html":"(refs : Array(BlockRefSnapshot))","def":{"name":"refs=","args":[{"name":"refs","external_name":"refs","restriction":"Array(BlockRefSnapshot)"}],"visibility":"Public","body":"@refs = refs"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds the information about the block's friends, in case\nit has some.","summary":"Holds the information about the block's friends, in case it has some.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/FrozenBlock/Tape","path":"Novika/FrozenBlock/Tape.html","kind":"class","full_name":"Novika::FrozenBlock::Tape","name":"Tape","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":448,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenBlock::Tape]","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: cursor, cls: UInt32, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n substrate.size\nend}, {type: \"array\", name: substrate, cls: TypedSnapshot, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
"}],"namespace":{"html_id":"novika/Novika/FrozenBlock","kind":"class","full_name":"Novika::FrozenBlock","name":"FrozenBlock"},"doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of items in tape's substrate.","summary":"Holds the amount of items in tape's substrate.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"cursor:UInt32-instance-method","name":"cursor","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"def":{"name":"cursor","return_type":"UInt32","visibility":"Public","body":"@cursor"}},{"html_id":"cursor=(cursor:UInt32)-instance-method","name":"cursor=","doc":"Holds the cursor position.","summary":"Holds the cursor position.
","abstract":false,"args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"args_string":"(cursor : UInt32)","args_html":"(cursor : UInt32)","def":{"name":"cursor=","args":[{"name":"cursor","external_name":"cursor","restriction":"UInt32"}],"visibility":"Public","body":"@cursor = cursor"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":448,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::FrozenBlock|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"args_string":"(parent : Novika::FrozenBlock | Nil)","args_html":"(parent : Novika::FrozenBlock | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::FrozenBlock | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"substrate:Array(TypedSnapshot)-instance-method","name":"substrate","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"def":{"name":"substrate","return_type":"Array(TypedSnapshot)","visibility":"Public","body":"@substrate"}},{"html_id":"substrate=(substrate:Array(TypedSnapshot))-instance-method","name":"substrate=","doc":"Holds tape substrate.","summary":"Holds tape substrate.
","abstract":false,"args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"args_string":"(substrate : Array(TypedSnapshot))","args_html":"(substrate : Array(TypedSnapshot))","def":{"name":"substrate=","args":[{"name":"substrate","external_name":"substrate","restriction":"Array(TypedSnapshot)"}],"visibility":"Public","body":"@substrate = substrate"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the block's tape, in case it\nhas non-empty tape.","summary":"Holds information about the block's tape, in case it has non-empty tape.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/FrozenEntry","path":"Novika/FrozenEntry.html","kind":"class","full_name":"Novika::FrozenEntry","name":"FrozenEntry","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":389,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::FrozenEntry]","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"bitfield\", name: 1, cls: Novika::FrozenEntry, onlyif: nil, verify: nil}, {type: \"basic\", name: key, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: value, cls: TypedSnapshot | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(key:Form,entry:Entry)-class-method","name":"new","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(key : Form, entry : Entry)","args_html":"(key : Form, entry : Entry)","location":{"filename":"src/novika/image.cr","line_number":411,"url":null},"def":{"name":"new","args":[{"name":"key","external_name":"key","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"visibility":"Public","body":"frozen = new\nfrozen.key = TypedSnapshot.new(key)\nfrozen.value = TypedSnapshot.new(entry.form)\nfrozen.opens = entry.opener?\nfrozen\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":390,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"key:TypedSnapshot|Nil-instance-method","name":"key","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"def":{"name":"key","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@key"}},{"html_id":"key=(key:TypedSnapshot|Nil)-instance-method","name":"key=","doc":"Holds the key form.","summary":"Holds the key form.
","abstract":false,"args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(key : TypedSnapshot | Nil)","args_html":"(key : TypedSnapshot | Nil)","def":{"name":"key=","args":[{"name":"key","external_name":"key","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@key = key"}},{"html_id":"melt(assembler,block)-instance-method","name":"melt","doc":"Defines the corresponding entry in *block*.","summary":"Defines the corresponding entry in block.
","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"args_string":"(assembler, block)","args_html":"(assembler, block)","location":{"filename":"src/novika/image.cr","line_number":405,"url":null},"def":{"name":"melt","args":[{"name":"assembler","external_name":"assembler","restriction":""},{"name":"block","external_name":"block","restriction":""}],"visibility":"Public","body":"k = key.not_nil!.to_form(assembler)\nv = value.not_nil!.to_form(assembler)\nblock.at(k, Entry.new(v, opens))\n"}},{"html_id":"opens:Bool-instance-method","name":"opens","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens","return_type":"Bool","visibility":"Public","body":"@opens == 1"}},{"html_id":"opens=(opens:UInt8)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"args_string":"(opens : UInt8)","args_html":"(opens : UInt8)","def":{"name":"opens=","args":[{"name":"opens","external_name":"opens","restriction":"UInt8"}],"visibility":"Public","body":"@opens = opens"}},{"html_id":"opens=(value:Bool)-instance-method","name":"opens=","doc":"Holds whether the entry is an opener entry.","summary":"Holds whether the entry is an opener entry.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Bool"}],"args_string":"(value : Bool)","args_html":"(value : Bool)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"opens=","args":[{"name":"value","external_name":"value","restriction":"Bool"}],"visibility":"Public","body":"@opens = UInt8.new(value ? 1 : 0)"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"value:TypedSnapshot|Nil-instance-method","name":"value","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"def":{"name":"value","return_type":"TypedSnapshot | ::Nil","visibility":"Public","body":"@value"}},{"html_id":"value=(value:TypedSnapshot|Nil)-instance-method","name":"value=","doc":"Holds the value form, unless the value form is a builtin.","summary":"Holds the value form, unless the value form is a builtin.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"args_string":"(value : TypedSnapshot | Nil)","args_html":"(value : TypedSnapshot | Nil)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"TypedSnapshot | ::Nil"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about a block dictionary entry (a\nform-to-form pair with an is-opener flag).","summary":"Holds information about a block dictionary entry (a form-to-form pair with an is-opener flag).
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":389,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/Hole","path":"Novika/Hole.html","kind":"struct","full_name":"Novika::Hole","name":"Hole","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":39,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holes are similar to Crystal's `uninitialized` or `out`, in that\nthey allow you to allocate memory for a type, pass a pointer to\nthat memory to e.g. a C function, and let that C function write\ninto the memory. The written value can then be retrieved by\nopening the hole.","summary":"Holes are similar to Crystal's uninitialized
or out
, in that they allow you to allocate memory for a type, pass a pointer to that memory to e.g.
Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"@handle.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of this hole's content in memory.","summary":"Returns the address of this hole's content in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":56,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"@handle.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":69,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"handle:Pointer(Void)-instance-method","name":"handle","doc":"Returns a pointer to this hole's content.","summary":"Returns a pointer to this hole's content.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":44,"url":null},"def":{"name":"handle","return_type":"::Pointer(Void)","visibility":"Public","body":"@handle"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":58,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"form = (@type.unbox(@handle)).to_form?\nform.try(&.onto(engine.stack))\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":73,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[\") << @type) << \" hole: 0x\"\naddress.to_s(io, base: 16)\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Hook","path":"Novika/Hook.html","kind":"module","full_name":"Novika::Hook","name":"Hook","abstract":false,"locations":[{"filename":"src/novika/hook.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"extended_modules":[{"html_id":"novika/Novika/Hook","kind":"module","full_name":"Novika::Hook","name":"Hook"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"instance_methods":[{"html_id":"as_boolean-instance-method","name":"as_boolean","doc":"Returns the block-to-boolean hook name.","summary":"Returns the block-to-boolean hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":70,"url":null},"def":{"name":"as_boolean","visibility":"Public","body":"Word.new(\"__boolean__\")"}},{"html_id":"as_byteslice-instance-method","name":"as_byteslice","doc":"Returns the block-to-byteslice hook name.","summary":"Returns the block-to-byteslice hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":80,"url":null},"def":{"name":"as_byteslice","visibility":"Public","body":"Word.new(\"__byteslice__\")"}},{"html_id":"as_color-instance-method","name":"as_color","doc":"Returns the block-to-color hook name.","summary":"Returns the block-to-color hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":55,"url":null},"def":{"name":"as_color","visibility":"Public","body":"Word.new(\"__color__\")"}},{"html_id":"as_decimal-instance-method","name":"as_decimal","doc":"Returns the block-to-decimal hook name.","summary":"Returns the block-to-decimal hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":65,"url":null},"def":{"name":"as_decimal","visibility":"Public","body":"Word.new(\"__decimal__\")"}},{"html_id":"as_quote-instance-method","name":"as_quote","doc":"Returns the block-to-quote hook name.","summary":"Returns the block-to-quote hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":60,"url":null},"def":{"name":"as_quote","visibility":"Public","body":"Word.new(\"__quote__\")"}},{"html_id":"as_quoted_word-instance-method","name":"as_quoted_word","doc":"Returns the block-to-quoted word hook name.","summary":"Returns the block-to-quoted word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":75,"url":null},"def":{"name":"as_quoted_word","visibility":"Public","body":"Word.new(\"__quotedWord__\")"}},{"html_id":"as_word-instance-method","name":"as_word","doc":"Returns the block-to-word hook name.","summary":"Returns the block-to-word hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":50,"url":null},"def":{"name":"as_word","visibility":"Public","body":"Word.new(\"__word__\")"}},{"html_id":"died:Word-instance-method","name":"died","doc":"Returns the death hook name.\n\nDeath hooks are used to catch deaths (known as exceptions\nin other languages) in current block or in blocks below the\ncurrent block (nested blocks).\n\nBy defining a death hook, you are basically wrapping the\ncontents of your block in an uncontrained (catch-all)\n`try ... catch` or `begin ... rescue`.\n\n```novika\n[ getErrorDetails echo ] @: __died__\n\n1 0 / \"STDOUT: division by zero⏎\"\n```","summary":"Returns the death hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":19,"url":null},"def":{"name":"died","return_type":"Word","visibility":"Public","body":"Word.new(\"__died__\")"}},{"html_id":"on_cherry-instance-method","name":"on_cherry","doc":"Returns the on-cherry hook name.\n\nOn-cherry hooks trigger when the user tries to *cherry*\na form out of a block. This doesn't necessarily mean using\nthe word `cherry`, since e.g. the word `drop` and its\nimplicit counterpart *pop* is defined in terms of `cherry`.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and dropped/\npopped from, and how it behaves when it is `cherry`d.\n\nOn-shove hook is complemented by `on_shove` hook. See it\nto learn more.\n\nThe \"Hello, World\" of on-shove/on-cherry is defining a\n*controlled stack*.\n\n```novika\n[\n [ ] $: _controlledStack\n\n [ drop _controlledStack swap bi: ['Shove ' swap ~ echo] shove ] @: __shove__\n [ drop _controlledStack cherry dup 'Cherry ' swap ~ echo ] @: __cherry__\n\n [ _controlledStack echo ] @: print\n] obj $: master\n\nmaster [ 1 2 + ] there\nmaster.print\n\"STDOUT: Shove 1⏎\"\n\"STDOUT: Shove 2⏎\"\n\"STDOUT: Cherry 2⏎\"\n\"STDOUT: Cherry 1⏎\"\n\"STDOUT: Shove 3⏎\"\n\"STDOUT: [ 3 ]⏎\"\n```","summary":"Returns the on-cherry hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":142,"url":null},"def":{"name":"on_cherry","visibility":"Public","body":"Word.new(\"__cherry__\")"}},{"html_id":"on_shove-instance-method","name":"on_shove","doc":"Returns the on-shove hook name.\n\nOn-shove hooks trigger when the user tries to `shove` a\nform into the block the hook is attached to. Note that\nthis doesn't necessarily mean literally using `shove`.\n\nFor instance, simply typing `1 2 3` will shove 1, 2, 3\nconsequtively onto the stack. The latter is known as\n*pushing*, since *shoving* is defined for a block-and-a-\nform pair, while *pushing* is defined for a stack-and-a-\nform-pair, where the stack is implicit.\n\nDefining an on-shove hook will allow you to change how\nyour block behaves when it's used as a stack and pushed\nto, and how it behaves when it is shoved into.\n\nOn-shove hook is complemented by `on_cherry`. See it to\nlearn more.","summary":"Returns the on-shove hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":102,"url":null},"def":{"name":"on_shove","visibility":"Public","body":"Word.new(\"__shove__\")"}},{"html_id":"trap-instance-method","name":"trap","doc":"Returns the word trap hook name.\n\nWord traps catch undefined words. Note that during word\nresolution, word traps run *last*. That is, all parents\nand friends of the block you're trying to resolve a word\nin are searched, and only then traps are triggered in the\nappropriate order.\n\nTraps can be nested: if one trap fails to resolve a word,\nthen an outer trap is triggered.\n\nThe words *outer*, *inner*, *nested* etc. refer to the block\nparent hierarchy. Initially, this means the hierarchy is\nAST-like, but for reparented blocks (or blocks whose parent\nhierarchy is changed otherwise), different traps will be\ntriggered in case of an undefined word.\n\n```novika\n[ 'The following word is undefined: ' swap ~ echo ] @: __trap__\n\n1 2 + frobnicate \"STDOUT: The following word is undefined: frobnicate⏎\"\n```","summary":"Returns the word trap hook name.
","abstract":false,"location":{"filename":"src/novika/hook.cr","line_number":45,"url":null},"def":{"name":"trap","visibility":"Public","body":"Word.new(\"__trap__\")"}}]},{"html_id":"novika/Novika/ICapability","path":"Novika/ICapability.html","kind":"module","full_name":"Novika::ICapability","name":"ICapability","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Capabilities/IConsole","kind":"class","full_name":"Novika::Capabilities::IConsole","name":"IConsole"},{"html_id":"novika/Novika/Capabilities/IDisk","kind":"class","full_name":"Novika::Capabilities::IDisk","name":"IDisk"},{"html_id":"novika/Novika/Capabilities/IFrontend","kind":"class","full_name":"Novika::Capabilities::IFrontend","name":"IFrontend"},{"html_id":"novika/Novika/Capabilities/IInk","kind":"class","full_name":"Novika::Capabilities::IInk","name":"IInk"},{"html_id":"novika/Novika/Capabilities/Impl/Bit","kind":"class","full_name":"Novika::Capabilities::Impl::Bit","name":"Bit"},{"html_id":"novika/Novika/Capabilities/Impl/Colors","kind":"class","full_name":"Novika::Capabilities::Impl::Colors","name":"Colors"},{"html_id":"novika/Novika/Capabilities/Impl/Essential","kind":"class","full_name":"Novika::Capabilities::Impl::Essential","name":"Essential"},{"html_id":"novika/Novika/Capabilities/Impl/FFI","kind":"class","full_name":"Novika::Capabilities::Impl::FFI","name":"FFI"},{"html_id":"novika/Novika/Capabilities/Impl/Nki","kind":"class","full_name":"Novika::Capabilities::Impl::Nki","name":"Nki"},{"html_id":"novika/Novika/Capabilities/ISystem","kind":"class","full_name":"Novika::Capabilities::ISystem","name":"ISystem"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Instance-side (`include`) interface to a Novika capability.\nAll capability instances must be compatible with this module.","summary":"Instance-side (include
) interface to a Novika capability.
Returns the collection this capability is a part of.
","abstract":false,"location":{"filename":"src/novika/capability.cr","line_number":19,"url":null},"def":{"name":"capabilities","return_type":"CapabilityCollection","visibility":"Public","body":"@capabilities"}},{"html_id":"inject(intotarget:Block)-instance-method","name":"inject","doc":"Injects the vocabulary of this capability into the *target* block.","summary":"Injects the vocabulary of this capability into the target block.
","abstract":true,"args":[{"name":"target","external_name":"into","restriction":"Block"}],"args_string":"(into target : Block)","args_html":"(into target : Block)","location":{"filename":"src/novika/capability.cr","line_number":25,"url":null},"def":{"name":"inject","args":[{"name":"target","external_name":"into","restriction":"Block"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ICapabilityClass","path":"Novika/ICapabilityClass.html","kind":"module","full_name":"Novika::ICapabilityClass","name":"ICapabilityClass","abstract":false,"locations":[{"filename":"src/novika/capability.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Class-side (`extend`) interface to a Novika capability. All\ncapability classes must be compatible with this module.","summary":"Class-side (extend
) interface to a Novika capability.
Returns the frontend identifier of this capability class.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":6,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":""}},{"html_id":"on_by_default?:Bool-instance-method","name":"on_by_default?","doc":"Returns whether this capability class should be enabled automatically.","summary":"Returns whether this capability class should be enabled automatically.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":12,"url":null},"def":{"name":"on_by_default?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"purpose:String-instance-method","name":"purpose","doc":"Returns a short description on what this capability class provides.","summary":"Returns a short description on what this capability class provides.
","abstract":true,"location":{"filename":"src/novika/capability.cr","line_number":9,"url":null},"def":{"name":"purpose","return_type":"String","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/IDict","path":"Novika/IDict.html","kind":"module","full_name":"Novika::IDict","name":"IDict","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Dict","kind":"class","full_name":"Novika::Dict","name":"Dict"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Novika dictionary protocol. Objects or values that want\nto be Block dictionaries can implement this protocol to\nmake that possible.","summary":"Novika dictionary protocol.
","instance_methods":[{"html_id":"clear-instance-method","name":"clear","doc":"Removes all entries in this dictionary.","summary":"Removes all entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":19,"url":null},"def":{"name":"clear","visibility":"Public","body":""}},{"html_id":"copy:IDict-instance-method","name":"copy","doc":"Returns a *shallow* copy of this dictionary.","summary":"Returns a shallow copy of this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":35,"url":null},"def":{"name":"copy","return_type":"IDict","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of entries in this dictionary.","summary":"Returns the amount of entries in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":32,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"del(name:Form)-instance-method","name":"del","doc":"Deletes the entry corresponding to *name* form in this\ndictionary if it exists. Otherwise, does nothing.","summary":"Deletes the entry corresponding to name form in this dictionary if it exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form)","args_html":"(name : Form)","location":{"filename":"src/novika/dict.cr","line_number":16,"url":null},"def":{"name":"del","args":[{"name":"name","external_name":"name","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"each(&:Form,Form->)-instance-method","name":"each","doc":"Yields key, value forms in this dictionary.","summary":"Yields key, value forms in this dictionary.
","abstract":true,"location":{"filename":"src/novika/dict.cr","line_number":38,"url":null},"def":{"name":"each","yields":2,"block_arity":2,"block_arg":{"name":"","external_name":"","restriction":"(Form, Form ->)"},"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this dictionary currently stores no entries.","summary":"Returns whether this dictionary currently stores no entries.
","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":45,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"count.zero?"}},{"html_id":"get(name:Form,&:Form->Entry|Nil):Entry|Nil-instance-method","name":"get","doc":"Returns the entry corresponding to *name* form in this\ndictionary, or yields with *name* and returns the block\nresult.","summary":"Returns the entry corresponding to name form in this dictionary, or yields with name and returns the block result.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","args_html":"(name : Form, & : Form -> Entry | Nil) : Entry | Nil","location":{"filename":"src/novika/dict.cr","line_number":12,"url":null},"def":{"name":"get","args":[{"name":"name","external_name":"name","restriction":"Form"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Form -> Entry | ::Nil)"},"return_type":"Entry | ::Nil","visibility":"Public","body":""}},{"html_id":"has?(name:Form):Bool-instance-method","name":"has?","doc":"Returns whether this dictionary has an entry corresponding\nto *name* form.","summary":"Returns whether this dictionary has an entry corresponding to name form.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":23,"url":null},"def":{"name":"has?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"import!(donor:IDict)-instance-method","name":"import!","doc":"Imports entries from *donor* dictionary into this dictionary.\n\nEntries whose names are preceded by one or more `_` are\nnot imported (they are considered private).","summary":"Imports entries from donor dictionary into this dictionary.
","abstract":true,"args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"args_string":"(donor : IDict)","args_html":"(donor : IDict)","location":{"filename":"src/novika/dict.cr","line_number":29,"url":null},"def":{"name":"import!","args":[{"name":"donor","external_name":"donor","restriction":"IDict"}],"visibility":"Public","body":""}},{"html_id":"set(name:Form,entry:Entry):Entry-instance-method","name":"set","doc":"Assigns *name* form to *entry* in this dictionary.","summary":"Assigns name form to entry in this dictionary.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"args_string":"(name : Form, entry : Entry) : Entry","args_html":"(name : Form, entry : Entry) : Entry","location":{"filename":"src/novika/dict.cr","line_number":7,"url":null},"def":{"name":"set","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"entry","external_name":"entry","restriction":"Entry"}],"return_type":"Entry","visibility":"Public","body":""}},{"html_id":"to_dict:Dict-instance-method","name":"to_dict","doc":"Converts this dictionary to the standard `Dict` implementation\n(used in e.g. serialization).","summary":"Converts this dictionary to the standard Dict
implementation (used in e.g.
Invoked before engine opens the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":4,"url":null},"def":{"name":"on_form_begin","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}},{"html_id":"on_form_end(engine:Engine,form:Form)-instance-method","name":"on_form_end","doc":"Invoked after *engine* opened the given *form*.","summary":"Invoked after engine opened the given form.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(engine : Engine, form : Form)","args_html":"(engine : Engine, form : Form)","location":{"filename":"src/novika/engine.cr","line_number":8,"url":null},"def":{"name":"on_form_end","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Image","path":"Novika/Image.html","kind":"class","full_name":"Novika::Image","name":"Image","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":893,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
Returns the Image
formed with this block as the pivot block.
Holds compression method used to compress the payload.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression","return_type":"CompressionType","visibility":"Public","body":"CompressionType.new(@compression.to_i)"}},{"html_id":"compression=(compression:UInt8)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"args_string":"(compression : UInt8)","args_html":"(compression : UInt8)","def":{"name":"compression=","args":[{"name":"compression","external_name":"compression","restriction":"UInt8"}],"visibility":"Public","body":"@compression = compression"}},{"html_id":"compression=(value:CompressionType)-instance-method","name":"compression=","doc":"Holds compression method used to compress the payload.","summary":"Holds compression method used to compress the payload.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"args_string":"(value : CompressionType)","args_html":"(value : CompressionType)","location":{"filename":"src/novika/image.cr","line_number":6,"url":null},"def":{"name":"compression=","args":[{"name":"value","external_name":"value","restriction":"CompressionType"}],"visibility":"Public","body":"@compression = (@compression.class.new(0)) | value.to_i"}},{"html_id":"payload:Bytes-instance-method","name":"payload","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"def":{"name":"payload","return_type":"Bytes","visibility":"Public","body":"@payload"}},{"html_id":"payload=(payload:Bytes)-instance-method","name":"payload=","doc":"Holds the payload, which may or may not be compressed.","summary":"Holds the payload, which may or may not be compressed.
","abstract":false,"args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"args_string":"(payload : Bytes)","args_html":"(payload : Bytes)","def":{"name":"payload=","args":[{"name":"payload","external_name":"payload","restriction":"Bytes"}],"visibility":"Public","body":"@payload = payload"}},{"html_id":"reserved:UInt8-instance-method","name":"reserved","abstract":false,"def":{"name":"reserved","return_type":"UInt8","visibility":"Public","body":"@reserved"}},{"html_id":"reserved=(reserved:UInt8)-instance-method","name":"reserved=","abstract":false,"args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"args_string":"(reserved : UInt8)","args_html":"(reserved : UInt8)","def":{"name":"reserved=","args":[{"name":"reserved","external_name":"reserved","restriction":"UInt8"}],"visibility":"Public","body":"@reserved = reserved"}},{"html_id":"signature:String-instance-method","name":"signature","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"def":{"name":"signature","return_type":"String","visibility":"Public","body":"@signature"}},{"html_id":"signature=(signature:String)-instance-method","name":"signature=","doc":"Holds Novika image signature, the string 'NKI'.","summary":"Holds Novika image signature, the string 'NKI'.
","abstract":false,"args":[{"name":"signature","external_name":"signature","restriction":"String"}],"args_string":"(signature : String)","args_html":"(signature : String)","def":{"name":"signature=","args":[{"name":"signature","external_name":"signature","restriction":"String"}],"visibility":"Public","body":"@signature = signature"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Reconstructs the pivot block and its hierarchy from this\nimage. Returns the resulting block.\n\nCapability collection *caps* is required to make sure all\nrequired capabilities are enabled/available.","summary":"Reconstructs the pivot block and its hierarchy from this image.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":936,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"buffer = IO::Memory.new(payload)\nreader = case compression\nin .none?\n buffer\nin .gzip_fast?, .gzip_best?\n Compress::Gzip::Reader.new(buffer)\nin .brotli_fast?, .brotli_best?\n Compress::Brotli::Reader.new(buffer)\nend\npayload = reader.read_bytes(ImagePayload)\nreader.close\npayload.to_block(caps)\n"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"An image consists of the 'NKI' signature, payload\ncompression type (see `Image::CompressionType`), and\nthe (optionally compressed) payload itself (see\n`ImagePayload`).","summary":"An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
An image consists of the 'NKI' signature, payload compression type (see Image::CompressionType
), and the (optionally compressed) payload itself (see ImagePayload
).
No compression.
"},{"id":"GzipFast","name":"GzipFast","value":"1","doc":"Use(s) fast but not best Gzip compression.","summary":"Use(s) fast but not best Gzip compression.
"},{"id":"GzipBest","name":"GzipBest","value":"2","doc":"Use(s) best but not fast Gzip compression.","summary":"Use(s) best but not fast Gzip compression.
"},{"id":"BrotliFast","name":"BrotliFast","value":"3","doc":"Use(s) fast but not best Brotli compression.\nGenerally slower than `GzipFast`, but almost\ncertainly will yield better results.","summary":"Use(s) fast but not best Brotli compression.
"},{"id":"BrotliBest","name":"BrotliBest","value":"4","doc":"Use(s) best but not fast Brotli compression.\nGenerally slower than `GzipBest`, but almost\ncertainly will yield better results.","summary":"Use(s) best but not fast Brotli compression.
"}],"namespace":{"html_id":"novika/Novika/Image","kind":"class","full_name":"Novika::Image","name":"Image"},"doc":"Lists all available payload compression types.","summary":"Lists all available payload compression types.
","instance_methods":[{"html_id":"brotli_best?-instance-method","name":"brotli_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":915,"url":null},"def":{"name":"brotli_best?","visibility":"Public","body":"self == BrotliBest"}},{"html_id":"brotli_fast?-instance-method","name":"brotli_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":910,"url":null},"def":{"name":"brotli_fast?","visibility":"Public","body":"self == BrotliFast"}},{"html_id":"gzip_best?-instance-method","name":"gzip_best?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":905,"url":null},"def":{"name":"gzip_best?","visibility":"Public","body":"self == GzipBest"}},{"html_id":"gzip_fast?-instance-method","name":"gzip_fast?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":902,"url":null},"def":{"name":"gzip_fast?","visibility":"Public","body":"self == GzipFast"}},{"html_id":"none?-instance-method","name":"none?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":899,"url":null},"def":{"name":"none?","visibility":"Public","body":"self == None"}}]}]},{"html_id":"novika/Novika/ImagePayload","path":"Novika/ImagePayload.html","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":800,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Monthly increment of the current Novika version.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"group\", name: ver, cls: Ver, onlyif: nil, verify: -> do\n (ver.rev == 10) && ({ver.subrev, ver.yearly, ver.monthly} == {SUBREV, YEARLY, MONTHLY})\nend, value: nil}, {type: \"group\", name: capabilities, cls: Capabilities, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: pool, cls: BlockPool | ::Nil, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Subrevision (release) of the current Novika version.
"},{"id":"VERSION_MATCH","name":"VERSION_MATCH","value":"((/(\\d+)\\.(\\d+)\\.(\\d+)/).match(Novika::VERSION)).not_nil!"},{"id":"YEARLY","name":"YEARLY","value":"VERSION_MATCH[2].to_u8","doc":"Yearly increment of the current Novika version.","summary":"Yearly increment of the current Novika version.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"capabilities","visibility":"Public","body":"@capabilities"}},{"html_id":"capabilities=(capabilities:Novika::ImagePayload::Capabilities)-instance-method","name":"capabilities=","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"args_string":"(capabilities : Novika::ImagePayload::Capabilities)","args_html":"(capabilities : Novika::ImagePayload::Capabilities)","def":{"name":"capabilities=","args":[{"name":"capabilities","external_name":"capabilities","restriction":"::Novika::ImagePayload::Capabilities"}],"visibility":"Public","body":"@capabilities = capabilities"}},{"html_id":"pool:BlockPool|Nil-instance-method","name":"pool","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"def":{"name":"pool","return_type":"BlockPool | ::Nil","visibility":"Public","body":"@pool"}},{"html_id":"pool=(pool:BlockPool|Nil)-instance-method","name":"pool=","doc":"Holds the block pool.","summary":"Holds the block pool.
","abstract":false,"args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"args_string":"(pool : BlockPool | Nil)","args_html":"(pool : BlockPool | Nil)","def":{"name":"pool=","args":[{"name":"pool","external_name":"pool","restriction":"BlockPool | ::Nil"}],"visibility":"Public","body":"@pool = pool"}},{"html_id":"to_block(caps:CapabilityCollection)-instance-method","name":"to_block","doc":"Converts this image payload to a block, aided by *caps*.\n\nSee `Image#to_block`.","summary":"Converts this image payload to a block, aided by caps.
","abstract":false,"args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(caps : CapabilityCollection)","args_html":"(caps : CapabilityCollection)","location":{"filename":"src/novika/image.cr","line_number":865,"url":null},"def":{"name":"to_block","args":[{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"capabilities.required.each do |fid|\n if caps.has_capability?(fid.id)\n else\n raise(Novika::Error.new(\"image requires capability '#{fid.id}', but it isn't available\"))\n end\n caps.enable(fid.id)\nend\npool.not_nil!.to_block(caps)\n"}},{"html_id":"ver:Novika::ImagePayload::Ver-instance-method","name":"ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"ver","visibility":"Public","body":"@ver"}},{"html_id":"ver=(ver:Novika::ImagePayload::Ver)-instance-method","name":"ver=","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"args_string":"(ver : Novika::ImagePayload::Ver)","args_html":"(ver : Novika::ImagePayload::Ver)","def":{"name":"ver=","args":[{"name":"ver","external_name":"ver","restriction":"::Novika::ImagePayload::Ver"}],"visibility":"Public","body":"@ver = ver"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Normally compressed and/or encrypted, image payload\nholds the version of Novika it was created with, a list\nof capabilities it requires, and, finally, `BlockPool`,\nwhich is used to reconstruct the hierarchy (parents,\nprototypes, friends, and so on, recursively), tape, and\ndictionary of some pivot block.\n\nNote: temporarily, backward/forward compatibility is\ndisabled. Meaning that only the version of Novika that\nwrote the image is allowed to read it.","summary":"Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Normally compressed and/or encrypted, image payload holds the version of Novika it was created with, a list of capabilities it requires, and, finally, BlockPool
, which is used to reconstruct the hierarchy (parents, prototypes, friends, and so on, recursively), tape, and dictionary of some pivot block.
Holds information about the capabilities required to run this image.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Capabilities]","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: count, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n required.size\nend}, {type: \"array\", name: required, cls: CapabilityId, onlyif: nil, verify: nil, length: -> do\n count\nend, value: nil}] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"count:UInt64-instance-method","name":"count","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"def":{"name":"count","return_type":"UInt64","visibility":"Public","body":"@count"}},{"html_id":"count=(count:UInt64)-instance-method","name":"count=","doc":"Holds the amount of required capabilities.","summary":"Holds the amount of required capabilities.
","abstract":false,"args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"args_string":"(count : UInt64)","args_html":"(count : UInt64)","def":{"name":"count=","args":[{"name":"count","external_name":"count","restriction":"UInt64"}],"visibility":"Public","body":"@count = count"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":852,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"required:Array(CapabilityId)-instance-method","name":"required","doc":"Holds IDs of required capabilities (namely `ICapabilityClass.id`).","summary":"Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds IDs of required capabilities (namely ICapabilityClass.id
).
Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capabilities(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capabilities","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capabilities","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Capabilities = Novika::ImagePayload::Capabilities.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about the capabilities required to run\nthis image.","summary":"Holds information about the capabilities required to run this image.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ImagePayload/Ver","path":"Novika/ImagePayload/Ver.html","kind":"class","full_name":"Novika::ImagePayload::Ver","name":"Ver","abstract":false,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::ImagePayload::Ver]","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: rev, cls: UInt8, onlyif: nil, verify: nil, value: nil}, {type: \"basic\", name: subrev, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n SUBREV\nend}, {type: \"basic\", name: yearly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n YEARLY\nend}, {type: \"basic\", name: monthly, cls: UInt8, onlyif: nil, verify: nil, value: -> do\n MONTHLY\nend}] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
"}],"namespace":{"html_id":"novika/Novika/ImagePayload","kind":"class","full_name":"Novika::ImagePayload","name":"ImagePayload"},"doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"monthly:UInt8-instance-method","name":"monthly","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"def":{"name":"monthly","return_type":"UInt8","visibility":"Public","body":"@monthly"}},{"html_id":"monthly=(monthly:UInt8)-instance-method","name":"monthly=","doc":"Montly version increment:\n\n 0.0.5\n ---","summary":"Montly version increment:
","abstract":false,"args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"args_string":"(monthly : UInt8)","args_html":"(monthly : UInt8)","def":{"name":"monthly=","args":[{"name":"monthly","external_name":"monthly","restriction":"UInt8"}],"visibility":"Public","body":"@monthly = monthly"}},{"html_id":"parent-instance-method","name":"parent","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":827,"url":null},"def":{"name":"parent","visibility":"Public","body":"@parent.not_nil!"}},{"html_id":"parent=(parent:Novika::ImagePayload|Nil)-instance-method","name":"parent=","doc":"Group fields might need access to data in the parent","summary":"Group fields might need access to data in the parent
","abstract":false,"args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"args_string":"(parent : Novika::ImagePayload | Nil)","args_html":"(parent : Novika::ImagePayload | Nil)","def":{"name":"parent=","args":[{"name":"parent","external_name":"parent","restriction":"Novika::ImagePayload | ::Nil"}],"visibility":"Public","body":"@parent = parent"}},{"html_id":"rev:UInt8-instance-method","name":"rev","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"def":{"name":"rev","return_type":"UInt8","visibility":"Public","body":"@rev"}},{"html_id":"rev=(rev:UInt8)-instance-method","name":"rev=","doc":"Revision number (this is revision 10).","summary":"Revision number (this is revision 10).
","abstract":false,"args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"args_string":"(rev : UInt8)","args_html":"(rev : UInt8)","def":{"name":"rev=","args":[{"name":"rev","external_name":"rev","restriction":"UInt8"}],"visibility":"Public","body":"@rev = rev"}},{"html_id":"subrev:UInt8-instance-method","name":"subrev","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"def":{"name":"subrev","return_type":"UInt8","visibility":"Public","body":"@subrev"}},{"html_id":"subrev=(subrev:UInt8)-instance-method","name":"subrev=","doc":"Subrevision (release) increment:\n\n 0.0.5\n ---","summary":"Subrevision (release) increment:
","abstract":false,"args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"args_string":"(subrev : UInt8)","args_html":"(subrev : UInt8)","def":{"name":"subrev=","args":[{"name":"subrev","external_name":"subrev","restriction":"UInt8"}],"visibility":"Public","body":"@subrev = subrev"}},{"html_id":"yearly:UInt8-instance-method","name":"yearly","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"def":{"name":"yearly","return_type":"UInt8","visibility":"Public","body":"@yearly"}},{"html_id":"yearly=(yearly:UInt8)-instance-method","name":"yearly=","doc":"Yearly version increment:\n\n 0.0.5\n ---","summary":"Yearly version increment:
","abstract":false,"args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"args_string":"(yearly : UInt8)","args_html":"(yearly : UInt8)","def":{"name":"yearly=","args":[{"name":"yearly","external_name":"yearly","restriction":"UInt8"}],"visibility":"Public","body":"@yearly = yearly"}}],"macros":[{"html_id":"novika_block_pool(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_pool","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_pool","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockPool = Novika::BlockPool.new\n \n"}},{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_frozen_block(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock = Novika::FrozenBlock.new\n \n"}},{"html_id":"novika_frozen_block_dict(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_dict","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_dict","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Dict = Novika::FrozenBlock::Dict.new\n \n"}},{"html_id":"novika_frozen_block_friends(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_friends","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_friends","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Friends = Novika::FrozenBlock::Friends.new\n \n"}},{"html_id":"novika_frozen_block_tape(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_block_tape","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_block_tape","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenBlock::Tape = Novika::FrozenBlock::Tape.new\n \n"}},{"html_id":"novika_frozen_entry(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_frozen_entry","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_frozen_entry","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::FrozenEntry = Novika::FrozenEntry.new\n \n"}},{"html_id":"novika_image_payload(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload = Novika::ImagePayload.new\n \n"}},{"html_id":"novika_image_payload_capability_id(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_capability_id","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_capability_id","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::CapabilityId = Novika::ImagePayload::CapabilityId.new\n \n"}},{"html_id":"novika_image_payload_ver(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_image_payload_ver","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_image_payload_ver","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ImagePayload::Ver = Novika::ImagePayload::Ver.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Holds information about Novika version the image was\nwritten with.","summary":"Holds information about Novika version the image was written with.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Novika/IReadableStore","path":"Novika/IReadableStore.html","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":208,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors act like a form-to-form mapping where entry\nkind (opens/pushes) is ignored (basically, a read-only,\nrestricted subset of block methods for dictionary access).\n\nImplementors can be targets of `entry:fetch`, `entry:fetch?`,\n`entry:exists?`, `entry:opener?`.","summary":"Implementors act like a form-to-form mapping where entry kind (opens/pushes) is ignored (basically, a read-only, restricted subset of block methods for dictionary access).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/dict.cr","line_number":209,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"readable store\""}}],"instance_methods":[{"html_id":"form_for(name:Form):Form-instance-method","name":"form_for","doc":"Returns the value form for an entry with the given *name*, or\ndies if no such entry exists.","summary":"Returns the value form for an entry with the given name, or dies if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form","args_html":"(name : Form) : Form","location":{"filename":"src/novika/dict.cr","line_number":230,"url":null},"def":{"name":"form_for","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form","visibility":"Public","body":"(form_for?(name)) || (name.die(\"no value form for '#{name}'\"))"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/dict.cr","line_number":218,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":""}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":214,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":222,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/dict.cr","line_number":226,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/ISubmittableStore","path":"Novika/ISubmittableStore.html","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore","abstract":false,"locations":[{"filename":"src/novika/dict.cr","line_number":236,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Block","kind":"class","full_name":"Novika::Block","name":"Block"},{"html_id":"novika/Novika/StructViewForm","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Implementors can be targets of `entry:submit`.","summary":"Implementors can be targets of entry:submit
.
Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":247,"url":null},"def":{"name":"submit","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"(submit?(name, form)) || (name.die(\"no entry to submit to\"))"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":true,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/dict.cr","line_number":243,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/LargeDecimalSnapshot","path":"Novika/LargeDecimalSnapshot.html","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":151,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::LargeDecimalSnapshot]","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: repr, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":161,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.repr = form.to_s\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":152,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"repr:String-instance-method","name":"repr","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"def":{"name":"repr","return_type":"String","visibility":"Public","body":"@repr"}},{"html_id":"repr=(repr:String)-instance-method","name":"repr=","doc":"Holds the string representation of the decimal value.","summary":"Holds the string representation of the decimal value.
","abstract":false,"args":[{"name":"repr","external_name":"repr","restriction":"String"}],"args_string":"(repr : String)","args_html":"(repr : String)","def":{"name":"repr=","args":[{"name":"repr","external_name":"repr","restriction":"String"}],"visibility":"Public","body":"@repr = repr"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":157,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(repr)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, which is too large to fit\ninto an i64.\n\nIts type is `SnapshotType::LargeDecimal`.","summary":"Snapshot of a decimal form, which is too large to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":151,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Library","path":"Novika/Library.html","kind":"class","full_name":"Novika::Library","name":"Library","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":310,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A library is a collection of foreign functions.\n\nA library form can be opened with a block of *function declarations*\nto be exposed. Each function declaration consists of the function's\nname and type signature. Exposed functions are then defined in the\nopener block.\n\nFor more details, see Novika's `ffi:getLibrary`.\n\nInternally, library objects are created by the frontend and fed\nto the capability collection `caps`. When needed, they are\nretrieved from this capability collection.","summary":"A library is a collection of foreign functions.
","class_methods":[{"html_id":"new?(id:String,cwd:Path,env:Resolver::RunnableEnvironment):Library|Nil-class-method","name":"new?","doc":"Tries to find the library with the given *id* in the system-\nspecific library directories, current working directory *cwd*,\nand in the runnable environment *env*.\n\nReturns nil if the library could not be found or loaded.","summary":"Tries to find the library with the given id in the system- specific library directories, current working directory cwd, and in the runnable environment env.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"args_string":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","args_html":"(id : String, cwd : Path, env : Resolver::RunnableEnvironment) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":329,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"env","external_name":"env","restriction":"Resolver::RunnableEnvironment"}],"return_type":"Library | ::Nil","visibility":"Public","body":"candidates = [] of String\n{% if flag?(:windows) %}\n candidates << \"#{id}.dll\"\n candidates << \"lib#{id}.dll\"\n {% else %}{% if flag?(:darwin) %}\n candidates << \"#{id}.dylib\"\n candidates << \"lib#{id}.dylib\"\n {% else %}{% if flag?(:unix) %}\n candidates << \"#{id}.so\"\n candidates << \"lib#{id}.so\"\n {% else %}\n return\n {% end %}{% end %}{% end %}\nCrystal::Loader.default_search_paths.each do |search_path|\n candidates.each do |candidate|\n if library = Library.new?(id, Path[search_path] / candidate)\n else\n next\n end\n return library\n end\nend\ncandidates.each do |candidate|\n if path = (env.expand?(Path[candidate])) || (cwd.expand(Path[candidate]))\n else\n next\n end\n if library = Library.new?(id, path)\n else\n next\n end\n return library\nend\n"}},{"html_id":"new?(id:String,path:Path):Library|Nil-class-method","name":"new?","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (it may be chosen arbitrarily).\n\nReturns nil if the library could not be loaded.","summary":"Initializes a library for the dynamic library at path, with the given identifier (it may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library | Nil","args_html":"(id : String, path : Path) : Library | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":369,"url":null},"def":{"name":"new?","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library | ::Nil","visibility":"Public","body":"if handle = LibDl.dlopen(path.to_s, LibDl::RTLD_NOW)\nelse\n return\nend\nnew(id, path, handle)\n"}},{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":532,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"foreign library\""}}],"constructors":[{"html_id":"new(id:String,path:Path):Library-class-method","name":"new","doc":"Initializes a library for the dynamic library at *path*,\nwith the given *id*entifier (may be chosen arbitrarily).\n\nMay die if LibDL fails to load the library.","summary":"Initializes a library for the dynamic library at path, with the given identifier (may be chosen arbitrarily).
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(id : String, path : Path) : Library","args_html":"(id : String, path : Path) : Library","location":{"filename":"src/novika/forms/foreign.cr","line_number":379,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"String"},{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Library","visibility":"Public","body":"(new?(id, path)) || (raise(Error.new(String.new(LibDl.dlerror))))"}}],"instance_methods":[{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":536,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"finalize-instance-method","name":"finalize","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":320,"url":null},"def":{"name":"finalize","visibility":"Public","body":"LibDl.dlclose(@handle)"}},{"html_id":"id:String-instance-method","name":"id","doc":"Returns the identifier of this library.","summary":"Returns the identifier of this library.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":315,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_open(engine:Engine):self-instance-method","name":"on_open","doc":"Reacts to this form being opened with *engine*.","summary":"Reacts to this form being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/foreign.cr","line_number":521,"url":null},"def":{"name":"on_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"this = engine.block\nfdecls = engine.stack.drop.a(Block)\nfdecls.each do |fdecl|\n parse_fdecl(this, fdecl.a(Block))\nend\nself\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":540,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"[foreign library: \") << id) << \"]\""}}]},{"html_id":"novika/Novika/ObjectPool","path":"Novika/ObjectPool.html","kind":"struct","full_name":"Novika::ObjectPool(T)","name":"ObjectPool","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/object_pool.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A naïve object pool, inspired by:\n\nhttps://gist.github.com/floere/3121579","summary":"A naïve object pool, inspired by:
","constructors":[{"html_id":"new(create:->T,clear:T->T)-class-method","name":"new","abstract":false,"args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"args_string":"(create : -> T, clear : T -> T)","args_html":"(create : -> T, clear : T -> T)","location":{"filename":"src/novika/object_pool.cr","line_number":8,"url":null},"def":{"name":"new","args":[{"name":"create","external_name":"create","restriction":"(-> T)"},{"name":"clear","external_name":"clear","restriction":"(T -> T)"}],"visibility":"Public","body":"_ = ObjectPool(T).allocate\n_.initialize(create, clear)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"acquire:T-instance-method","name":"acquire","doc":"Returns a free/new instance of the object.","summary":"Returns a free/new instance of the object.
","abstract":false,"location":{"filename":"src/novika/object_pool.cr","line_number":18,"url":null},"def":{"name":"acquire","return_type":"T","visibility":"Public","body":"if kv = @free.shift?\nelse\n obj = @create.call\n kv = {id(obj), obj}\nend\n@used[] = *kv\n"}},{"html_id":"release(obj:T)-instance-method","name":"release","doc":"Clears the given *instance* of the object, and releases\nit so that it can be acquired by someone else.","summary":"Clears the given instance of the object, and releases it so that it can be acquired by someone else.
","abstract":false,"args":[{"name":"obj","external_name":"obj","restriction":"T"}],"args_string":"(obj : T)","args_html":"(obj : T)","location":{"filename":"src/novika/object_pool.cr","line_number":28,"url":null},"def":{"name":"release","args":[{"name":"obj","external_name":"obj","restriction":"T"}],"visibility":"Public","body":"@clear.call(obj)\nid = id(obj)\n@free[id] = obj\n@used.delete(id)\n"}}]},{"html_id":"novika/Novika/Quote","path":"Novika/Quote.html","kind":"module","full_name":"Novika::Quote","name":"Quote","abstract":false,"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":18,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EFFECT_BOUND_TAKE","name":"EFFECT_BOUND_TAKE","value":"12","doc":"Specifies how many characters to take from the left and right\nboundaries of the quote for a shorter representation in `effect`.","summary":"Specifies how many characters to take from the left and right boundaries of the quote for a shorter representation in #effect
.
Specifies the maximum amount of characters to display before the quote gets cut off in #effect
(see Form#effect
).
The empty quote.
"}],"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"including_types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote"},{"html_id":"novika/Novika/Quote/StringQuote","kind":"struct","full_name":"Novika::Quote::StringQuote","name":"StringQuote"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are Novika quotes, which are known as strings\nin most other programming languages.\n\nQuotes are optimized for the ASCII-only case. Also, they\ntreat single `String::Grapheme`s separately from strings\nof those, and cache grapheme counts here and there.\n\nThe slowest operations on quotes are `slice_at` and `at`\nover *non- ASCII* quotes. Both are currently O(N) in terms\nof iterations only; they do a lot of other work besides\niteration as well.\n\nWhen you are slow, being even slower doesn't matter that much\nanymore. This is the case with Novika.\n\nAnd yes, quotes do rely on the experimental grapheme API.","summary":"Includers are Novika quotes, which are known as strings in most other programming languages.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":50,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,count=string.grapheme_size,ascii=string.ascii_only?)-class-method","name":"new","doc":"Creates a quote from *string*.\n\n*count* can be provided if the amount of graphemes in\n*string* is known.","summary":"Creates a quote from string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"args_string":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","args_html":"(string : String, count = string.grapheme_size, ascii = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":28,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"count","default_value":"string.grapheme_size","external_name":"count","restriction":""},{"name":"ascii","default_value":"string.ascii_only?","external_name":"ascii","restriction":""}],"visibility":"Public","body":"if count == 1\n string.each_grapheme do |it|\n return GraphemeQuote.new(it)\n end\nend\nStringQuote.new(string, count, ascii)\n"}},{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","doc":"Creates a quote from *grapheme*.","summary":"Creates a quote from grapheme.
","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":37,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"GraphemeQuote.new(grapheme)"}},{"html_id":"new(char:Char)-class-method","name":"new","doc":"Creates a quote from *char*.","summary":"Creates a quote from char.
","abstract":false,"args":[{"name":"char","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","args_html":"(char : Char)","location":{"filename":"src/novika/forms/quote.cr","line_number":42,"url":null},"def":{"name":"new","args":[{"name":"char","external_name":"char","restriction":"Char"}],"visibility":"Public","body":"new(String::Grapheme.new(char))"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":69,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":""}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":true,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":65,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"at(index:Int32):GraphemeQuote-instance-method","name":"at","doc":"Returns the grapheme at *index* as `Quote`, or dies.","summary":"Returns the grapheme at index as Quote
, or dies.
Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":76,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":""}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":72,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":""}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/quote.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quote '\") << string) << \"'\""}},{"html_id":"each_occurrence_of(pattern:Form,&)-instance-method","name":"each_occurrence_of","doc":"Yields occurrences of the given *pattern* in this quote.","summary":"Yields occurrences of the given pattern in this quote.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"args_string":"(pattern : Form, &)","args_html":"(pattern : Form, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":177,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"Form"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"effect(io)-instance-method","name":"effect","doc":"Generates and returns a description for the stack effect\nof this form.\n\nFor blocks and builtins, tries to extract a `( ... -- ... )`\n(but see `EFFECT_PATTERN`) from their corresponding\ncomment. If could not extract or no comment, returns\n'a block' for blocks and 'native code' for builtins.","summary":"Generates and returns a description for the stack effect of this form.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":188,"url":null},"def":{"name":"effect","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"nchars = count\nif nchars <= EFFECT_MAX_CHARS\n return super(io)\nend\nl = at(0, EFFECT_BOUND_TAKE)\nr = at((nchars - EFFECT_BOUND_TAKE) - 1, nchars - 1)\nio << \"'\"\nl.string.dump_unquoted(io)\nio << \"…\"\nr.string.dump_unquoted(io)\nio << \"'\"\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":true,"location":{"filename":"src/novika/forms/quote.cr","line_number":79,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":""}},{"html_id":"first_byte?:UInt8|Nil-instance-method","name":"first_byte?","doc":"Returns the first byte (or nil) in this quote.","summary":"Returns the first byte (or nil) in this quote.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":112,"url":null},"def":{"name":"first_byte?","return_type":"UInt8 | ::Nil","visibility":"Public","body":"string.byte_at?(0)"}},{"html_id":"fit(total:Int,ellipsis:_):Quote-instance-method","name":"fit","doc":"Ensures this quote is of *total* characters or less. In case of\noverflow, truncates with *ellipsis*. If even *ellipsis* cannot\nfit, truncates ellipsis so that it is of *total* characters.\nReturns the resulting quote.","summary":"Ensures this quote is of total characters or less.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"args_string":"(total : Int, ellipsis : _) : Quote","args_html":"(total : Int, ellipsis : _) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":94,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"_"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"ord?:Int32|Nil-instance-method","name":"ord?","doc":"Returns the Unicode codepoint for the first character in\nthis quote, or nil if this quote is empty.","summary":"Returns the Unicode codepoint for the first character in this quote, or nil if this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":118,"url":null},"def":{"name":"ord?","return_type":"Int32 | ::Nil","visibility":"Public","body":"if empty?\nelse\n string[0].ord\nend"}},{"html_id":"pad(total:Int,padder:_,side:PadSide):Quote-instance-method","name":"pad","doc":"Pads this quote with *padder* until it becomes *total* perceived\ncharacters long. The side where the padding should apply is specified\nby *side*. Returns the resulting quote.","summary":"Pads this quote with padder until it becomes total perceived characters long.
","abstract":true,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : _, side : PadSide) : Quote","args_html":"(total : Int, padder : _, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":88,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"_"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":true,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":83,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":""}},{"html_id":"slice_at(slicept:Int32):Tuple(Quote,Quote)-instance-method","name":"slice_at","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Dies if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote)","args_html":"(slicept : Int32) : Tuple(Quote, Quote)","location":{"filename":"src/novika/forms/quote.cr","line_number":145,"url":null},"def":{"name":"slice_at","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote)","visibility":"Public","body":"(slice_at?(slicept)) || (die(\"slicepoint is out of bounds: #{slicept}\"))"}},{"html_id":"slice_at?(slicept:Int32):Tuple(Quote,Quote)|Nil-instance-method","name":"slice_at?","doc":"Slices this quote into two quotes at *slicept*. Returns\nthe two resulting quotes. Returns nil if *slicept* is out\nof bounds.","summary":"Slices this quote into two quotes at slicept.
","abstract":false,"args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"args_string":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","args_html":"(slicept : Int32) : Tuple(Quote, Quote) | Nil","location":{"filename":"src/novika/forms/quote.cr","line_number":152,"url":null},"def":{"name":"slice_at?","args":[{"name":"slicept","external_name":"slicept","restriction":"Int32"}],"return_type":"::Tuple(Quote, Quote) | ::Nil","visibility":"Public","body":"size = count\nif size.zero?\n return\nend\nif slicept.in?(0..size)\nelse\n return\nend\nif slicept.zero?\n {EMPTY, self}\nelse\n if slicept == size\n {self, EMPTY}\n else\n slice_at!(slicept, size)\n end\nend\n"}},{"html_id":"stitch(other:Quote):Quote-instance-method","name":"stitch","doc":"Stitches (concatenates) this and *other* quote variants,\nand returns the resulting quote.","summary":"Stitches (concatenates) this and other quote variants, and returns the resulting quote.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Quote","args_html":"(other : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":124,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if empty?\n return other\nend\nif other.empty?\n return self\nend\na = cached_count?\nb = other.cached_count?\nif a && b\n StringQuote.new(string + other.string, count: a + b)\nelse\n StringQuote.new(res = string + other.string, count: res.grapheme_size)\nend\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Returns an immutable Byteslice
representation of this quote.
Returns this form's quote representation.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":172,"url":null},"def":{"name":"to_quote","return_type":"Quote","visibility":"Public","body":"self"}}],"types":[{"html_id":"novika/Novika/Quote/GraphemeQuote","path":"Novika/Quote/GraphemeQuote.html","kind":"struct","full_name":"Novika::Quote::GraphemeQuote","name":"GraphemeQuote","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/quote.cr","line_number":496,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Quote type for a single grapheme (perceived character).","summary":"Quote type for a single grapheme (perceived character).
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":505,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(grapheme:String::Grapheme)-class-method","name":"new","abstract":false,"args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"args_string":"(grapheme : String::Grapheme)","args_html":"(grapheme : String::Grapheme)","location":{"filename":"src/novika/forms/quote.cr","line_number":502,"url":null},"def":{"name":"new","args":[{"name":"grapheme","external_name":"grapheme","restriction":"String::Grapheme"}],"visibility":"Public","body":"_ = allocate\n_.initialize(grapheme)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":552,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(GraphemeQuote) && (other.grapheme == grapheme)"}},{"html_id":"as_byte?-instance-method","name":"as_byte?","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":509,"url":null},"def":{"name":"as_byte?","visibility":"Public","body":"if char = (grapheme.@cluster).as?(Char)\nelse\n return\nend\nif char.ascii?\nelse\n return\nend\nchar.ord\n"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":527,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b == e ? self : EMPTY"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached count of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":541,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"1"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.\n\nGrapheme quotes always return 1.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":534,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"1"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":606,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"if grapheme == pattern.grapheme\n yield 0\nend"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":612,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":0,"block_arity":0,"visibility":"Public","body":""}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.\n\nGrapheme quotes always return false.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":548,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"false"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":600,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nself\n"}},{"html_id":"grapheme:String::Grapheme-instance-method","name":"grapheme","doc":"Returns the grapheme.","summary":"Returns the grapheme.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":500,"url":null},"def":{"name":"grapheme","return_type":"String::Grapheme","visibility":"Public","body":"@grapheme"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":556,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total <= 1\n return self\nend\nif total == 2\n padding = padder\nelse\n string = String.build do |io|\n last = padder.grapheme\n (total - 1).times do\n io << last\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":575,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total <= 1\n return self\nend\nif total == 2\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - 1\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":624,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"self == pattern ? repl : self"}},{"html_id":"stitch(other:StringQuote):Quote-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote) : Quote","args_html":"(other : StringQuote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":519,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"return_type":"Quote","visibility":"Public","body":"other.empty? ? self : super(other)"}},{"html_id":"string:String-instance-method","name":"string","doc":"Converts this quote variant to `String`.","summary":"Converts this quote variant to String
.
Apply padding to the left of the quote.
"},{"id":"Right","name":"Right","value":"1","doc":"Apply padding to the right of the quote.","summary":"Apply padding to the right of the quote.
"}],"namespace":{"html_id":"novika/Novika/Quote","kind":"module","full_name":"Novika::Quote","name":"Quote"},"doc":"Represents the side where padding should apply.\n\nSee `Quote#pad`.","summary":"Represents the side where padding should apply.
","instance_methods":[{"html_id":"apply(quote:Quote,padding:Quote)-instance-method","name":"apply","doc":"Applies padding to the side specified by `self`.","summary":"Applies padding to the side specified by self
.
Quote type for multiple (two or more), or no graphemes.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":241,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"quote\""}}],"constructors":[{"html_id":"new(string:String,countcached_count:Int32|Nil=nil,ascii_only:Bool=string.ascii_only?)-class-method","name":"new","doc":"Creates a string quote from the given *string*.","summary":"Creates a string quote from the given string.
","abstract":false,"args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"args_string":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","args_html":"(string : String, count cached_count : Int32 | Nil = nil, ascii_only : Bool = string.ascii_only?)","location":{"filename":"src/novika/forms/quote.cr","line_number":237,"url":null},"def":{"name":"new","args":[{"name":"string","external_name":"string","restriction":"String"},{"name":"cached_count","default_value":"nil","external_name":"count","restriction":"Int32 | ::Nil"},{"name":"ascii_only","default_value":"string.ascii_only?","external_name":"ascii_only","restriction":"::Bool"}],"visibility":"Public","body":"_ = allocate\n_.initialize(string, cached_count, ascii_only)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:Quote):Bool-instance-method","name":"==","doc":"Returns whether this quote variant consists of the same\ngraphemes as *other*.","summary":"Returns whether this quote variant consists of the same graphemes as other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Quote"}],"args_string":"(other : Quote) : Bool","args_html":"(other : Quote) : Bool","location":{"filename":"src/novika/forms/quote.cr","line_number":350,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"Quote"}],"return_type":"Bool","visibility":"Public","body":"other.is_a?(StringQuote) && (string == other.string)"}},{"html_id":"ascii_only?:Bool-instance-method","name":"ascii_only?","doc":"Returns whether this string quote consists of ASCII\ncharacters only.","summary":"Returns whether this string quote consists of ASCII characters only.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":234,"url":null},"def":{"name":"ascii_only?","return_type":"Bool","visibility":"Public","body":"@ascii_only"}},{"html_id":"at(b:Int32,e:Int32):Quote-instance-method","name":"at","doc":"Returns a subquote from *b* to *e*. Clamps *b* and *e*\nto bounds of this quote. Returns an empty quote if this\nquote is empty without regarding *b* and *e*.\n\nBoth ends are inclusive.","summary":"Returns a subquote from b to e.
","abstract":false,"args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"args_string":"(b : Int32, e : Int32) : Quote","args_html":"(b : Int32, e : Int32) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":298,"url":null},"def":{"name":"at","args":[{"name":"b","external_name":"b","restriction":"Int32"},{"name":"e","external_name":"e","restriction":"Int32"}],"return_type":"Quote","visibility":"Public","body":"b = Math.max(b, 0)\ne = Math.min(e, count - 1)\nif (b == 0) && (e == (count - 1))\n return self\nend\nif b == e\n return (at?(b)).not_nil!\nend\nif ascii_only?\n StringQuote.new((b..e).join do |index|\n byte = (string.byte_at?(index)).not_nil!\n byte < 128 ? byte.unsafe_chr : Char::REPLACEMENT\n end, count: e - b, ascii_only: true)\nelse\n StringQuote.new(String.build do |io|\n index = 0\n string.each_grapheme do |grapheme|\n if index < b\n index = index + 1\n next\n end\n if index > e\n break\n end\n io << grapheme\n index = index + 1\n end\n end, count: e - b, ascii_only: false)\nend\n"}},{"html_id":"at?(index:Int32):GraphemeQuote|Nil-instance-method","name":"at?","doc":"Returns the grapheme at *index* as `Quote`, or nil.","summary":"Returns the grapheme at index as Quote
, or nil.
Returns the cached perceived character count in this string quote, or nil.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":230,"url":null},"def":{"name":"cached_count?","return_type":"Int32 | ::Nil","visibility":"Public","body":"@cached_count"}},{"html_id":"count:Int32-instance-method","name":"count","doc":"Returns the amount of graphemes in this quote variant.","summary":"Returns the amount of graphemes in this quote variant.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":342,"url":null},"def":{"name":"count","return_type":"Int32","visibility":"Public","body":"cached_count? || string.grapheme_size"}},{"html_id":"each_occurrence_of(pattern:StringQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"args_string":"(pattern : StringQuote, &)","args_html":"(pattern : StringQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":431,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"StringQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"kmp(string, pattern.string, ascii: ascii_only? && pattern.ascii_only?) do |index|\n yield index\nend"}},{"html_id":"each_occurrence_of(pattern:GraphemeQuote,&)-instance-method","name":"each_occurrence_of","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"args_string":"(pattern : GraphemeQuote, &)","args_html":"(pattern : GraphemeQuote, &)","location":{"filename":"src/novika/forms/quote.cr","line_number":409,"url":null},"def":{"name":"each_occurrence_of","args":[{"name":"pattern","external_name":"pattern","restriction":"GraphemeQuote"}],"yields":1,"block_arity":1,"visibility":"Public","body":"index = 0\nif ascii_only? && (pattern_byte = pattern.as_byte?)\n string.each_byte do |byte|\n if byte == pattern_byte\n yield index\n end\n index = index + 1\n end\nelse\n string.each_grapheme do |grapheme|\n if grapheme == pattern.grapheme\n yield index\n end\n index = index + 1\n end\nend\n"}},{"html_id":"empty?:Bool-instance-method","name":"empty?","doc":"Returns whether this quote is empty.","summary":"Returns whether this quote is empty.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":346,"url":null},"def":{"name":"empty?","return_type":"Bool","visibility":"Public","body":"string.empty?"}},{"html_id":"fit(total:Int,ellipsis:Quote):Quote-instance-method","name":"fit","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"args_string":"(total : Int, ellipsis : Quote) : Quote","args_html":"(total : Int, ellipsis : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":397,"url":null},"def":{"name":"fit","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"ellipsis","external_name":"ellipsis","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"if total == 0\n return StringQuote.new(\"\")\nend\nif count <= total\n return self\nend\nnvisible = total - ellipsis.count\nif nvisible <= 0\n return ellipsis.at(0, total - 1)\nend\n(at(0, nvisible - 1)).stitch(ellipsis)\n"}},{"html_id":"pad(total:Int,padder:StringQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : StringQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : StringQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":372,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"StringQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if padder.empty?\n return self\nend\nif total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder.at(0)\nelse\n string = String.build(total) do |io|\n needed = total - count\n head = padder.at(0, Math.min(padder.count - 2, needed - 1))\n tail = (padder.at(Math.min(padder.count - 1, needed))).string\n io << head.string\n (needed - head.count).times do\n io << tail\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"pad(total:Int,padder:GraphemeQuote,side:PadSide):Quote-instance-method","name":"pad","abstract":false,"args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"args_string":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","args_html":"(total : Int, padder : GraphemeQuote, side : PadSide) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":354,"url":null},"def":{"name":"pad","args":[{"name":"total","external_name":"total","restriction":"Int"},{"name":"padder","external_name":"padder","restriction":"GraphemeQuote"},{"name":"side","external_name":"side","restriction":"PadSide"}],"return_type":"Quote","visibility":"Public","body":"if total > count\nelse\n return self\nend\nif total == (count + 1)\n padding = padder\nelse\n string = String.build(total) do |io|\n (total - count).times do\n io << padder.grapheme\n end\n end\n padding = StringQuote.new(string)\nend\nside.apply(self, padding)\n"}},{"html_id":"replace_all(pattern:Quote,repl:Quote):Quote-instance-method","name":"replace_all","doc":"Replaces instances of *pattern* with *repl*. Returns\nthe resulting quote.","summary":"Replaces instances of pattern with repl.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"args_string":"(pattern : Quote, repl : Quote) : Quote","args_html":"(pattern : Quote, repl : Quote) : Quote","location":{"filename":"src/novika/forms/quote.cr","line_number":486,"url":null},"def":{"name":"replace_all","args":[{"name":"pattern","external_name":"pattern","restriction":"Quote"},{"name":"repl","external_name":"repl","restriction":"Quote"}],"return_type":"Quote","visibility":"Public","body":"Quote.new(string.gsub(pattern.string, repl.string))"}},{"html_id":"stitch(other:StringQuote)-instance-method","name":"stitch","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"args_string":"(other : StringQuote)","args_html":"(other : StringQuote)","location":{"filename":"src/novika/forms/quote.cr","line_number":333,"url":null},"def":{"name":"stitch","args":[{"name":"other","external_name":"other","restriction":"StringQuote"}],"visibility":"Public","body":"if ascii_only? && other.ascii_only?\nelse\n return super(other)\nend\nStringQuote.new(res = string + other.string, count: res.bytesize, ascii_only: true)\n"}},{"html_id":"string:String-instance-method","name":"string","doc":"Returns the underlying string.","summary":"Returns the underlying string.
","abstract":false,"location":{"filename":"src/novika/forms/quote.cr","line_number":226,"url":null},"def":{"name":"string","return_type":"String","visibility":"Public","body":"@string"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/quote.cr","line_number":490,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"'\"\nstring.dump_unquoted(io)\nio << \"'\"\n"}}]}]},{"html_id":"novika/Novika/QuotedWord","path":"Novika/QuotedWord.html","kind":"struct","full_name":"Novika::QuotedWord","name":"QuotedWord","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":79,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable/ShouldOpenWhenScheduled","kind":"module","full_name":"Novika::Schedulable::ShouldOpenWhenScheduled","name":"ShouldOpenWhenScheduled"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Quoted words are words prefixed by '#': e.g., `#foo`. It\nlets you 'coat' a word: `#foo open` is the same as `foo`,\n`##foo open` is the same as `#foo`, etc. Levels of coating\nare peeled off like in an onion.","summary":"Quoted words are words prefixed by '#': e.g., #foo
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":89,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"quoted word '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":84,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine):self-instance-method","name":"on_parent_open","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":""}],"args_string":"(engine) : self","args_html":"(engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":118,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":""}],"return_type":"self","visibility":"Public","body":"tap do\n peel.onto(engine.stack)\nend"}},{"html_id":"peel-instance-method","name":"peel","doc":"\"Peels\" off a layer of quoting.\n\n```\nQuotedWord.new(\"#foo\").peel # Word.new(\"foo\")\nQuotedWord.new(\"##foo\").peel # QuotedWord.new(\"#foo\")\nQuotedWord.new(\"###foo\").peel # QuotedWord.new(\"##foo\")\n```","summary":""Peels" off a layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":109,"url":null},"def":{"name":"peel","visibility":"Public","body":"id.prefixed_by?('#') ? QuotedWord.new(id.lchop) : Word.new(id)"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds another layer of quoting. Opposite of `peel`.","summary":"Adds another layer of quoting.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":98,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(\"##{@id}\")"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":122,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << '#') << id"}},{"html_id":"to_word:Word-instance-method","name":"to_word","doc":"Converts this quoted word to `Word`.","summary":"Converts this quoted word to Word
.
Snapshot of a quoted word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuotedWordSnapshot]","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:QuotedWord)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"args_string":"(form : QuotedWord)","args_html":"(form : QuotedWord)","location":{"filename":"src/novika/image.cr","line_number":226,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"QuotedWord"}],"visibility":"Public","body":"qword = new\nqword.id = form.id\nqword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":217,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the quoted block.","summary":"Holds the 0-terminated id (name) of the quoted block.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":222,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"QuotedWord.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a quoted word form.\n\nIts type is `SnapshotType::QuotedWord`.","summary":"Snapshot of a quoted word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":216,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/QuoteSnapshot","path":"Novika/QuoteSnapshot.html","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":173,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::QuoteSnapshot]","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: bytesize, cls: UInt64, onlyif: nil, verify: nil, value: -> do\n content.bytesize\nend}, {type: \"string\", name: content, cls: String, onlyif: nil, verify: nil, length: -> do\n bytesize\nend, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Quote)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Quote"}],"args_string":"(form : Quote)","args_html":"(form : Quote)","location":{"filename":"src/novika/image.cr","line_number":186,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Quote"}],"visibility":"Public","body":"quote = new\nquote.content = form.string\nquote\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":174,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"bytesize:UInt64-instance-method","name":"bytesize","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"def":{"name":"bytesize","return_type":"UInt64","visibility":"Public","body":"@bytesize"}},{"html_id":"bytesize=(bytesize:UInt64)-instance-method","name":"bytesize=","doc":"Holds the size of quote content, in bytes.","summary":"Holds the size of quote content, in bytes.
","abstract":false,"args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"args_string":"(bytesize : UInt64)","args_html":"(bytesize : UInt64)","def":{"name":"bytesize=","args":[{"name":"bytesize","external_name":"bytesize","restriction":"UInt64"}],"visibility":"Public","body":"@bytesize = bytesize"}},{"html_id":"content:String-instance-method","name":"content","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"def":{"name":"content","return_type":"String","visibility":"Public","body":"@content"}},{"html_id":"content=(content:String)-instance-method","name":"content=","doc":"Holds the content string.","summary":"Holds the content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String)","args_html":"(content : String)","def":{"name":"content=","args":[{"name":"content","external_name":"content","restriction":"String"}],"visibility":"Public","body":"@content = content"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":182,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Quote.new(content)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a quote form, stored as bytesize followed by\ncontent. The latter is due to the fact that `\\0` is a\nvalid content character in quotes.\n\nIts type is `SnapshotType::Quote`.","summary":"Snapshot of a quote form, stored as bytesize followed by content.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":173,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Resolver","path":"Novika/Resolver.html","kind":"module","full_name":"Novika::Resolver","name":"Resolver","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENV_GLOBAL_DIRNAME","name":"ENV_GLOBAL_DIRNAME","value":"\".novika\"","doc":"Specifies the name of the global environment directory.","summary":"Specifies the name of the global environment directory.
"},{"id":"ENV_LOCAL_DIRNAME","name":"ENV_LOCAL_DIRNAME","value":"\"env\"","doc":"Specifies the name of the local environment directory.","summary":"Specifies the name of the local environment directory.
"},{"id":"ENV_LOCAL_PROOF_FILENAME","name":"ENV_LOCAL_PROOF_FILENAME","value":"\".nk.env\"","doc":"Specifies the name of the file that is going to be used as the\nproof that the directory at hand is not simply called 'env',\nbut is actually intended as a Novika environment directory.","summary":"Specifies the name of the file that is going to be used as the proof that the directory at hand is not simply called 'env', but is actually intended as a Novika environment directory.
"},{"id":"PERMISSIONS_FILENAME","name":"PERMISSIONS_FILENAME","value":"\"permissions\"","doc":"Specifies the name of the file that will contain saved permissions.","summary":"Specifies the name of the file that will contain saved permissions.
"},{"id":"PREAMBLES_ENTRY_NAME","name":"PREAMBLES_ENTRY_NAME","value":"Word.new(\"__preambles__\")","doc":"Specifies the name of the entry that holds the preambles.","summary":"Specifies the name of the entry that holds the preambles.
"},{"id":"RESOLVER_RECURSION_LIMIT","name":"RESOLVER_RECURSION_LIMIT","value":"64","doc":"Recursion limit for the resolver. Doesn't have to be big, it's\nbasically file system depth which isn't too big most of the time.","summary":"Recursion limit for the resolver.
"}],"including_types":[{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"types":[{"html_id":"novika/Novika/Resolver/ChildSlot","path":"Novika/Resolver/ChildSlot.html","kind":"class","full_name":"Novika::Resolver::ChildSlot","name":"ChildSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1423,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"runnables of whomever\ninherits me\".","summary":"Slot (placeholder) that stands for "runnables of whomever inherits me".
","instance_methods":[{"html_id":"replace(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present,population:RunnableContainer,container:RunnableContainer):RunnableContainer-instance-method","name":"replace","doc":"Replaces any occurences of this slot in *container* with a\ncontainer holding the runnables this slot stands for.\n\n*manifest* is the manifest that contains this slot.\n\n*group* is the `RunnableGroup` of the manifest that contains\nthis slot.\n\nReturns the next population container.","summary":"Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1424,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"content = population.child(transparent: false, ancestor: self)\ncontainer.replace(self, content)\ncontent\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1442,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[<>]\""}}]},{"html_id":"novika/Novika/Resolver/Designation","path":"Novika/Resolver/Designation.html","kind":"struct","full_name":"Novika::Resolver::Designation","name":"Designation","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":768,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Designation objects encapsulate a runnable environment and a set\nof resolutions that should be run within that environment.\n\nThe preferred way to create designations is via `RunnableEnvironment#designate`.\n\nAfter obtaining a designation, you can `run` it as many times as\nyou want.","summary":"Designation objects encapsulate a runnable environment and a set of resolutions that should be run within that environment.
","constructors":[{"html_id":"new(root:RunnableRoot,env:RunnableEnvironment,set:ResolutionSet,caps:CapabilityCollection)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"args_string":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","args_html":"(root : RunnableRoot, env : RunnableEnvironment, set : ResolutionSet, caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":772,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"set","external_name":"set","restriction":"ResolutionSet"},{"name":"caps","external_name":"caps","restriction":"CapabilityCollection"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, env, set, caps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"caps:Novika::CapabilityCollection-instance-method","name":"caps","doc":"Returns this designation's own capability collection.","summary":"Returns this designation's own capability collection.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":770,"url":null},"def":{"name":"caps","visibility":"Public","body":"@caps"}},{"html_id":"label:String-instance-method","name":"label","doc":"Returns the label of this designation. It is formed from the\nbasename of this designation's runnable environment.","summary":"Returns the label of this designation.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":837,"url":null},"def":{"name":"label","return_type":"String","visibility":"Public","body":"if envpath = @env.abspath?\nelse\n return \"unknown\"\nend\nenvpath.basename\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the designated resolutions under a new common toplevel block.","summary":"Runs the designated resolutions under a new common toplevel block.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":861,"url":null},"def":{"name":"run","visibility":"Public","body":"preambles = Block.new\nfill_preambles_block(preambles)\ntoplevel = Block.new(@caps.block)\ntoplevel.at(Word.new(\"__runtime__\"), Quote.new(\"novika\"))\ntoplevel.at(PREAMBLES_ENTRY_NAME, preambles)\nengine = Engine.push(@caps)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(toplevel)).slurp(source)\n instance = resolution.run(engine, script_block: script)\n toplevel.import!(from: instance)\nend\nEngine.pop(engine)\n"}},{"html_id":"slurp(target:Block)-instance-method","name":"slurp","doc":"Parses the designated resolutions and appends the parsed forms to\n*target*. Their order is kept, and matches that of the designated\nresolutions.","summary":"Parses the designated resolutions and appends the parsed forms to target.
","abstract":false,"args":[{"name":"target","external_name":"target","restriction":"Block"}],"args_string":"(target : Block)","args_html":"(target : Block)","location":{"filename":"src/novika/resolver.cr","line_number":846,"url":null},"def":{"name":"slurp","args":[{"name":"target","external_name":"target","restriction":"Block"}],"visibility":"Public","body":"preambles = (target.form_for?(PREAMBLES_ENTRY_NAME)).as?(Block)\npreambles || (preambles = Block.new)\nfill_preambles_block(preambles)\ntarget.at(PREAMBLES_ENTRY_NAME, preambles)\n@set.each do |resolution|\n source = @root.disk.read(resolution.abspath)\n script = (Block.new(target)).slurp(source)\n target.paste(script)\nend\n"}},{"html_id":"to_s(io,sm=false)-instance-method","name":"to_s","doc":"Appends the string representation of this designation to *io*.\n\n*sm*, if set to true, enables SMall output mode. In this mode,\nonly relative paths of the designated resolutions are appended\nto *io*, separated by newlines.","summary":"Appends the string representation of this designation to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"args_string":"(io, sm = false)","args_html":"(io, sm = false)","location":{"filename":"src/novika/resolver.cr","line_number":889,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""},{"name":"sm","default_value":"false","external_name":"sm","restriction":""}],"visibility":"Public","body":"envpath = @env.abspath?\nif sm && envpath\n @set.each do |resolution|\n io.puts((resolution.abspath.relative_to?(envpath)) || resolution.abspath)\n end\n return\nend\nenvpath || (envpath = \"unknown\")\n(io << envpath) << \": [\\n\"\n@set.each do |resolution|\n ((io << \" \") << resolution.abspath) << \",\\n\"\nend\nio << \"]\\n\"\n"}}]},{"html_id":"novika/Novika/Resolver/Disk","path":"Novika/Resolver/Disk.html","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":131,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"InfoAbsent","name":"InfoAbsent","value":"InfoAbsence.new","doc":"Singleton instance of `InfoAbsence`.","summary":"Singleton instance of InfoAbsence
.
A caching, resolver-specific file system access abstraction on top of Crystal's Dir
and File
.
If path (symlink or not) points to a directory, returns the real path to that directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":224,"url":null},"def":{"name":"dir?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.directory?\nelse\n return\nend\npresence.path\n"}},{"html_id":"env?(origin:Path):Path|Nil-instance-method","name":"env?","doc":"Determines and returns the path to the environment directory,\nif any. Otherwise, returns nil.\n\nClimbs up from *origin* until encountering:\n\n- A file named '.nk.env'\n- A directory named 'env' containing a file named '.nk.env'\n- A directory named '.novika'\n\nThe result is cached, recursively, so you can call this method\nas many times as you'd like; your disk won't explode.","summary":"Determines and returns the path to the environment directory, if any.
","abstract":false,"args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"args_string":"(origin : Path) : Path | Nil","args_html":"(origin : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":327,"url":null},"def":{"name":"env?","args":[{"name":"origin","external_name":"origin","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"env : Path | ::Nil\nif env = @envs[origin]?\n return env\nend\nif file?(origin / ENV_LOCAL_PROOF_FILENAME)\n return @envs[origin] = origin\nend\nif env = dir?(origin / ENV_GLOBAL_DIRNAME)\n return @envs[origin] = env\nend\nif (env = dir?(origin / ENV_LOCAL_DIRNAME)) && (file?(env / ENV_LOCAL_PROOF_FILENAME))\n return @envs[origin] = env\nend\nif (origin == origin.root) && (env = dir?(Path.home / ENV_GLOBAL_DIRNAME))\n return @envs[origin] = env\nend\nif origin == origin.anchor\n return\nend\nif env = env?(origin.parent)\nelse\n return\nend\n@envs[origin] = env\n"}},{"html_id":"file?(path:Path):Path|Nil-instance-method","name":"file?","doc":"If *path* (symlink or not) points to a file, returns the real\npath to that file. Otherwise, returns nil.","summary":"If path (symlink or not) points to a file, returns the real path to that file.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Path | Nil","args_html":"(path : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":215,"url":null},"def":{"name":"file?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if presence = info?(path)\nelse\n return\nend\nif presence.info.file?\nelse\n return\nend\npresence.path\n"}},{"html_id":"glob(origin:Path,selector:GlobSelector,&fn:Path->)-instance-method","name":"glob","doc":"A simpler, Novika- and `Disk`-specific globbing mechanism.\n\nCalls *fn* with paths in *origin* directory that match the\ngiven *selector*.","summary":"A simpler, Novika- and Disk
-specific globbing mechanism.
Reads, caches, and returns the InfoPresence
object for the given path.
Returns the content of the file that path points to.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : String | Nil","args_html":"(path : Path) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":234,"url":null},"def":{"name":"read","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"String | ::Nil","visibility":"Public","body":"@content.put_if_absent(path) do\n File.read(path)\nend"}},{"html_id":"write(path:Path,&:IO->)-instance-method","name":"write","doc":"Yields writable `IO` for the file that *path* points to. The\nfile is created if it does not exist; its content is cleared\nif it does.","summary":"Yields writable IO
for the file that path points to.
Represents the absence of the requested file system entry.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":144,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/Disk/InfoPresence","path":"Novika/Resolver/Disk/InfoPresence.html","kind":"struct","full_name":"Novika::Resolver::Disk::InfoPresence","name":"InfoPresence","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":137,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Disk","kind":"class","full_name":"Novika::Resolver::Disk","name":"Disk"},"doc":"Represents the presence of the requested file system entry\n(directory, file, or symlink) at `path`. Also holds its\n`File::Info` object, `info`.\n\nSee `info?`.","summary":"Represents the presence of the requested file system entry (directory, file, or symlink) at #path
.
Asks signal receivers to load whatever data they can (and should) from disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":62,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/DoDiskSave","path":"Novika/Resolver/DoDiskSave.html","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":66,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Asks signal receivers to save whatever data they can\n(and should) to disk.","summary":"Asks signal receivers to save whatever data they can (and should) to disk.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"new","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new()"}},{"html_id":"copy_with-instance-method","name":"copy_with","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":66,"url":null},"def":{"name":"copy_with","visibility":"Public","body":"self.class.new()"}}]},{"html_id":"novika/Novika/Resolver/GlobSelector","path":"Novika/Resolver/GlobSelector.html","kind":"enum","full_name":"Novika::Resolver::GlobSelector","name":"GlobSelector","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":34,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Scripts","name":"Scripts","value":"0","doc":"Match all Novika scripts (glob '*.nk')","summary":"Match all Novika scripts (glob '*.nk')
"},{"id":"Directories","name":"Directories","value":"1","doc":"Match all subdirectories (glob '*/')","summary":"Match all subdirectories (glob '*/')
"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selector for `Disk#glob`.","summary":"Selector for Disk#glob
.
Includers are manifests in RunnableGroup
s.
Creates and returns a manifest object if path contains a manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil) : Manifest","args_html":"(disk : Disk, path : Path, ancestor = nil) : Manifest","location":{"filename":"src/novika/resolver.cr","line_number":1560,"url":null},"def":{"name":"find","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"return_type":"Manifest","visibility":"Public","body":"((Lib.find?(disk, path, ancestor)) || (App.find?(disk, path, ancestor))) || Absent.new"}}],"instance_methods":[{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1570,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\n"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","doc":"Populates *container* with runnables from *origin* according\nto the content of the manifest.\n\n* If there is no explicit `*` or `**`, `**` is automatically\n inserted at the very beginning of the manifest regardless\n of whether it is an application manifest or a library manifest.\n\n* A directory with no manifest is laid out directly using `layout`,\n since there is no \"manifest content\" to speak of.","summary":"Populates container with runnables from origin according to the content of the manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1587,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: true, ancestor: origin)\npopulation.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.append(population)\nroot.assign(origin, container: population)\nlayout(population, origin)\n"}}],"types":[{"html_id":"novika/Novika/Resolver/Manifest/Absent","path":"Novika/Resolver/Manifest/Absent.html","kind":"struct","full_name":"Novika::Resolver::Manifest::Absent","name":"Absent","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1817,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the absence of a manifest.","summary":"Represents the absence of a manifest.
","constructors":[{"html_id":"new-class-method","name":"new","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"new","visibility":"Public","body":"x = allocate\nif x.responds_to?(:finalize)\n ::GC.add_finalizer(x)\nend\nx\n"}}],"instance_methods":[{"html_id":"initialize-instance-method","name":"initialize","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1817,"url":null},"def":{"name":"initialize","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Manifest/App","path":"Novika/Resolver/Manifest/App.html","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1760,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.app\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents an application manifest.","summary":"Represents an application manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an application manifest object if\n*path* contains an application manifest. Otherwise,\nreturns nil.","summary":"Creates and returns an application manifest object if path contains an application manifest.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1777,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new application manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new application manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1771,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1766,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"layout(container:RunnableContainer,group:RunnableGroup)-instance-method","name":"layout","doc":"Populates *container* with runnables from *group* according\nto this manifest's default layout.\n\n* For application manifests, it's `* ** entry.nk`.\n* For library manifests and directories with no manifest, it's\n `entry.nk * **`.","summary":"Populates container with runnables from group according to this manifest's default layout.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(container : RunnableContainer, group : RunnableGroup)","args_html":"(container : RunnableContainer, group : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1783,"url":null},"def":{"name":"layout","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"visibility":"Public","body":"entry = group.entry_name\ncontainer.append(RunnableSelector.new(GlobSelector::Scripts, reject: Set {entry}, ancestor: group))\ncontainer.append(RunnableSelector.new(GlobSelector::Directories, ancestor: group))\ncontainer.append(RunnableQuery.new(group.abspath / entry, ancestor: group, else: nil))\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","path":"Novika/Resolver/Manifest/CommentPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1520,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off comments from manifest content.","summary":"Strips off comments from manifest content.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1525,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"FlagPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1521,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/^\\s*#[^\\n]*/m, \"\")"}}]},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","path":"Novika/Resolver/Manifest/FlagPreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1532,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Expands expressions such as `[windows, ... => dll, so]`, if found\nin manifest content: substitutes each with the appropriate value.","summary":"Expands expressions such as `[windows, ...
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1554,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":""}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1533,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content.gsub(/\\[([^\\]]+)\\]/) do |exp|\n case $~[1]\n when /^\\s*((?:\\w|\\.\\.\\.)+(?:\\s*,\\s*(?:\\w|\\.\\.\\.)+)*)\\s*\\|\\s*(\\w+(?:\\s*,\\s*\\w+)*)$/\n flags = $~[1].split(/\\s*,\\s*/, remove_empty: true)\n blocks = $~[2].split(/\\s*,\\s*/, remove_empty: true)\n if flags.size == blocks.size\n else\n next exp\n end\n branches = Hash.zip(flags, blocks)\n branch = branches[\"...\"]?\n @root.each_set_flag do |flag|\n if block = branches[flag]?\n else\n next\n end\n break branch = block\n end\n branch || \"\"\n end\nend"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Lib","path":"Novika/Resolver/Manifest/Lib.html","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1793,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"FILENAME","name":"FILENAME","value":"\".nk.lib\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents a library manifest.","summary":"Represents a library manifest.
","class_methods":[{"html_id":"find?(disk:Disk,path:Path,ancestor=nil)-class-method","name":"find?","doc":"Creates and returns an library manifest object if *path*\ncontains a library manifest, returns nil.","summary":"Creates and returns an library manifest object if path contains a library manifest, returns nil.
","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(disk : Disk, path : Path, ancestor = nil)","args_html":"(disk : Disk, path : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1809,"url":null},"def":{"name":"find?","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"if datum = disk.file?(path / FILENAME)\nelse\n return\nend\nnew(datum, ancestor)\n"}}],"constructors":[{"html_id":"new(path:Path,ancestor:Novika::Resolver::Runnable::Ancestor|Nil)-class-method","name":"new","doc":"Creates a new library manifest.\n\n*path* is a *normalized* path pointing to the manifest.","summary":"Creates a new library manifest.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"args_string":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","args_html":"(path : Path, ancestor : Novika::Resolver::Runnable::Ancestor | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1804,"url":null},"def":{"name":"new","args":[{"name":"path","external_name":"path","restriction":"Path"},{"name":"ancestor","external_name":"ancestor","restriction":"::Novika::Resolver::Runnable::Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(path, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Runnable::Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this object, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1799,"url":null},"def":{"name":"ancestor?","return_type":"Runnable::Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}}]},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","path":"Novika/Resolver/Manifest/PreamblePreprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},"ancestors":[{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1491,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Strips off manifest preamble and makes the manifest acknowledge it.","summary":"Strips off manifest preamble and makes the manifest acknowledge it.
","instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1514,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"CommentPreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1492,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"open = content.match(/^\\s*---\\s*$/m)\nif open\nelse\n return content\nend\nclose = content.match(/^\\s*---\\s*$/m, pos: open.end)\nrange_outer = open.begin...(close ? close.end : content.size)\nrange_inner = open.end...(close ? close.begin : content.size)\npreamble = content[range_inner].strip\n@manifest.on_preamble(@root, @group, preamble)\ncontent.sub(range_outer, \"\")\n"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Preprocessor","path":"Novika/Resolver/Manifest/Preprocessor.html","kind":"class","full_name":"Novika::Resolver::Manifest::Preprocessor","name":"Preprocessor","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1468,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/Manifest/CommentPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::CommentPreprocessor","name":"CommentPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/FlagPreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::FlagPreprocessor","name":"FlagPreprocessor"},{"html_id":"novika/Novika/Resolver/Manifest/PreamblePreprocessor","kind":"class","full_name":"Novika::Resolver::Manifest::PreamblePreprocessor","name":"PreamblePreprocessor"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Base class for several *subtractive preprocessors* for\nmanifest content.\n\nThey are *subtractive* because they *discard* stuff, at\nleast from the original content's point of view.\n\nAlso, one might say *subtractive preprocessors* match \"edges\"\nrather than by \"structure\". If done repeatedly and so to speak\nrecursively, one might finally arrive at \"grains\" coarse enough\nfor \"real\" content analysis. In this sense subtractive\npreprocessors are \"noise-friendly\" -- and that's just what we\nwant. Moreover, they may consider each other \"noise\", too.\n\nPreprocessors can be chained, and can programmaticaly select\nthe next preprocessor (or become the terminal one) in `next?`.","summary":"Base class for several subtractive preprocessors for manifest content.
","constructors":[{"html_id":"new(root:RunnableRoot,group:RunnableGroup,manifest:Manifest::Present)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present)","location":{"filename":"src/novika/resolver.cr","line_number":1469,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, group, manifest)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"next?:Preprocessor|Nil-instance-method","name":"next?","doc":"Returns the next preprocessor in the chain, or nil if\nthis preprocessor is terminal.","summary":"Returns the next preprocessor in the chain, or nil if this preprocessor is terminal.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1485,"url":null},"def":{"name":"next?","return_type":"Preprocessor | ::Nil","visibility":"Public","body":"PreamblePreprocessor.new(@root, @group, @manifest)"}},{"html_id":"preprocess(content:String):String-instance-method","name":"preprocess","doc":"Returns subtractively preprocessed *content* string. That\nis, the returned string will be shorter or of the same\nlength as *content*.","summary":"Returns subtractively preprocessed content string.
","abstract":false,"args":[{"name":"content","external_name":"content","restriction":"String"}],"args_string":"(content : String) : String","args_html":"(content : String) : String","location":{"filename":"src/novika/resolver.cr","line_number":1479,"url":null},"def":{"name":"preprocess","args":[{"name":"content","external_name":"content","restriction":"String"}],"return_type":"String","visibility":"Public","body":"content"}}]},{"html_id":"novika/Novika/Resolver/Manifest/Present","path":"Novika/Resolver/Manifest/Present.html","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present","abstract":false,"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1599,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"DIRECTIVES","name":"DIRECTIVES","value":"Set {\"noinherit\", \"nolayout\"}","doc":"A set of allowed manifest directives.","summary":"A set of allowed manifest directives.
"}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/App","kind":"class","full_name":"Novika::Resolver::Manifest::App","name":"App"},{"html_id":"novika/Novika/Resolver/Manifest/Lib","kind":"class","full_name":"Novika::Resolver::Manifest::Lib","name":"Lib"}],"namespace":{"html_id":"novika/Novika/Resolver/Manifest","kind":"module","full_name":"Novika::Resolver::Manifest","name":"Manifest"},"doc":"Represents the presence of a manifest.","summary":"Represents the presence of a manifest.
","instance_methods":[{"html_id":"directory-instance-method","name":"directory","doc":"Returns a path that points to the directory where this\nmanifest is located.","summary":"Returns a path that points to the directory where this manifest is located.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1607,"url":null},"def":{"name":"directory","visibility":"Public","body":"@path.parent"}},{"html_id":"on_preamble(root:RunnableRoot,group:RunnableGroup,preamble:String)-instance-method","name":"on_preamble","doc":"Invoked when a preamble is found in this manifest. *preamble*\nis the inner content of the preamble (i.e. without `---`s).","summary":"Invoked when a preamble is found in this manifest.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","args_html":"(root : RunnableRoot, group : RunnableGroup, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":1613,"url":null},"def":{"name":"on_preamble","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"preamble","external_name":"preamble","restriction":"String"}],"visibility":"Public","body":"root.assign(group, preamble: preamble)"}},{"html_id":"populate(root:RunnableRoot,container:RunnableContainer,origin:RunnableGroup)-instance-method","name":"populate","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"args_string":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","args_html":"(root : RunnableRoot, container : RunnableContainer, origin : RunnableGroup)","location":{"filename":"src/novika/resolver.cr","line_number":1726,"url":null},"def":{"name":"populate","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"origin","external_name":"origin","restriction":"RunnableGroup"}],"visibility":"Public","body":"population = container.child(transparent: false, ancestor: self)\ncontainer.append(population)\nroot.assign(origin, container: population)\nmanifests = [] of ::Tuple(Manifest::Present, RunnableGroup, Array(String), Array(String), Bool)\nclimb(root, origin) do |manifest, group, isself|\n directives, fragments = ((manifest.preprocessed_content(root, group)).split(/\\s+/, remove_empty: true)).partition(&.in?(DIRECTIVES))\n manifests << {manifest, group, directives, fragments, !isself}\n if directives.includes?(\"noinherit\")\n break\n end\nend\nmanifests.reverse_each do |manifest, group, directives, fragments, inherited|\n population = manifest.process(root, group, population, directives, fragments, inherited)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1754,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Manifest[\") << @path) << \"]\""}}]}]},{"html_id":"novika/Novika/Resolver/MoreThanOneAppError","path":"Novika/Resolver/MoreThanOneAppError.html","kind":"class","full_name":"Novika::Resolver::MoreThanOneAppError","name":"MoreThanOneAppError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":119,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when the user tries to run more than one app.","summary":"Raised when the user tries to run more than one app.
","constructors":[{"html_id":"new(apps:Array(RunnableGroup))-class-method","name":"new","abstract":false,"args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"args_string":"(apps : Array(RunnableGroup))","args_html":"(apps : Array(RunnableGroup))","location":{"filename":"src/novika/resolver.cr","line_number":124,"url":null},"def":{"name":"new","args":[{"name":"apps","external_name":"apps","restriction":"Array(RunnableGroup)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(apps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"apps:Array(Novika::Resolver::RunnableGroup)-instance-method","name":"apps","doc":"Returns the array of apps in the response; more than of\nthem there.","summary":"Returns the array of apps in the response; more than of them there.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":122,"url":null},"def":{"name":"apps","visibility":"Public","body":"@apps"}}]},{"html_id":"novika/Novika/Resolver/Permission","path":"Novika/Resolver/Permission.html","kind":"enum","full_name":"Novika::Resolver::Permission","name":"Permission","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":50,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Undecided","name":"Undecided","value":"0"},{"id":"Allowed","name":"Allowed","value":"1"},{"id":"Denied","name":"Denied","value":"2"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents the permission state of a dependency.","summary":"Represents the permission state of a dependency.
","instance_methods":[{"html_id":"allowed?-instance-method","name":"allowed?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":52,"url":null},"def":{"name":"allowed?","visibility":"Public","body":"self == Allowed"}},{"html_id":"denied?-instance-method","name":"denied?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":53,"url":null},"def":{"name":"denied?","visibility":"Public","body":"self == Denied"}},{"html_id":"undecided?-instance-method","name":"undecided?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":51,"url":null},"def":{"name":"undecided?","visibility":"Public","body":"self == Undecided"}}]},{"html_id":"novika/Novika/Resolver/PermissionServer","path":"Novika/Resolver/PermissionServer.html","kind":"class","full_name":"Novika::Resolver::PermissionServer","name":"PermissionServer","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2715,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Permission server allows to prompt the user for permissions, and\nsave the user's choices in the *permissions file*.","summary":"Permission server allows to prompt the user for permissions, and save the user's choices in the permissions file.
","constructors":[{"html_id":"new(env:RunnableEnvironment,explicit:Array(RunnableQuery))-class-method","name":"new","doc":"Creates a new permission server.\n\n*resolver* is the resolver with which this server will talk about\nresolver-related things.\n\n*explicit* is a list of explicit runnable queries. An explicit\nquery is that query which was specified manually, e.g. via the\narguments. In other words, the user had to *type it* here and\nnow rather than \"acquire\" it from somewhere unknowingly. This\nlist is mainly used to be less annoying when it comes to asking\nfor permissions.","summary":"Creates a new permission server.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"args_string":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","args_html":"(env : RunnableEnvironment, explicit : Array(RunnableQuery))","location":{"filename":"src/novika/resolver.cr","line_number":2729,"url":null},"def":{"name":"new","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"explicit","external_name":"explicit","restriction":"Array(RunnableQuery)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(env, explicit)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"answer(answer:String)-instance-method","name":"answer","doc":"Prints *answer* so that it can be seen by the user.","summary":"Prints answer so that it can be seen by the user.
","abstract":false,"args":[{"name":"answer","external_name":"answer","restriction":"String"}],"args_string":"(answer : String)","args_html":"(answer : String)","location":{"filename":"src/novika/resolver.cr","line_number":2797,"url":null},"def":{"name":"answer","args":[{"name":"answer","external_name":"answer","restriction":"String"}],"visibility":"Public","body":"@answer.call(answer)"}},{"html_id":"ask?(question:String):String|Nil-instance-method","name":"ask?","doc":"Asks user a *question*, and returns the answer or an empty\nstring in case EOF was received.","summary":"Asks user a question, and returns the answer or an empty string in case EOF was received.
","abstract":false,"args":[{"name":"question","external_name":"question","restriction":"String"}],"args_string":"(question : String) : String | Nil","args_html":"(question : String) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2792,"url":null},"def":{"name":"ask?","args":[{"name":"question","external_name":"question","restriction":"String"}],"return_type":"String | ::Nil","visibility":"Public","body":"@ask.call(question)"}},{"html_id":"brief(dependency:RunnableCapability):String-instance-method","name":"brief","doc":"Returns a brief description of *dependency*.","summary":"Returns a brief description of dependency.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"args_string":"(dependency : RunnableCapability) : String","args_html":"(dependency : RunnableCapability) : String","location":{"filename":"src/novika/resolver.cr","line_number":2786,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"RunnableCapability"}],"return_type":"String","visibility":"Public","body":"@env.brief(dependency)"}},{"html_id":"explicit?(dependency:Resolution::Dependency):Bool-instance-method","name":"explicit?","doc":"Returns whether *dependency* is explicit.\n\nThis is done by checking whether the *first* `RunnableQuery`\nancestor of *dependency* is in the explicit list. See `new`\nto learn what \"explicitness\" means.","summary":"Returns whether dependency is explicit.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency) : Bool","args_html":"(dependency : Resolution::Dependency) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":2806,"url":null},"def":{"name":"explicit?","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"return_type":"Bool","visibility":"Public","body":"dependency.each_ancestor do |ancestor|\n if ancestor.is_a?(RunnableQuery)\n else\n next\n end\n return @explicit.any?(&.same?(ancestor))\nend\nfalse\n"}},{"html_id":"load-instance-method","name":"load","doc":"Fills the permissions hash with saved permissions.","summary":"Fills the permissions hash with saved permissions.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2746,"url":null},"def":{"name":"load","visibility":"Public","body":"if permissions = @env.permissions?\nelse\n return\nend\ncontent, path = permissions\nbegin\n CSV.each_row(content.strip) do |__temp_70|\n dependent, dependency, state = __temp_70\n if id = state.to_i?\n else\n next\n end\n if permission = Permission.from_value?(id)\n else\n next\n end\n @permissions[{dependent, dependency}] = permission\n end\nrescue IndexError\n raise(ResolverError.new(\"malformed 'permissions' file: #{path}\"))\nend\n"}},{"html_id":"query_permission?(container:RunnableContainer,dependency:Resolution::Dependency)-instance-method","name":"query_permission?","doc":"Queries (possibly prompts) and returns the permission state of\n*dependency* for the given *container*.","summary":"Queries (possibly prompts) and returns the permission state of dependency for the given container.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(container : RunnableContainer, dependency : Resolution::Dependency)","args_html":"(container : RunnableContainer, dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":2817,"url":null},"def":{"name":"query_permission?","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"@permissions.put_if_absent(dependency.signature(container)) do\n dependency.prompt?(self, for: container)\nend"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Flushes the internal permissions store to disk.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2768,"url":null},"def":{"name":"save","visibility":"Public","body":"if @permissions.values.any?(&.allowed?)\nelse\n return\nend\n@env.permissions do |io|\n CSV.build(io) do |builder|\n @permissions.each do |__temp_71, permission|\n dependent, dependency = __temp_71\n if permission.undecided? || permission.denied?\n next\n end\n builder.row(dependent, dependency, permission.to_i)\n end\n end\nend\n"}}]},{"html_id":"novika/Novika/Resolver/Query","path":"Novika/Resolver/Query.html","kind":"alias","full_name":"Novika::Resolver::Query","name":"Query","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":1047,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"(Path | String)","aliased_html":"Path | String","const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}},{"html_id":"novika/Novika/Resolver/Resolution","path":"Novika/Resolver/Resolution.html","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":356,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Obtaining a set of resolution objects from an initial list of\nqueries is the central goal of the resolver.\n\nA resolution object points to a script and lists its dependencies.\nFurthermore, a resolution object also stores its so-called\nrunnable *sources*, which are `RunnableScript` objects that it\nwas derived from.","summary":"Obtaining a set of resolution objects from an initial list of queries is the central goal of the resolver.
","constructors":[{"html_id":"new(script:RunnableScript,deps:Set(Dependency))-class-method","name":"new","doc":"Initializes a runnable resolution for the given runnable *script* and a\nset of resolution dependency objects *deps*.","summary":"Initializes a runnable resolution for the given runnable script and a set of resolution dependency objects deps.
","abstract":false,"args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"args_string":"(script : RunnableScript, deps : Set(Dependency))","args_html":"(script : RunnableScript, deps : Set(Dependency))","location":{"filename":"src/novika/resolver.cr","line_number":362,"url":null},"def":{"name":"new","args":[{"name":"script","external_name":"script","restriction":"RunnableScript"},{"name":"deps","external_name":"deps","restriction":"Set(Dependency)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(script, deps)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two resolutions are considered equal when they point to the\nsame script on the disk.","summary":"Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath:Path-instance-method","name":"abspath","doc":"Returns the absolute path to this resolution.","summary":"Returns the absolute path to this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":358,"url":null},"def":{"name":"abspath","return_type":"Path","visibility":"Public","body":"@abspath"}},{"html_id":"dump!(deps:Set(Dependency)|Nil=nil,sources:Array(RunnableScript)|Nil=nil)-instance-method","name":"dump!","doc":"Appends the dependencies of this resolution to *deps*, source scripts\nof this resolution to *sources*.","summary":"Appends the dependencies of this resolution to deps, source scripts of this resolution to sources.
","abstract":false,"args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"args_string":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","args_html":"(deps : Set(Dependency) | Nil = nil, sources : Array(RunnableScript) | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":369,"url":null},"def":{"name":"dump!","args":[{"name":"deps","default_value":"nil","external_name":"deps","restriction":"Set(Dependency) | ::Nil"},{"name":"sources","default_value":"nil","external_name":"sources","restriction":"Array(RunnableScript) | ::Nil"}],"visibility":"Public","body":"deps.try(&.concat(@deps))\nsources.try(&.concat(@sources))\n"}},{"html_id":"each_dependency(&:Dependency->)-instance-method","name":"each_dependency","doc":"Yields dependencies of this resolution.","summary":"Yields dependencies of this resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":382,"url":null},"def":{"name":"each_dependency","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Dependency ->)"},"visibility":"Public","body":"@deps.each do |dep|\n yield dep\nend"}},{"html_id":"each_source_group(&:RunnableGroup->)-instance-method","name":"each_source_group","doc":"Yields all `RunnableGroup`s from the ancestry of source scripts of\nthis resolution. Does not yield the same group twice (sameness is\ndetermined with `==`/hash).","summary":"Yields all RunnableGroup
s from the ancestry of source scripts of this resolution.
Two resolutions are considered equal when they point to the same script on the disk.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"merge!(other:Resolution):self-instance-method","name":"merge!","doc":"Mutably merges this and *other* resolutions.","summary":"Mutably merges this and other resolutions.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"args_string":"(other : Resolution) : self","args_html":"(other : Resolution) : self","location":{"filename":"src/novika/resolver.cr","line_number":375,"url":null},"def":{"name":"merge!","args":[{"name":"other","external_name":"other","restriction":"Resolution"}],"return_type":"self","visibility":"Public","body":"other.dump!(@deps, @sources)\nself\n"}},{"html_id":"run(engine:Engine,script_block:Block):Block-instance-method","name":"run","doc":"Opens an instance of *script block* (aka *file block*) with *engine*.\n\nExtends *script block* itself with `__path__`, `__file__`; therefore,\nmutates *script block*.\n\nReturns the script block instance after evaluation.","summary":"Opens an instance of script block (aka file block) with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"args_string":"(engine : Engine, script_block : Block) : Block","args_html":"(engine : Engine, script_block : Block) : Block","location":{"filename":"src/novika/resolver.cr","line_number":408,"url":null},"def":{"name":"run","args":[{"name":"engine","external_name":"engine","restriction":"Engine"},{"name":"script_block","external_name":"script_block","restriction":"Block"}],"return_type":"Block","visibility":"Public","body":"script_block.at(Word.new(\"__path__\"), Quote.new(@abspath.parent.to_s))\nscript_block.at(Word.new(\"__file__\"), Quote.new(@abspath.to_s))\ninstance = script_block.instance\ninstance.schedule!(engine, stack: Block.new)\nengine.exhaust\ninstance\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":420,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(((((io << @abspath) << \" (\") << (@deps.join(\", \"))) << \") ← [\") << (@sources.join(\" | \"))) << \"]\""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","path":"Novika/Resolver/Resolution/Dependency.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":430,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution","kind":"struct","full_name":"Novika::Resolver::Resolution","name":"Resolution"},"doc":"Includers can be listed as dependencies in a `Resolution`.","summary":"Includers can be listed as dependencies in a Resolution
.
Sets the permission state of this dependency to "allowed".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":459,"url":null},"def":{"name":"allow","visibility":"Public","body":"@permission = Permission::Allowed"}},{"html_id":"allowed?:Bool-instance-method","name":"allowed?","doc":"Returns whether this dependency is allowed. Depends on the permission\nstate of this dependency, which is normally set by `PermissionServer`.","summary":"Returns whether this dependency is allowed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":454,"url":null},"def":{"name":"allowed?","return_type":"Bool","visibility":"Public","body":"@permission.allowed?"}},{"html_id":"deny-instance-method","name":"deny","doc":"Sets the permission state of this dependency to \"denied\".","summary":"Sets the permission state of this dependency to "denied".
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":464,"url":null},"def":{"name":"deny","visibility":"Public","body":"@permission = Permission::Denied"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is #allowed?
, enables it in the given capability collection caps.
Promps the user for whether the use of this dependency should be allowed in container's RunnableEnvironment
.
Communicates with the given permission server in order to determine whether the use of this dependency should be allowed or denied to container.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer)","args_html":"(server : PermissionServer, *, for container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":471,"url":null},"def":{"name":"request","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"visibility":"Public","body":"if @permission.undecided?\nelse\n return\nend\nif server.explicit?(self)\n @permission = Permission::Allowed\n return\nend\n@permission = server.query_permission?(container, self)\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":439,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","path":"Novika/Resolver/Resolution/Dependency/DefaultPrompt.html","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":488,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},"doc":"Provides the includer with an implementation of `Dependency#prompt?`\nin turn requiring it to simply specify a `label`.","summary":"Provides the includer with an implementation of Dependency#prompt?
in turn requiring it to simply specify a #label
.
Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":513,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":""}},{"html_id":"envelope(container:RunnableContainer)-instance-method","name":"envelope","doc":"Returns the string representation of this dependency's envelope\n(its container so to speak). The runtime (not specialize-time!)\n*container* is provided as a fallback option (albeit a *very bad one*).","summary":"Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":true,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":501,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":true,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":496,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":""}},{"html_id":"prompt?(server:PermissionServer,*,forcontainer:RunnableContainer):Permission-instance-method","name":"prompt?","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"args_string":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","args_html":"(server : PermissionServer, *, for container : RunnableContainer) : Permission","location":{"filename":"src/novika/resolver.cr","line_number":516,"url":null},"def":{"name":"prompt?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"for","restriction":"RunnableContainer"}],"splat_index":1,"return_type":"Permission","visibility":"Public","body":"label = label(server)\nprompt = String.build do |io|\n (((io << \"Allow \") << (envelope(container))) << \" to load \") << label\n if description = description?(server)\n (io << \", which \") << description\n end\n ((((io << \"? [\") << \"y\".colorize.underline) << \" yes | \") << \"?\".colorize.underline) << \" help |Represents the signature of a dependency.
"}]}]},{"html_id":"novika/Novika/Resolver/ResolutionSet","path":"Novika/Resolver/ResolutionSet.html","kind":"struct","full_name":"Novika::Resolver::ResolutionSet","name":"ResolutionSet","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":553,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents an ordered set of `Resolution` objects.","summary":"Represents an ordered set of Resolution
objects.
Returns whether all resolutions from this set come from the same RunnableGroup
.
Returns whether all resolutions in this set come from the same application RunnableGroup
.
Appends a resolution to this set.
","abstract":false,"args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"args_string":"(resolution : Resolution)","args_html":"(resolution : Resolution)","location":{"filename":"src/novika/resolver.cr","line_number":571,"url":null},"def":{"name":"append","args":[{"name":"resolution","external_name":"resolution","restriction":"Resolution"}],"visibility":"Public","body":"if index = @resolutions.index(resolution)\n @resolutions[index] = @resolutions[index].merge!(resolution)\n return\nend\n@resolutions << resolution\n"}},{"html_id":"append(set:ResolutionSet)-instance-method","name":"append","doc":"Appends an entire resolution *set* at once. Essentially the same\nas appending each `Resolution` from *set*.","summary":"Appends an entire resolution set at once.
","abstract":false,"args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"args_string":"(set : ResolutionSet)","args_html":"(set : ResolutionSet)","location":{"filename":"src/novika/resolver.cr","line_number":582,"url":null},"def":{"name":"append","args":[{"name":"set","external_name":"set","restriction":"ResolutionSet"}],"visibility":"Public","body":"set.each do |resolution|\n append(resolution)\nend"}},{"html_id":"each(&:Resolution->)-instance-method","name":"each","doc":"Yields resolutions in this resolution set.","summary":"Yields resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":587,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Resolution ->)"},"visibility":"Public","body":"@resolutions.each do |resolution|\n yield resolution\nend"}},{"html_id":"each_designation(root:RunnableRoot,&:Designation->)-instance-method","name":"each_designation","doc":"Yields environment designations for the given runnable *root*.\n\n*Environment designations* are resolution sets coupled to an\nenvironment. That is, an environment designation is a \"token\"\nstating *this* environment should handle resolutions out of\n*that* resolution set.","summary":"Yields environment designations for the given runnable root.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"args_string":"(root : RunnableRoot, & : Designation -> )","args_html":"(root : RunnableRoot, & : Designation -> )","location":{"filename":"src/novika/resolver.cr","line_number":713,"url":null},"def":{"name":"each_designation","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"visited = Set(Resolution).new\ndesignations = {} of RunnableEnvironment => ResolutionSet\neach_group do |group, resolution|\n if resolution.in?(visited)\n next\n end\n if container = root.containerof?(group)\n else\n return\n end\n set = designations.put_if_absent(container.env) do\n ResolutionSet.new\n end\n set.append(resolution)\n visited << resolution\nend\ndefault = designations.put_if_absent(root.default_env) do\n ResolutionSet.new\nend\neach do |resolution|\n if resolution.in?(visited)\n next\n end\n default.append(resolution)\nend\ndesignations.each do |env, set|\n yield env.designate(set)\nend\n"}},{"html_id":"each_group(&:RunnableGroup,Resolution->)-instance-method","name":"each_group","doc":"Yields all `RunnableGroup` objects that have contributed to this\nresolution set. The yielded groups can repeat.","summary":"Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields preambles of unique application and library RunnableGroup
s that have contributed to this resolution set, as well as the groups themselves.
Yields unique application RunnableGroup
s that have contributed to this resolution set.
Yields all unique Resolution::Dependency
objects in this resolution set.
Yields each unique Resolution::Dependency
object followed by a ResolutionSet
of its dependents.
Yields all RunnableGroup
objects that have contributed to this resolution set.
Yields unique library RunnableGroup
s that have contributed to this resolution set.
Returns whether there are no resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":564,"url":null},"def":{"name":"empty?","visibility":"Public","body":"size.zero?"}},{"html_id":"groups:Array(RunnableGroup)-instance-method","name":"groups","doc":"Returns an array of `RunnableGroup` objects that have contributed\nto this resolution set. Objects in the array can repeat.","summary":"Returns an array of RunnableGroup
objects that have contributed to this resolution set.
Returns whether all resolutions in this set come from the same library RunnableGroup
.
Returns the amount of resolutions in this resolution set.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":559,"url":null},"def":{"name":"size","visibility":"Public","body":"@resolutions.size"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":751,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io.puts(\"ResolutionSet\")\neach do |resolution|\n (io << \" | \") << resolution\n io.puts\nend\n"}},{"html_id":"unique_apps:Array(RunnableGroup)-instance-method","name":"unique_apps","doc":"Returns an array of unique application `RunnableGroup`s that have\ncontributed to this resolution set.","summary":"Returns an array of unique application RunnableGroup
s that have contributed to this resolution set.
Base class for resolver and resolver-related exceptions.
"},{"html_id":"novika/Novika/Resolver/Response","path":"Novika/Resolver/Response.html","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2827,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/SignalReceiver","kind":"module","full_name":"Novika::Resolver::SignalReceiver","name":"SignalReceiver"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A mutable response object which is tightly coupled to `Session`,\ndesigned for reuse throughout multiple (rounds of) queries to\nthe latter.","summary":"A mutable response object which is tightly coupled to Session
, designed for reuse throughout multiple (rounds of) queries to the latter.
Joins all accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2874,"url":null},"def":{"name":"accepted_set","return_type":"ResolutionSet","visibility":"Public","body":"accepted_set = ResolutionSet.new\n@accepted.each do |__temp_72|\n _, set = __temp_72\n accepted_set.append(set)\nend\naccepted_set\n"}},{"html_id":"drop_wish(&:RunnableQuery->)-instance-method","name":"drop_wish","doc":"Yields wishes from this response's wishlist, then clears\nthe wishlist (so that this response can perhaps be reused).","summary":"Yields wishes from this response's wishlist, then clears the wishlist (so that this response can perhaps be reused).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2908,"url":null},"def":{"name":"drop_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishlist.each do |wish|\n yield wish\nend\n@wishlist.clear\n"}},{"html_id":"each_ignored_runnable(&:Runnable->)-instance-method","name":"each_ignored_runnable","doc":"Yields runnables that were ignored.","summary":"Yields runnables that were ignored.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2902,"url":null},"def":{"name":"each_ignored_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@ignored.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_rejected_runnable(&:Runnable->)-instance-method","name":"each_rejected_runnable","doc":"Yields runnables that were rejected.","summary":"Yields runnables that were rejected.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2897,"url":null},"def":{"name":"each_rejected_runnable","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@rejected.each do |runnable|\n yield runnable\nend"}},{"html_id":"queried_for_set:ResolutionSet-instance-method","name":"queried_for_set","doc":"Joins all *queried-for* accepted resolution sets of this response\ninto one large resolution set, and returns it.\n\nSee `AcceptionRoute` to learn about the difference between\n*queried-for* and *wished* routes of set acception.","summary":"Joins all queried-for accepted resolution sets of this response into one large resolution set, and returns it.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2887,"url":null},"def":{"name":"queried_for_set","return_type":"ResolutionSet","visibility":"Public","body":"queried_for_set = ResolutionSet.new\n@accepted.each do |__temp_73|\n route, set = __temp_73\n if route.query?\n else\n next\n end\n queried_for_set.append(set)\nend\nqueried_for_set\n"}},{"html_id":"receive(signal:Signal)-instance-method","name":"receive","doc":"Receives and reacts to a *signal* sent by `RunnableRoot`.","summary":"Receives and reacts to a signal sent by RunnableRoot
.
Returns whether this response is successful, in that it has no rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2864,"url":null},"def":{"name":"successful?","return_type":"Bool","visibility":"Public","body":"@rejected.empty?"}},{"html_id":"wishless?:Bool-instance-method","name":"wishless?","doc":"Returns `true` if this response does not \"wish\" to make any more\nqueries before its accepted sets can be inspected.","summary":"Returns true
if this response does not "wish" to make any more queries before its accepted sets can be inspected.
The resolution set was accepted due to a wish: some runnable out there "wished" that runnables from the set were there, and here they are.
"},{"id":"Query","name":"Query","value":"1","doc":"The resolution set was explicitly mentioned by the user\nsomewhere (queried for).","summary":"The resolution set was explicitly mentioned by the user somewhere (queried for).
"}],"namespace":{"html_id":"novika/Novika/Resolver/Response","kind":"struct","full_name":"Novika::Resolver::Response","name":"Response"},"doc":"Represents the way a resolution set was accepted.","summary":"Represents the way a resolution set was accepted.
","instance_methods":[{"html_id":"query?-instance-method","name":"query?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2839,"url":null},"def":{"name":"query?","visibility":"Public","body":"self == Query"}},{"html_id":"wish?-instance-method","name":"wish?","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2835,"url":null},"def":{"name":"wish?","visibility":"Public","body":"self == Wish"}}]}]},{"html_id":"novika/Novika/Resolver/ResponseRejectedError","path":"Novika/Resolver/ResponseRejectedError.html","kind":"class","full_name":"Novika::Resolver::ResponseRejectedError","name":"ResponseRejectedError","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},"ancestors":[{"html_id":"novika/Novika/Resolver/ResolverError","kind":"class","full_name":"Novika::Resolver::ResolverError","name":"ResolverError"},{"html_id":"novika/Exception","kind":"class","full_name":"Exception","name":"Exception"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":109,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Raised when there are rejected runnables in a response.","summary":"Raised when there are rejected runnables in a response.
","constructors":[{"html_id":"new(response:Response)-class-method","name":"new","abstract":false,"args":[{"name":"response","external_name":"response","restriction":"Response"}],"args_string":"(response : Response)","args_html":"(response : Response)","location":{"filename":"src/novika/resolver.cr","line_number":113,"url":null},"def":{"name":"new","args":[{"name":"response","external_name":"response","restriction":"Response"}],"visibility":"Public","body":"_ = allocate\n_.initialize(response)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"response:Novika::Resolver::Response-instance-method","name":"response","doc":"Returns the response which contains some rejected runnables.","summary":"Returns the response which contains some rejected runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":111,"url":null},"def":{"name":"response","visibility":"Public","body":"@response"}}]},{"html_id":"novika/Novika/Resolver/Runnable","path":"Novika/Resolver/Runnable.html","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable","abstract":true,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":919,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"}],"subclasses":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableContainer","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of all runnables.\n\nThe main basic property of all runnables is that they can be\n*rewritten* into other runnables, oftentimes of a more specific\nkind. Additionally, runnable objects are the head of their history\nlinked list, allowing clients to observe how the runnable of\ninterest came to be.","summary":"Base class of all runnables.
","constructors":[{"html_id":"new(ancestor:Ancestor|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"args_string":"(ancestor : Ancestor | Nil = nil)","args_html":"(ancestor : Ancestor | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":959,"url":null},"def":{"name":"new","args":[{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":"Ancestor | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"ancestor?:Ancestor|Nil-instance-method","name":"ancestor?","doc":"Returns the ancestor of this runnable, or nil if there is\nno ancestor.","summary":"Returns the ancestor of this runnable, or nil if there is no ancestor.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":957,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":"@ancestor"}},{"html_id":"ancestors:Array(Ancestor)-instance-method","name":"ancestors","doc":"Returns an array of ancestors of this runnable, starting from\nthe most recent ancestor and ending with the oldest one.","summary":"Returns an array of ancestors of this runnable, starting from the most recent ancestor and ending with the oldest one.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":976,"url":null},"def":{"name":"ancestors","return_type":"Array(Ancestor)","visibility":"Public","body":"ancestors = [] of Ancestor\neach_ancestor do |ancestor|\n ancestors << ancestor\nend\nancestors\n"}},{"html_id":"backtrace(io:IO,indent:Int32=0,annex:String|Nil=nil)-instance-method","name":"backtrace","doc":"Appends ancestors of this runnable (its \"history\") to *io*.\n\n*indent* can be used to specify the amount of whitespace\npreceding each line.\n\n*annex* is the additional bit of text displayed below the\nbacktrace. For instance, in case of an error, it can contain\nthe error message.","summary":"Appends ancestors of this runnable (its "history") to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"args_string":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","args_html":"(io : IO, indent : Int32 = 0, annex : String | Nil = nil)","location":{"filename":"src/novika/resolver.cr","line_number":992,"url":null},"def":{"name":"backtrace","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"indent","default_value":"0","external_name":"indent","restriction":"Int32"},{"name":"annex","default_value":"nil","external_name":"annex","restriction":"String | ::Nil"}],"visibility":"Public","body":"backtrace = ancestors.reverse\nbacktrace << self\nio << \" ┬\\n\"\nws = \" \" * indent\nbacktrace.each do |runnable|\n (io << ws) << \"╿ in \"\n if runnable.is_a?(RunnableContainer)\n content = String.build do |inner|\n runnable.to_s(inner, lead: 0, indent: indent + 2)\n end\n skip = true\n content.each_line(chomp: true) do |line|\n if skip\n io.puts(line)\n skip = false\n next\n end\n ((io << \" │\") << line) << '\\n'\n end\n else\n (io << runnable) << '\\n'\n end\nend\nif annex\nelse\n return\nend\n((io << \" │\\n ╰┴─ \") << annex) << '\\n'\n"}},{"html_id":"backtrace(*args,**kwargs,&:IO->)-instance-method","name":"backtrace","doc":"Yields an `IO` where you can write the *annex*, otherwise the\nsame as `backtrace`.","summary":"Yields an IO
where you can write the annex, otherwise the same as #backtrace
.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1033,"url":null},"def":{"name":"constituents","return_type":"Array(Runnable)","visibility":"Public","body":"[self] of Runnable"}},{"html_id":"each_ancestor(&:Ancestor->)-instance-method","name":"each_ancestor","doc":"Yields ancestors of this runnable.\n\nBy tracing the ancestry of `self`, you are effectively exploring\nhow it came to be.","summary":"Yields ancestors of this runnable.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":966,"url":null},"def":{"name":"each_ancestor","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Ancestor ->)"},"visibility":"Public","body":"runnable = @ancestor\nwhile runnable\n yield runnable\n runnable = runnable.ancestor?\nend\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1044,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":""}}],"types":[{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","path":"Novika/Resolver/Runnable/Ancestor.html","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":921,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/Manifest/Present","kind":"module","full_name":"Novika::Resolver::Manifest::Present","name":"Present"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a `Runnable` ancestor.","summary":"Represents a Runnable
ancestor.
Returns the ancestor of this object, or nil if there is no ancestor.
","abstract":true,"location":{"filename":"src/novika/resolver.cr","line_number":924,"url":null},"def":{"name":"ancestor?","return_type":"Ancestor | ::Nil","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","path":"Novika/Resolver/Runnable/HasDatum.html","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum(T)","name":"HasDatum","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":944,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableDir","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir"},{"html_id":"novika/Novika/Resolver/RunnableGroup","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup"},{"html_id":"novika/Novika/Resolver/RunnableQuery","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSelector","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a runnable with datum of type *T*. This module assigns\nno intrinsic meaning to the word \"datum\" or to its value; includers\nare free to choose that, as well as the type *T*.\n\nThe only real consequence of including this module is that equality\nand hash methods will be defined. These methods will delegate\ncomparison/hashing to the datum(s) at hand.","summary":"Represents a runnable with datum of type T.
","instance_methods":[{"html_id":"==(other:T)-instance-method","name":"==","doc":"Returns whether the datum of this runnable is equal to *other*.","summary":"Returns whether the datum of this runnable is equal to other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"T"}],"args_string":"(other : T)","args_html":"(other : T)","location":{"filename":"src/novika/resolver.cr","line_number":948,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"T"}],"visibility":"Public","body":"@datum == other"}},{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @datum == (other.@datum)\nelse\n return false\nend\ntrue\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @datum.hash(hasher)\nhasher\n"}}]},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","path":"Novika/Resolver/Runnable/Terminal.html","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":931,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Resolver/RunnableCapability","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability"},{"html_id":"novika/Novika/Resolver/RunnableScript","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript"},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject"},{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"}],"namespace":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"doc":"Represents a terminal (as in *terminate*) runnable, that is,\na runnable that cannot be rewritten any further.","summary":"Represents a terminal (as in terminate) runnable, that is, a runnable that cannot be rewritten any further.
","instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":932,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.append(self)"}}]}]},{"html_id":"novika/Novika/Resolver/RunnableCapability","path":"Novika/Resolver/RunnableCapability.html","kind":"class","full_name":"Novika::Resolver::RunnableCapability","name":"RunnableCapability","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1116,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Capabilities represent the requirements of a Novika script, library,\nor application, regarding language features that are needed in order\nfor that script, library, or application to properly work.","summary":"Capabilities represent the requirements of a Novika script, library, or application, regarding language features that are needed in order for that script, library, or application to properly work.
","constructors":[{"html_id":"new(datum:String,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : String, ancestor = nil)","args_html":"(datum : String, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1122,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"description?(server:PermissionServer):String|Nil-instance-method","name":"description?","doc":"Returns a user-friendly description of this dependency, or nil\nif none can be given. The returned description should be suitable\nfor displaying to the user in a prompt, and should read well after\n\"which\", as in \"which [exposes this and that]\", \"which [allows\nthis and that]\", etc., where words in brackets are those of\nthe description.\n\n*server* is the server that will then use the description in\none way or another, in case it is present. You may also choose\nto derive the description with *server*'s help.","summary":"Returns a user-friendly description of this dependency, or nil if none can be given.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String | Nil","args_html":"(server : PermissionServer) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1144,"url":null},"def":{"name":"description?","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String | ::Nil","visibility":"Public","body":"server.brief(self)"}},{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1126,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1140,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"capability #{@datum.colorize.bold}\""}},{"html_id":"purpose(*,incaps:CapabilityCollection)-instance-method","name":"purpose","doc":"Returns the purpose of this capability in the given capability\ncollection *caps*.","summary":"Returns the purpose of this capability in the given capability collection caps.
","abstract":false,"args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"args_string":"(*, in caps : CapabilityCollection)","args_html":"(*, in caps : CapabilityCollection)","location":{"filename":"src/novika/resolver.cr","line_number":1150,"url":null},"def":{"name":"purpose","args":[{"name":"","external_name":"","restriction":""},{"name":"caps","external_name":"in","restriction":"CapabilityCollection"}],"splat_index":0,"visibility":"Public","body":"if cls = caps.get_capability_class?(@datum)\nelse\n raise(\"BUG: capability runnable for which there is no capability class\")\nend\ncls.purpose\n"}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1132,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted capability\")\nend\n{envelope.abspath.to_s, @datum}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1165,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1171,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Capability[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableContainer","path":"Novika/Resolver/RunnableContainer.html","kind":"class","full_name":"Novika::Resolver::RunnableContainer","name":"RunnableContainer","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2017,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable container is an *ordered*, arbitrarily *filtered*\ncollection of runnables - and a runnable itself. It holds and\nadvances (through rewriting) a *generation* of runnables.","summary":"A runnable container is an ordered, arbitrarily filtered collection of runnables - and a runnable itself.
","constructors":[{"html_id":"new(root:RunnableRoot,dir:Path,env:RunnableEnvironment,parent:RunnableContainer|Nil=nil,transparent:Bool=false,ancestor=nil)-class-method","name":"new","doc":"Initializes a new runnable container for the given *dir*ectory.\n\n*parent* is the parent runnable container. You don't normally need\nto specify it. Prefer to call `child` on the parent instead.\n\n*transparent* specifies whether the container is transparent,\nsee `transparent?`.","summary":"Initializes a new runnable container for the given directory.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","args_html":"(root : RunnableRoot, dir : Path, env : RunnableEnvironment, parent : RunnableContainer | Nil = nil, transparent : Bool = false, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":2049,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"dir","external_name":"dir","restriction":"Path"},{"name":"env","external_name":"env","restriction":"RunnableEnvironment"},{"name":"parent","default_value":"nil","external_name":"parent","restriction":"RunnableContainer | ::Nil"},{"name":"transparent","default_value":"false","external_name":"transparent","restriction":"::Bool"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, dir, env, parent, transparent, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path of the directory of this container.","summary":"Returns the absolute path of the directory of this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2165,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @dir.absolute?\nelse\n raise(\"BUG: container dir path is not an absolute path\")\nend\n@dir\n"}},{"html_id":"allow?(warn=false,&filter:Runnable->Bool)-instance-method","name":"allow?","doc":"Introduces a *filter* for the constituent runnables of this\ncontainer. *filter* should decide whether to accept (true)\nor reject (false) a runnable.\n\n*warn* specifies whether the `RunnableIgnored` signal should be\nsent if *filter* rejects a runnable.","summary":"Introduces a filter for the constituent runnables of this container.
","abstract":false,"args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"args_string":"(warn = false, &filter : Runnable -> Bool)","args_html":"(warn = false, &filter : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2150,"url":null},"def":{"name":"allow?","args":[{"name":"warn","default_value":"false","external_name":"warn","restriction":""}],"yields":1,"block_arity":1,"block_arg":{"name":"filter","external_name":"filter","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"push_filter(Filter.new(filter, warn))"}},{"html_id":"append(runnable:Runnable)-instance-method","name":"append","doc":"Inserts *runnable* after all other runnables in this container.","summary":"Inserts runnable after all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2108,"url":null},"def":{"name":"append","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables << runnable"}},{"html_id":"append(runnables:Array(Runnable))-instance-method","name":"append","doc":"Inserts the entire array of *runnables* after all other runnables\nin this container.","summary":"Inserts the entire array of runnables after all other runnables in this container.
","abstract":false,"args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"args_string":"(runnables : Array(Runnable))","args_html":"(runnables : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2114,"url":null},"def":{"name":"append","args":[{"name":"runnables","external_name":"runnables","restriction":"Array(Runnable)"}],"visibility":"Public","body":"@runnables.concat(runnables)"}},{"html_id":"can_contain?(runnable:Runnable)-instance-method","name":"can_contain?","doc":"Returns whether this container's filters allow it to contain\nthe given *runnable*.","summary":"Returns whether this container's filters allow it to contain the given runnable.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2156,"url":null},"def":{"name":"can_contain?","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"each_filter do |filter|\n if filter.call(runnable)\n else\n return false\n end\nend\ntrue\n"}},{"html_id":"child(dir=@dir,ancestor=self,*,transparent:Bool)-instance-method","name":"child","doc":"Builds and returns a child of this container.\n\nOptionally, the *dir*ectory of the child can be provided.\nOtherwise, the directory of this container will be used.\n\nAdditionally, you can specify whether the child should be\n*transparent* (see `transparent?`).","summary":"Builds and returns a child of this container.
","abstract":false,"args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"args_string":"(dir = @dir, ancestor = self, *, transparent : Bool)","args_html":"(dir = @dir, ancestor = self, *, transparent : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2379,"url":null},"def":{"name":"child","args":[{"name":"dir","default_value":"@dir","external_name":"dir","restriction":""},{"name":"ancestor","default_value":"self","external_name":"ancestor","restriction":""},{"name":"","external_name":"","restriction":""},{"name":"transparent","external_name":"transparent","restriction":"Bool"}],"splat_index":2,"visibility":"Public","body":"RunnableContainer.new(@root, dir, env: @root.defenv(@root.disk.env?(dir)), parent: self, ancestor: ancestor, transparent: transparent)"}},{"html_id":"classify?(datum:Path,ancestor:Ancestor|Nil):Runnable|Nil-instance-method","name":"classify?","doc":"Creates a `RunnableDir`, `RunnableScript`, or `RunnableSharedObject`\ndepending on what *datum* points to and on its extension.\n\n*ancestor* is set as the ancestor of the created runnable.\n\nReturns nil if *datum* does not exist, or if there is no\nappropriate classification.","summary":"Creates a RunnableDir
, RunnableScript
, or RunnableSharedObject
depending on what datum points to and on its extension.
If datum is a capability, creates and returns an appropriate RunnableCapability
object.
Returns an array with contained runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2103,"url":null},"def":{"name":"constituents","visibility":"Public","body":"transparent? ? @runnables : super()"}},{"html_id":"each(&:Runnable->)-instance-method","name":"each","doc":"Yields constituent runnables.","summary":"Yields constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2135,"url":null},"def":{"name":"each","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Runnable ->)"},"visibility":"Public","body":"@runnables.each do |runnable|\n yield runnable\nend"}},{"html_id":"each_path(fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"args_string":"(fn : Path -> )","args_html":"(fn : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2238,"url":null},"def":{"name":"each_path","args":[{"name":"fn","external_name":"fn","restriction":"(Path ->)"}],"visibility":"Public","body":"@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n fn.call(runnable.abspath)\n runnable.each_path(fn)\n else\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableGroup)\n fn.call(runnable.abspath)\n end\n end\nend"}},{"html_id":"each_path(&fn:Path->)-instance-method","name":"each_path","doc":"Recursively yields file and directory paths in this container.","summary":"Recursively yields file and directory paths in this container.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2250,"url":null},"def":{"name":"each_path","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Path ->)"},"visibility":"Public","body":"each_path(fn)"}},{"html_id":"each_sorted_path(selector:GlobSelector,&:Path->)-instance-method","name":"each_sorted_path","doc":"Yields all paths matching *selector* in lexicographic order.\nThe paths are initially taken from the directory of this\ncontainer. See `Disk#glob` for details.","summary":"Yields all paths matching selector in lexicographic order.
","abstract":false,"args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"args_string":"(selector : GlobSelector, & : Path -> )","args_html":"(selector : GlobSelector, & : Path -> )","location":{"filename":"src/novika/resolver.cr","line_number":2265,"url":null},"def":{"name":"each_sorted_path","args":[{"name":"selector","external_name":"selector","restriction":"GlobSelector"}],"yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Path ->)"},"visibility":"Public","body":"paths = [] of Path\n@root.disk.glob(@dir, selector) do |path|\n paths << path\nend\npaths.unstable_sort! do |a, b|\n a.to_s.compare(b.to_s, case_insensitive: true)\nend\npaths.each do |path|\n yield path\nend\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this container is empty, i.e., holds\nhas no constituent runnables.","summary":"Returns whether this container is empty, i.e., holds has no constituent runnables.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2125,"url":null},"def":{"name":"empty?","visibility":"Public","body":"@runnables.empty?"}},{"html_id":"env:Novika::Resolver::RunnableEnvironment-instance-method","name":"env","doc":"Returns the `RunnableEnvironment` assigned to this container.","summary":"Returns the RunnableEnvironment
assigned to this container.
Recursively replaces each runnable in this container with its #constituents
.
Returns whether env is this container's environment.
","abstract":false,"args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"args_string":"(env : RunnableEnvironment)","args_html":"(env : RunnableEnvironment)","location":{"filename":"src/novika/resolver.cr","line_number":2172,"url":null},"def":{"name":"from?","args":[{"name":"env","external_name":"env","restriction":"RunnableEnvironment"}],"visibility":"Public","body":"@env == env"}},{"html_id":"includes?(other)-instance-method","name":"includes?","doc":"Returns whether this container includes the given *runnable*.","summary":"Returns whether this container includes the given runnable.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/resolver.cr","line_number":2130,"url":null},"def":{"name":"includes?","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"@runnables.includes?(other)"}},{"html_id":"paths-instance-method","name":"paths","doc":"Returns a set of *all* paths (file, directory, etc. paths) in\nthis container, including those in nested containers.","summary":"Returns a set of all paths (file, directory, etc.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2256,"url":null},"def":{"name":"paths","visibility":"Public","body":"paths = Set(Path).new\neach_path do |path|\n paths << path\nend\npaths\n"}},{"html_id":"prepend(runnable:Runnable)-instance-method","name":"prepend","doc":"Inserts *runnable* before all other runnables in this container.","summary":"Inserts runnable before all other runnables in this container.
","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2119,"url":null},"def":{"name":"prepend","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"@runnables.unshift(runnable)"}},{"html_id":"recursive_nonterminal_each(fn:Runnable,RunnableContainer->)-instance-method","name":"recursive_nonterminal_each","doc":"Calls *fn* with each nonterminal and the container it's from,\nrecurses into nested `RunnableContainer`s.","summary":"Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Calls fn with each nonterminal and the container it's from, recurses into nested RunnableContainer
s.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Replaces all non-terminal (see Runnable::Terminal
) runnables with the result of fn.
Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"args_string":"(fn : Runnable -> Bool)","args_html":"(fn : Runnable -> Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2307,"url":null},"def":{"name":"recursive_select!","args":[{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"}],"visibility":"Public","body":"@runnables.select! do |runnable|\n fn.call(runnable)\nend\n@runnables.each do |runnable|\n if runnable.is_a?(RunnableContainer)\n else\n next\n end\n runnable.recursive_select!(fn)\nend\n"}},{"html_id":"recursive_select!(&fn:Runnable->Bool)-instance-method","name":"recursive_select!","doc":"Accepts only those runnable in this container and in all nested\ncontainers for which *fn* returns true.\n\nRunnables for which *fn* returned false are mutably deleted.","summary":"Accepts only those runnable in this container and in all nested containers for which fn returns true.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2316,"url":null},"def":{"name":"recursive_select!","yields":1,"block_arity":1,"block_arg":{"name":"fn","external_name":"fn","restriction":"(Runnable -> Bool)"},"visibility":"Public","body":"recursive_select!(fn)"}},{"html_id":"replace(pattern:Runnable,replacement:Runnable)-instance-method","name":"replace","doc":"Replaces *pattern* runnable with the *replacement* runnable\nin this container only (i.e., does not recurse).","summary":"Replaces pattern runnable with the replacement runnable in this container only (i.e., does not recurse).
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"args_string":"(pattern : Runnable, replacement : Runnable)","args_html":"(pattern : Runnable, replacement : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":2281,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Runnable"}],"visibility":"Public","body":"if can_contain?(replacement)\nelse\n return\nend\n@runnables.map! do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"replace(pattern:Runnable,replacement:Array(Runnable))-instance-method","name":"replace","doc":"Replaces *pattern* runnable with multiple *replacement* runnables\nin this container only (i.e. does not recurse). Their order will\nbe the same as that in *replacement*.\n\nRunnables from *replacement* that this container cannot contain\nare left out.","summary":"Replaces pattern runnable with multiple replacement runnables in this container only (i.e.
","abstract":false,"args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"args_string":"(pattern : Runnable, replacement : Array(Runnable))","args_html":"(pattern : Runnable, replacement : Array(Runnable))","location":{"filename":"src/novika/resolver.cr","line_number":2295,"url":null},"def":{"name":"replace","args":[{"name":"pattern","external_name":"pattern","restriction":"Runnable"},{"name":"replacement","external_name":"replacement","restriction":"Array(Runnable)"}],"visibility":"Public","body":"replacement = replacement.select do |runnable|\n can_contain?(runnable)\nend\n@runnables = @runnables.flat_map do |runnable|\n pattern == runnable ? replacement : runnable\nend\n"}},{"html_id":"request(dependency:Resolution::Dependency)-instance-method","name":"request","doc":"Communicates with this container's environment permission\nserver in order to determine whether the use *dependency*\nshould be allowed to `self`.","summary":"Communicates with this container's environment permission server in order to determine whether the use dependency should be allowed to self
.
Rewrites this container until there is no point in doing so.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2430,"url":null},"def":{"name":"rewrite","visibility":"Public","body":"begin\n @root.down(caller: (@ancestor.as?(Runnable)) || self)\n loop do\n previous = @runnables\n @runnables = [] of Runnable\n previous.each(&.specialize(@root, container: self))\n apply_filters!\n if previous == @runnables\n break\n end\n end\nensure\n @root.up\nend"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":2478,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if empty?\n return\nend\nrewrite\ncontainer.append(self)\n"}},{"html_id":"thorough_rewrite-instance-method","name":"thorough_rewrite","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2454,"url":null},"def":{"name":"thorough_rewrite","visibility":"Public","body":"@dir_rewrite = true\nrewrite\n@dir_rewrite = false\nif abspath = @env.abspath?\nelse\n return\nend\nrecursive_nonterminal_map! do |nonterminal, container|\n if container.from?(@env)\n else\n next nonterminal\n end\n child = container.child(abspath, transparent: true)\n child.append(nonterminal)\n child.rewrite\n child\nend\nrewrite\n"}},{"html_id":"to_resolution_set(*,deps=Set(Resolution::Dependency).new,set=ResolutionSet.new)-instance-method","name":"to_resolution_set","doc":"Builds and returns a `ResolutionSet` with resolutions from\nthis container and all nested containers.\n\nYou must call this after `flatten!`. Otherwise, the resulting\n`ResolutionSet` will be underpopulated with dependencies due\nto transparent containers standing in the way.\n\n*deps* is a set of dependencies that *all* resolutions in the\nresulting set should have, regardless of nesting. *Beware that\nit is mutated.*","summary":"Builds and returns a ResolutionSet
with resolutions from this container and all nested containers.
Returns whether this container is transparent.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2037,"url":null},"def":{"name":"transparent?","return_type":"Bool","visibility":"Public","body":"@transparent"}}]},{"html_id":"novika/Novika/Resolver/RunnableDir","path":"Novika/Resolver/RunnableDir.html","kind":"class","full_name":"Novika::Resolver::RunnableDir","name":"RunnableDir","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1279,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a directory in the file system. At this point it is still\nunknown whether the directory is a Novika library, application, or\nsimply that - a directory.\n\nRunnable directories get rewritten to `RunnableGroup`s, which are\naware of the presence or absence of manifest(s); and therefore,\nit is `RunnableGroup`s that know whether they are an app, lib,\nor simply a directory.","summary":"Represents a directory in the file system.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1282,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1286,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"group = RunnableGroup.allocate\nmanifest = Manifest.find(root.disk, @datum, ancestor: group)\ngroup.initialize(@datum, manifest, ancestor: @ancestor)\ncontainer.append(group)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1293,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Dir[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableEnvironment","path":"Novika/Resolver/RunnableEnvironment.html","kind":"class","full_name":"Novika::Resolver::RunnableEnvironment","name":"RunnableEnvironment","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1903,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika environment.","summary":"Represents a Novika environment.
","constructors":[{"html_id":"new(root:RunnableRoot,abspath:Path|Nil)-class-method","name":"new","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"args_string":"(root : RunnableRoot, abspath : Path | Nil)","args_html":"(root : RunnableRoot, abspath : Path | Nil)","location":{"filename":"src/novika/resolver.cr","line_number":1919,"url":null},"def":{"name":"new","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"abspath","external_name":"abspath","restriction":"Path | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(root, abspath)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(path:Path)-instance-method","name":"==","doc":"Returns whether *path* points to this environment's directory.","summary":"Returns whether path points to this environment's directory.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path)","args_html":"(path : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2006,"url":null},"def":{"name":"==","args":[{"name":"path","external_name":"path","restriction":"Path"}],"visibility":"Public","body":"@abspath == path"}},{"html_id":"==(other:self)-instance-method","name":"==","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if same?(other)\n return true\nend\nif @abspath == (other.@abspath)\nelse\n return false\nend\ntrue\n"}},{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if (value = @abspath).nil?\n ::raise(NilAssertionError.new(\"Novika::Resolver::RunnableEnvironment#abspath cannot be nil\"))\nelse\n value\nend"}},{"html_id":"abspath?:Path?-instance-method","name":"abspath?","doc":"Returns the absolute path pointing to this environment's directory.","summary":"Returns the absolute path pointing to this environment's directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1905,"url":null},"def":{"name":"abspath?","visibility":"Public","body":"@abspath"}},{"html_id":"brief(dependency:Resolution::Dependency)-instance-method","name":"brief","doc":"Returns a brief description of *dependency* as per this environment.","summary":"Returns a brief description of dependency as per this environment.
","abstract":false,"args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"args_string":"(dependency : Resolution::Dependency)","args_html":"(dependency : Resolution::Dependency)","location":{"filename":"src/novika/resolver.cr","line_number":1988,"url":null},"def":{"name":"brief","args":[{"name":"dependency","external_name":"dependency","restriction":"Resolution::Dependency"}],"visibility":"Public","body":"dependency.purpose(in: capabilities)"}},{"html_id":"capability?(datum:String):Bool-instance-method","name":"capability?","doc":"Returns whether *datum* is a capability in this environment's\ncapability collection.","summary":"Returns whether datum is a capability in this environment's capability collection.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"String"}],"args_string":"(datum : String) : Bool","args_html":"(datum : String) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1950,"url":null},"def":{"name":"capability?","args":[{"name":"datum","external_name":"datum","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"capabilities.has_capability?(datum)"}},{"html_id":"designate(set:ResolutionSet):Designation-instance-method","name":"designate","doc":"Creates and returns a `Designation` for this environment to\nhandle the given resolution *set*.","summary":"Creates and returns a Designation
for this environment to handle the given resolution set.
Expands datum in this environment's directory.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"args_string":"(datum : Path) : Path | Nil","args_html":"(datum : Path) : Path | Nil","location":{"filename":"src/novika/resolver.cr","line_number":1941,"url":null},"def":{"name":"expand?","args":[{"name":"datum","external_name":"datum","restriction":"Path"}],"return_type":"Path | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif info = @root.disk.info?(abspath.expand(datum))\nelse\n return\nend\ninfo.path\n"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"Two environments are equal when their directories are equal.","summary":"Two environments are equal when their directories are equal.
","abstract":false,"args":[{"name":"hasher","external_name":"hasher","restriction":""}],"args_string":"(hasher)","args_html":"(hasher)","def":{"name":"hash","args":[{"name":"hasher","external_name":"hasher","restriction":""}],"visibility":"Public","body":"hasher = @abspath.hash(hasher)\nhasher\n"}},{"html_id":"includes?(path:Path):Bool-instance-method","name":"includes?","doc":"Returns whether *path* is part of this environment's subtree,\ni.e. is this environment directory's direct or indirect child.","summary":"Returns whether path is part of this environment's subtree, i.e.
","abstract":false,"args":[{"name":"path","external_name":"path","restriction":"Path"}],"args_string":"(path : Path) : Bool","args_html":"(path : Path) : Bool","location":{"filename":"src/novika/resolver.cr","line_number":1994,"url":null},"def":{"name":"includes?","args":[{"name":"path","external_name":"path","restriction":"Path"}],"return_type":"Bool","visibility":"Public","body":"if abspath = @abspath\nelse\n return false\nend\nif abspath == path\n return true\nend\npath.each_parent do |parent|\n if parent == abspath\n return true\n end\nend\nfalse\n"}},{"html_id":"permissions(&:IO->)-instance-method","name":"permissions","doc":"Yields writable `IO` for the content of this environment's\npermissions file. Creates the latter if necessary. Previous\ncontent of the permissions file is cleared.","summary":"Yields writable IO
for the content of this environment's permissions file.
Returns the content of the permissions file of this environment followed by the file's path; or nil if the permissions file does not exist.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1963,"url":null},"def":{"name":"permissions?","return_type":"::Tuple(String, Path) | ::Nil","visibility":"Public","body":"if abspath = @abspath\nelse\n return\nend\nif path = @root.disk.file?(abspath / PERMISSIONS_FILENAME)\nelse\n return\nend\n{@root.disk.read(path), path}\n"}},{"html_id":"request(dependency:Resolution::Dependency,forcontainer:RunnableContainer)-instance-method","name":"request","doc":"Emits a dependency request (see `Resolution::Dependency#request`)\nto the permission server of this environment.","summary":"Emits a dependency request (see Resolution::Dependency#request
) to the permission server of this environment.
Raised when there is an error during runnable resolution.
","constructors":[{"html_id":"new(message,runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(message, runnable : Runnable)","args_html":"(message, runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":104,"url":null},"def":{"name":"new","args":[{"name":"message","external_name":"message","restriction":""},{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(message, runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"runnable:Novika::Resolver::Runnable-instance-method","name":"runnable","doc":"Returns the runnable which is assumed to be the source of\nthis error.","summary":"Returns the runnable which is assumed to be the source of this error.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":102,"url":null},"def":{"name":"runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableGroup","path":"Novika/Resolver/RunnableGroup.html","kind":"class","full_name":"Novika::Resolver::RunnableGroup","name":"RunnableGroup","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1835,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A runnable group is a directory with or without a manifest: that is,\na directory with awareness of whether it is an application, library,\nor simply that - a directory.\n\nRunnable groups, through manifests, are directories with a specific\nrunnable *layout*.\n\nRunnable groups are rewritten to properly ordered (laid out)\n`RunnableContainer`s.\n\nNow to the important bit: since there is never a guaranteed\nlink between a runnable group and the container it was/will\nbe rewritten to, you should manually register it with\n`RunnableRoot#assign` if you ever want the container to *run*.","summary":"A runnable group is a directory with or without a manifest: that is, a directory with awareness of whether it is an application, library, or simply that - a directory.
","constructors":[{"html_id":"new(datum:Path,manifest:Manifest,ancestor=nil)-class-method","name":"new","doc":"Creates a new runnable group.\n\n*manifest* is the manifest of this group. Manifests control\nthe order of runnables in this group.\n\n*datum* is a *normalized* path to the group (a directory).","summary":"Creates a new runnable group.
","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, manifest : Manifest, ancestor = nil)","args_html":"(datum : Path, manifest : Manifest, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1844,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"manifest","external_name":"manifest","restriction":"Manifest"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, manifest, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns an absolute path to this group.","summary":"Returns an absolute path to this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1874,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: group datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"app?:Bool-instance-method","name":"app?","doc":"Returns whether this group represents an app (is laid out\naccording to a '.nk.app' manifest).","summary":"Returns whether this group represents an app (is laid out according to a '.nk.app' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1850,"url":null},"def":{"name":"app?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::App)"}},{"html_id":"entry_name:String-instance-method","name":"entry_name","doc":"Constructs and returns entry filename for this group.\n\nFor instance, if this group's directory is '/path/to/foo', then\nits entry filename will be 'foo.nk'.","summary":"Constructs and returns entry filename for this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1869,"url":null},"def":{"name":"entry_name","return_type":"String","visibility":"Public","body":"\"#{name}.nk\""}},{"html_id":"lib?:Bool-instance-method","name":"lib?","doc":"Returns whether this group represents a lib (is laid out\naccording to a '.nk.lib' manifest).","summary":"Returns whether this group represents a lib (is laid out according to a '.nk.lib' manifest).
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1856,"url":null},"def":{"name":"lib?","return_type":"Bool","visibility":"Public","body":"@manifest.is_a?(Manifest::Lib)"}},{"html_id":"name:String-instance-method","name":"name","doc":"Returns the name of this group.","summary":"Returns the name of this group.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1861,"url":null},"def":{"name":"name","return_type":"String","visibility":"Public","body":"@datum.stem"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1880,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"child = container.child(@datum, transparent: true, ancestor: self)\ncontainer.append(child)\n@manifest.populate(root, child, origin: self)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1890,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"case\nwhen app?\n io << \"App\"\nwhen lib?\n io << \"Lib\"\nelse\n io << \"Group\"\nend\n((io << \"[\") << @datum) << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableIgnored","path":"Novika/Resolver/RunnableIgnored.html","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":69,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Lets signal receivers acknowledge that a runnable was ignored.","summary":"Lets signal receivers acknowledge that a runnable was ignored.
","constructors":[{"html_id":"new(runnable:Runnable)-class-method","name":"new","abstract":false,"args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"args_string":"(runnable : Runnable)","args_html":"(runnable : Runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"new","args":[{"name":"runnable","external_name":"runnable","restriction":"Runnable"}],"visibility":"Public","body":"_ = allocate\n_.initialize(runnable)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@runnable.clone)"}},{"html_id":"copy_with(runnable_runnable=@runnable)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"args_string":"(runnable _runnable = @runnable)","args_html":"(runnable _runnable = @runnable)","location":{"filename":"src/novika/resolver.cr","line_number":69,"url":null},"def":{"name":"copy_with","args":[{"name":"_runnable","default_value":"@runnable","external_name":"runnable","restriction":""}],"visibility":"Public","body":"self.class.new(_runnable)"}},{"html_id":"runnable:Runnable-instance-method","name":"runnable","abstract":false,"def":{"name":"runnable","return_type":"Runnable","visibility":"Public","body":"@runnable"}}]},{"html_id":"novika/Novika/Resolver/RunnableQuery","path":"Novika/Resolver/RunnableQuery.html","kind":"class","full_name":"Novika::Resolver::RunnableQuery","name":"RunnableQuery","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1051,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable queries are one of the most generic kinds of runnables.\nThey specialize themselves through `RunnableContainer#classify?`.","summary":"Runnable queries are one of the most generic kinds of runnables.
","constructors":[{"html_id":"new(datum:Path|String,ancestor=nil,else:Runnable|Nil=self)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"args_string":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","args_html":"(datum : Path | String, ancestor = nil, else : Runnable | Nil = self)","location":{"filename":"src/novika/resolver.cr","line_number":1054,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path | ::String"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""},{"name":"else","default_value":"self","external_name":"else","restriction":"Runnable | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor, else)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1058,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if runnable = container.classify?(@datum, ancestor: self)\n container.append(runnable)\n return\nend\nif alt = @else\nelse\n return\nend\ncontainer.append(alt)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1069,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"Query[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableRoot","path":"Novika/Resolver/RunnableRoot.html","kind":"class","full_name":"Novika::Resolver::RunnableRoot","name":"RunnableRoot","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2516,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable root is available to all containers, and therefore allows\nany runnable to escape deep nesting if need be.\n\nRunnable root stores a pointer to the `Disk` object, used throughout\nthe resolver to cache file system requests (the resolver is quite\nample in making them). It also stores the set of flags, which help\nmaking OS-specific decisions using flag conditions in manifests.\n\nAdditionally, runnable root allows runnables to `wish` queries\nto be resolved later, as requirements, and to talk to each other\nvia `Signal`s and the `SignalReceiver` interface (see `send`).\n\nThere's a lot more, but that's the gist.","summary":"Runnable root is available to all containers, and therefore allows any runnable to escape deep nesting if need be.
","constructors":[{"html_id":"new(disk:Disk,cwd:Path)-class-method","name":"new","abstract":false,"args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"args_string":"(disk : Disk, cwd : Path)","args_html":"(disk : Disk, cwd : Path)","location":{"filename":"src/novika/resolver.cr","line_number":2525,"url":null},"def":{"name":"new","args":[{"name":"disk","external_name":"disk","restriction":"Disk"},{"name":"cwd","external_name":"cwd","restriction":"Path"}],"visibility":"Public","body":"_ = allocate\n_.initialize(disk, cwd)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"assign(group:RunnableGroup,*,container:RunnableContainer,overwrite=true):RunnableContainer-instance-method","name":"assign","doc":"Assigns *container* to the given *group*.\n\nThis is the only way someone from the outside can (reliably)\nget the container of a group.\n\n*overwrite* specifies whether the existing container for *group*\nshould be overwritten with *container*.\n\nReturns the container that was assigned to *group*.","summary":"Assigns container to the given group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"args_string":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","args_html":"(group : RunnableGroup, *, container : RunnableContainer, overwrite = true) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2606,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"container","external_name":"container","restriction":"RunnableContainer"},{"name":"overwrite","default_value":"true","external_name":"overwrite","restriction":""}],"splat_index":1,"return_type":"RunnableContainer","visibility":"Public","body":"if overwrite\n @containers[group] = container\nelse\n @containers.put_if_absent(group, container)\nend"}},{"html_id":"assign(group:RunnableGroup,*,preamble:String)-instance-method","name":"assign","doc":"Assigns *preamble* to the given runnable *group*.","summary":"Assigns preamble to the given runnable group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"args_string":"(group : RunnableGroup, *, preamble : String)","args_html":"(group : RunnableGroup, *, preamble : String)","location":{"filename":"src/novika/resolver.cr","line_number":2615,"url":null},"def":{"name":"assign","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"","external_name":"","restriction":""},{"name":"preamble","external_name":"preamble","restriction":"String"}],"splat_index":1,"visibility":"Public","body":"@preambles[group] = preamble"}},{"html_id":"containerof(group:RunnableGroup):RunnableContainer-instance-method","name":"containerof","doc":"Returns the container assigned to *group*.\n\nRaises if *group* is neither an application nor a library.","summary":"Returns the container assigned to group.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer","args_html":"(group : RunnableGroup) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":2622,"url":null},"def":{"name":"containerof","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer","visibility":"Public","body":"(containerof?(group)) || (raise(\"BUG: container was not assigned to #{group}\"))"}},{"html_id":"containerof?(group:RunnableGroup):RunnableContainer|Nil-instance-method","name":"containerof?","doc":"Returns the container of an application or library *group*, or\nnil if *group* is neither an application nor a library.","summary":"Returns the container of an application or library group, or nil if group is neither an application nor a library.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : RunnableContainer | Nil","args_html":"(group : RunnableGroup) : RunnableContainer | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2628,"url":null},"def":{"name":"containerof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"RunnableContainer | ::Nil","visibility":"Public","body":"@containers[group]?"}},{"html_id":"cwd:Path-instance-method","name":"cwd","doc":"Returns the user's current working directory. It is also\nsometimes referred to as the \"primary origin\", \"origin\" as\nin \"primary origin (source) of files\".","summary":"Returns the user's current working directory.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2523,"url":null},"def":{"name":"cwd","visibility":"Public","body":"@cwd"}},{"html_id":"default_env:RunnableEnvironment-instance-method","name":"default_env","doc":"Returns the default runnable environment.\n\nCurrently, current working directory environment is used as the\ndefault runnable environment.\n\nNote that if the current working directory does not have an\nenvironment, a \"virtual\", pathless environment is returned\n(see `defenv`).","summary":"Returns the default runnable environment.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2590,"url":null},"def":{"name":"default_env","return_type":"RunnableEnvironment","visibility":"Public","body":"@envs[nil]"}},{"html_id":"defenv(path:Path|Nil)-instance-method","name":"defenv","doc":"Returns the `RunnableEnvironment` for *path*, creating one if\nit does not exist.\n\nNote that *path* can be nil, which means the created/returned\nenvironment will be so to speak \"virtual\". The only difference\nbeing the \"virtual\" environment's response to disk-related\nquestions. Namely it'll answer does-not-exist (or something\nlike that) to any disk-related question.\n\nNote also, that only one pathless environment can ever created;\nas a consequence, all runnable containers that have no environments\nwill share one pathless runnable environment.","summary":"Returns the RunnableEnvironment
for path, creating one if it does not exist.
Marks query as explicit ("hand-written") within this runnable root.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2558,"url":null},"def":{"name":"defexplicit","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@explicit)\n return\nend\n@explicit << query\n"}},{"html_id":"disk:Novika::Resolver::Disk-instance-method","name":"disk","doc":"Returns the disk used by this runnable root.","summary":"Returns the disk used by this runnable root.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2518,"url":null},"def":{"name":"disk","visibility":"Public","body":"@disk"}},{"html_id":"each_set_flag(&:String->)-instance-method","name":"each_set_flag","doc":"Yields all set (true) flags.","summary":"Yields all set (true) flags.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2708,"url":null},"def":{"name":"each_set_flag","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(String ->)"},"visibility":"Public","body":"@flags.each do |flag|\n yield flag\nend"}},{"html_id":"each_wish(&:RunnableQuery->)-instance-method","name":"each_wish","doc":"Yields queries from this runnable root's wishlist of queries.\n\nSee `wish`.","summary":"Yields queries from this runnable root's wishlist of queries.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2550,"url":null},"def":{"name":"each_wish","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@wishes.each do |wish|\n yield wish\nend"}},{"html_id":"new_primary_container:RunnableContainer-instance-method","name":"new_primary_container","doc":"Creates and returns a new primary `RunnableContainer`.","summary":"Creates and returns a new primary RunnableContainer
.
Returns the preamble of group, or nil if it has none.
","abstract":false,"args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"args_string":"(group : RunnableGroup) : String | Nil","args_html":"(group : RunnableGroup) : String | Nil","location":{"filename":"src/novika/resolver.cr","line_number":2633,"url":null},"def":{"name":"preambleof?","args":[{"name":"group","external_name":"group","restriction":"RunnableGroup"}],"return_type":"String | ::Nil","visibility":"Public","body":"@preambles[group]?"}},{"html_id":"send(signal:Signal)-instance-method","name":"send","doc":"Sends *signal* to all `SignalReceiver`s subscribed to this\nrunnable root.","summary":"Sends signal to all SignalReceiver
s subscribed to this runnable root.
Creates and returns a permission server in the given runnable environment env and capability collection caps.
","abstract":false,"args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"args_string":"(to env : RunnableEnvironment) : PermissionServer","args_html":"(to env : RunnableEnvironment) : PermissionServer","location":{"filename":"src/novika/resolver.cr","line_number":2662,"url":null},"def":{"name":"serve_permissions","args":[{"name":"env","external_name":"to","restriction":"RunnableEnvironment"}],"return_type":"PermissionServer","visibility":"Public","body":"(PermissionServer.new(env, @explicit)).tap do |server|\n subscribe(server)\nend"}},{"html_id":"set_flag(name:String,state:Bool)-instance-method","name":"set_flag","doc":"Assigns *state* to a boolean flag with the given *name*.\n\nNote that by design, an unset flag is a false flag, and\nvice versa: if *state* is false, the flag is either not\ncreated, or removed.\n\n```\nroot.set_flag(\"happy\", true)\nroot.set_flag(\"sad\", false)\n```","summary":"Assigns state to a boolean flag with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"args_string":"(name : String, state : Bool)","args_html":"(name : String, state : Bool)","location":{"filename":"src/novika/resolver.cr","line_number":2694,"url":null},"def":{"name":"set_flag","args":[{"name":"name","external_name":"name","restriction":"String"},{"name":"state","external_name":"state","restriction":"Bool"}],"visibility":"Public","body":"if state\n @flags << name\n return\nend\nif name.in?(@flags)\n @flags.delete(name)\nend\n"}},{"html_id":"subscribe(receiver:SignalReceiver)-instance-method","name":"subscribe","doc":"Subscribes *receiver* to this runnable root.","summary":"Subscribes receiver to this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2640,"url":null},"def":{"name":"subscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers << receiver"}},{"html_id":"unsubscribe(receiver:SignalReceiver)-instance-method","name":"unsubscribe","doc":"Unsubscribes *receiver* from this runnable root.","summary":"Unsubscribes receiver from this runnable root.
","abstract":false,"args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"args_string":"(receiver : SignalReceiver)","args_html":"(receiver : SignalReceiver)","location":{"filename":"src/novika/resolver.cr","line_number":2645,"url":null},"def":{"name":"unsubscribe","args":[{"name":"receiver","external_name":"receiver","restriction":"SignalReceiver"}],"visibility":"Public","body":"@receivers.delete(receiver)"}},{"html_id":"wish(query:RunnableQuery)-instance-method","name":"wish","doc":"Appends *query* to the wishlist of this runnable root (the\nwishlist is like \"outbound queries\" or \"preload requests\").\n\nWishes are picked up from the wishlist by outer infrastructure\nand loaded distinctly. The only guarantee is that they will\nindeed be *pre*loaded relative to the query that made the wish,\nmeaning loaded some time before it.\n\nDoes nothing if *query* is already in the wishlist.","summary":"Appends query to the wishlist of this runnable root (the wishlist is like "outbound queries" or "preload requests").
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":2541,"url":null},"def":{"name":"wish","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"if query.in?(@wishes)\n return\nend\n@wishes << query\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableScript","path":"Novika/Resolver/RunnableScript.html","kind":"class","full_name":"Novika::Resolver::RunnableScript","name":"RunnableScript","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1245,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".nk\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Represents a Novika script, specifically a '.nk' file.","summary":"Represents a Novika script, specifically a '.nk' file.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1251,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"abspath-instance-method","name":"abspath","doc":"Returns the absolute path to this script.","summary":"Returns the absolute path to this script.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1256,"url":null},"def":{"name":"abspath","visibility":"Public","body":"if @datum.absolute?\nelse\n raise(\"BUG: script datum is not an absolute path\")\nend\n@datum\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1262,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"(io << \"Script[\") << @datum\neach_ancestor do |ancestor|\n (io << \" ← \") << ancestor\nend\nio << \"]\"\n"}}]},{"html_id":"novika/Novika/Resolver/RunnableSelector","path":"Novika/Resolver/RunnableSelector.html","kind":"class","full_name":"Novika::Resolver::RunnableSelector","name":"RunnableSelector","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1076,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Selectors match, and are rewritten to, file system entries in the\ndirectory of the container that is doing the rewriting.","summary":"Selectors match, and are rewritten to, file system entries in the directory of the container that is doing the rewriting.
","constructors":[{"html_id":"new(datum:Novika::Resolver::GlobSelector,reject:Set(String)=Set(String).new,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","args_html":"(datum : Novika::Resolver::GlobSelector, reject : Set(String) = Set(String).new, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1079,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Novika::Resolver::GlobSelector"},{"name":"reject","default_value":"Set(String).new","external_name":"reject","restriction":"::Set(::String)"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, reject, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1083,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"container.each_sorted_path(@datum) do |path|\n basename = path.basename\n if basename.in?(@reject)\n next\n end\n if basename.starts_with?('_')\n next\n end\n case @datum\n in .scripts?\n if path.extension == RunnableScript::EXTENSION\n else\n next\n end\n runnable = RunnableScript.new(path, ancestor: self)\n in .directories?\n runnable = RunnableDir.new(path, ancestor: self)\n if basename == \"core\"\n container.prepend(runnable)\n next\n end\n end\n container.append(runnable)\nend"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1108,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((((io << \"Forall[\") << @datum) << \" ∉ {\") << (@reject.join(','))) << \"}]\""}}]},{"html_id":"novika/Novika/Resolver/RunnableSharedObject","path":"Novika/Resolver/RunnableSharedObject.html","kind":"class","full_name":"Novika::Resolver::RunnableSharedObject","name":"RunnableSharedObject","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},"ancestors":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1178,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"EXTENSION","name":"EXTENSION","value":"\".so\""}],"included_modules":[{"html_id":"novika/Novika/Resolver/Resolution/Dependency","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency","name":"Dependency"},{"html_id":"novika/Novika/Resolver/Resolution/Dependency/DefaultPrompt","kind":"module","full_name":"Novika::Resolver::Resolution::Dependency::DefaultPrompt","name":"DefaultPrompt"},{"html_id":"novika/Novika/Resolver/Runnable/HasDatum","kind":"module","full_name":"Novika::Resolver::Runnable::HasDatum","name":"HasDatum"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Runnable representation of a shared object. Shared objects are\naccessed via FFI Novika-side.","summary":"Runnable representation of a shared object.
","constructors":[{"html_id":"new(datum:Path,ancestor=nil)-class-method","name":"new","abstract":false,"args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"args_string":"(datum : Path, ancestor = nil)","args_html":"(datum : Path, ancestor = nil)","location":{"filename":"src/novika/resolver.cr","line_number":1194,"url":null},"def":{"name":"new","args":[{"name":"datum","external_name":"datum","restriction":"::Path"},{"name":"ancestor","default_value":"nil","external_name":"ancestor","restriction":""}],"visibility":"Public","body":"_ = allocate\n_.initialize(datum, ancestor)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"enable(*,incaps:CapabilityCollection)-instance-method","name":"enable","doc":"If this dependency is `allowed?`, enables it in the given\ncapability collection *caps*.","summary":"If this dependency is allowed?
, enables it in the given capability collection caps.
Returns the string representation of this dependency's envelope (its container so to speak).
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer)","args_html":"(container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1208,"url":null},"def":{"name":"envelope","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"if envelope = @envelope\nelse\n return \"ancestor(#{container.abspath})\"\nend\nenvelope.abspath.to_s\n"}},{"html_id":"id-instance-method","name":"id","doc":"Returns the id of this shared object.\n\nThe id is made by taking the stem of the path to the object and\nstripping it of the lib prefix, if it has one. For example, given\n`/lib/libmath.so` or `/lib/math.so`, the id would be `math` in\nboth cases.","summary":"Returns the id of this shared object.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":1204,"url":null},"def":{"name":"id","visibility":"Public","body":"@datum.stem.lchop(\"lib\")"}},{"html_id":"label(server:PermissionServer):String-instance-method","name":"label","doc":"Returns a user-friendly string representation of this dependency.\nThe returned string should be suitable for displaying to the user\nin a prompt.\n\n*server* is the permission server that will then use the label in\none way or another. You may also choose to derive the label with\n*server*'s help.","summary":"Returns a user-friendly string representation of this dependency.
","abstract":false,"args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"args_string":"(server : PermissionServer) : String","args_html":"(server : PermissionServer) : String","location":{"filename":"src/novika/resolver.cr","line_number":1222,"url":null},"def":{"name":"label","args":[{"name":"server","external_name":"server","restriction":"PermissionServer"}],"return_type":"String","visibility":"Public","body":"\"shared object #{@datum.colorize.bold}\""}},{"html_id":"signature(container:RunnableContainer):Signature-instance-method","name":"signature","doc":"Returns the signature of this dependency which can be used\nto identify it, most notably in the 'permissions' file.\n\n*container*, assumed to contain this dependency, may be used\nto derive the signature.","summary":"Returns the signature of this dependency which can be used to identify it, most notably in the 'permissions' file.
","abstract":false,"args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(container : RunnableContainer) : Signature","args_html":"(container : RunnableContainer) : Signature","location":{"filename":"src/novika/resolver.cr","line_number":1214,"url":null},"def":{"name":"signature","args":[{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"Signature","visibility":"Public","body":"if envelope = @envelope\nelse\n raise(\"BUG: attempt to read the signature of an unmounted shared object\")\nend\n{envelope.abspath.to_s, @datum.to_s}\n"}},{"html_id":"specialize(root:RunnableRoot,container:RunnableContainer)-instance-method","name":"specialize","doc":"Further specializes this runnable. Appends the specialized runnable\nto (or interacts in some other way with) *container*. The latter is\nassumed to be incomplete (or partially complete, which is really\nthe same thing).\n\n*root* is the runnable root object. It is mainly used for flags and\nthorough rewriting.","summary":"Further specializes this runnable.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, container : RunnableContainer)","args_html":"(root : RunnableRoot, container : RunnableContainer)","location":{"filename":"src/novika/resolver.cr","line_number":1233,"url":null},"def":{"name":"specialize","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"visibility":"Public","body":"@envelope || (@envelope = container)\nsuper(root, container)\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1239,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"((io << \"SharedObject[\") << @datum) << \"]\""}}]},{"html_id":"novika/Novika/Resolver/ScriptsSlot","path":"Novika/Resolver/ScriptsSlot.html","kind":"class","full_name":"Novika::Resolver::ScriptsSlot","name":"ScriptsSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1336,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts\" in the container's directory, represented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts" in the container's directory, represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1337,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\nroot.disk.glob(manifest.directory, GlobSelector::Scripts) do |datum|\n if datum.in?(mentioned)\n next\n end\n content.append(RunnableScript.new(datum, ancestor: self))\nend\ncontainer.replace(self, content)\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1361,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[*]\""}}]},{"html_id":"novika/Novika/Resolver/Session","path":"Novika/Resolver/Session.html","kind":"class","full_name":"Novika::Resolver::Session","name":"Session","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":2973,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"A resolver session interacts with a `RunnableRoot` in a way that\nallows you to *query*. Querying is done by `push`ing some queries,\nand then `pop`ping them \"into\" a `Response` object which you should\ncreate beforehand, and which you own.\n\n```\nsession = Resolver::Session.new(root)\nsession.push(\"foo\")\nsession.push(\"bar\")\nsession.push(\"baz\")\n\nresponse1 = Resolver::Response.new\nsession.pop(response1)\n\n# Re-use the same session. Queries were popped, so the session\n# is clean.\nsession.push(\"xyzzy\")\nsession.push(\"byzzy\")\n\nresponse2 = Resolver::Response.new\nsession.pop(response2)\n\n# Run the accepted stuff from the responses...\nresponse1.accepted_set.each_designation(root, &.run)\nresponse2.accepted_set.each_designation(root, &.run)\n```","summary":"A resolver session interacts with a RunnableRoot
in a way that allows you to query.
Yields only those queries from the query list that were marked as explicit.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2999,"url":null},"def":{"name":"each_explicit","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@explicit.each do |query|\n yield query\nend"}},{"html_id":"each_query(&:RunnableQuery->)-instance-method","name":"each_query","doc":"Yields all queries from the query list.","summary":"Yields all queries from the query list.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3006,"url":null},"def":{"name":"each_query","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(RunnableQuery ->)"},"visibility":"Public","body":"@queries.each do |query|\n yield query\nend"}},{"html_id":"on_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":2981,"url":null},"def":{"name":"on_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"on_container_rewritten(callback)"}},{"html_id":"on_container_rewritten(callback:RunnableContainer->)-instance-method","name":"on_container_rewritten","doc":"Registers *callback* to be called when a runnable container\nis thoroughly rewritten.","summary":"Registers callback to be called when a runnable container is thoroughly rewritten.
","abstract":false,"args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"args_string":"(callback : RunnableContainer -> )","args_html":"(callback : RunnableContainer -> )","location":{"filename":"src/novika/resolver.cr","line_number":2986,"url":null},"def":{"name":"on_container_rewritten","args":[{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"}],"visibility":"Public","body":"@on_container_rewritten << callback"}},{"html_id":"pop(response:Response):ResolutionSet-instance-method","name":"pop","doc":"Resolves the list of queries that were `push`ed, returns the single\nresolution set comprised of resolutions for those queries that\nwere accepted by the resolver.\n\nAlso fills *response*, see `Response` for what you can get out of it.","summary":"Resolves the list of queries that were #push
ed, returns the single resolution set comprised of resolutions for those queries that were accepted by the resolver.
Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : RunnableQuery, explicit = false)","args_html":"(query : RunnableQuery, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3013,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries << query\nif explicit\n @explicit << query\nend\n"}},{"html_id":"push(query:Query,explicit=false)-instance-method","name":"push","doc":"Appends *query* to the list of queries to be resolved during\nthis session; allows to mark it as *explicit* (\"hand-written\")\nif necessary.","summary":"Appends query to the list of queries to be resolved during this session; allows to mark it as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(query : Query, explicit = false)","args_html":"(query : Query, explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3019,"url":null},"def":{"name":"push","args":[{"name":"query","external_name":"query","restriction":"Query"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(RunnableQuery.new(query), explicit)"}},{"html_id":"push(queries:Array(RunnableQuery),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(RunnableQuery), explicit = false)","args_html":"(queries : Array(RunnableQuery), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3026,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(RunnableQuery)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"@queries.concat(queries)\nif explicit\n @explicit.concat(queries)\nend\n"}},{"html_id":"push(queries:Array(Query)|Array(String)|Array(Path),explicit=false)-instance-method","name":"push","doc":"Appends the entire array of *queries* to the list of queries\nto be resolved during this session; allows to mark *all* of\nthem as *explicit* (\"hand-written\") if necessary.","summary":"Appends the entire array of queries to the list of queries to be resolved during this session; allows to mark all of them as explicit ("hand-written") if necessary.
","abstract":false,"args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"args_string":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","args_html":"(queries : Array(Query) | Array(String) | Array(Path), explicit = false)","location":{"filename":"src/novika/resolver.cr","line_number":3032,"url":null},"def":{"name":"push","args":[{"name":"queries","external_name":"queries","restriction":"Array(Query) | Array(String) | Array(Path)"},{"name":"explicit","default_value":"false","external_name":"explicit","restriction":""}],"visibility":"Public","body":"push(queries.map do |query|\n RunnableQuery.new(query)\nend, explicit)"}}]},{"html_id":"novika/Novika/Resolver/Signal","path":"Novika/Resolver/Signal.html","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal","abstract":true,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":57,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/Resolver/DoDiskLoad","kind":"struct","full_name":"Novika::Resolver::DoDiskLoad","name":"DoDiskLoad"},{"html_id":"novika/Novika/Resolver/DoDiskSave","kind":"struct","full_name":"Novika::Resolver::DoDiskSave","name":"DoDiskSave"},{"html_id":"novika/Novika/Resolver/RunnableIgnored","kind":"struct","full_name":"Novika::Resolver::RunnableIgnored","name":"RunnableIgnored"},{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"},{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}],"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Base class of signals received by `SignalReceiver`s","summary":"Base class of signals received by SignalReceiver
s
SignalReceiver
s can receive signals sent by the RunnableRoot
.
Receives and reacts to a signal sent by RunnableRoot
.
Base class of ScriptsSlot
(known to the user as *
), SubtreeSlot
(known to the user as **
), and ChildSlot
(<>
).
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":true,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1325,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Resolver/SubtreeSlot","path":"Novika/Resolver/SubtreeSlot.html","kind":"class","full_name":"Novika::Resolver::SubtreeSlot","name":"SubtreeSlot","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},"ancestors":[{"html_id":"novika/Novika/Resolver/Slot","kind":"class","full_name":"Novika::Resolver::Slot","name":"Slot"},{"html_id":"novika/Novika/Resolver/Runnable/Terminal","kind":"module","full_name":"Novika::Resolver::Runnable::Terminal","name":"Terminal"},{"html_id":"novika/Novika/Resolver/Runnable","kind":"class","full_name":"Novika::Resolver::Runnable","name":"Runnable"},{"html_id":"novika/Novika/Resolver/Runnable/Ancestor","kind":"module","full_name":"Novika::Resolver::Runnable::Ancestor","name":"Ancestor"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":1370,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"Slot (placeholder) that stands for \"all not otherwise mentioned\nNovika scripts and directories in the subtree (recursively),\nexcept for Novika application and library directories\",\nrepresented with `**`.","summary":"Slot (placeholder) that stands for "all not otherwise mentioned Novika scripts and directories in the subtree (recursively), except for Novika application and library directories", represented with **
.
Replaces any occurences of this slot in container with a container holding the runnables this slot stands for.
","abstract":false,"args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"args_string":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","args_html":"(root : RunnableRoot, group : RunnableGroup, manifest : Manifest::Present, population : RunnableContainer, container : RunnableContainer) : RunnableContainer","location":{"filename":"src/novika/resolver.cr","line_number":1371,"url":null},"def":{"name":"replace","args":[{"name":"root","external_name":"root","restriction":"RunnableRoot"},{"name":"group","external_name":"group","restriction":"RunnableGroup"},{"name":"manifest","external_name":"manifest","restriction":"Manifest::Present"},{"name":"population","external_name":"population","restriction":"RunnableContainer"},{"name":"container","external_name":"container","restriction":"RunnableContainer"}],"return_type":"RunnableContainer","visibility":"Public","body":"mentioned = population.paths\ncontent = container.child(manifest.directory, transparent: true, ancestor: self)\ncontent.allow? do |r|\n !(r.is_a?(RunnableGroup) && (r.app? || r.lib?))\nend\ncontainer.replace(self, content)\nmanifest.layout(content, group)\ncontent.rewrite\ncontent.recursive_select! do |runnable|\n if runnable.is_a?(RunnableScript) || runnable.is_a?(RunnableContainer)\n else\n next false\n end\n !(runnable.abspath.in?(mentioned))\nend\npopulation\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/resolver.cr","line_number":1416,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << \"Slot[**]\""}}]},{"html_id":"novika/Novika/Resolver/ToAnswerDo","path":"Novika/Resolver/ToAnswerDo.html","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":80,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to answer a question, gives them\na Proc which will allow them to do that.","summary":"If signal receivers want to answer a question, gives them a Proc which will allow them to do that.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":80,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAnswerDo/Fn","path":"Novika/Resolver/ToAnswerDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAnswerDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":81,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, Nil)","aliased_html":"String -> Nil","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAnswerDo","kind":"struct","full_name":"Novika::Resolver::ToAnswerDo","name":"ToAnswerDo"}}]},{"html_id":"novika/Novika/Resolver/ToAskDo","path":"Novika/Resolver/ToAskDo.html","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo","abstract":false,"superclass":{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},"ancestors":[{"html_id":"novika/Novika/Resolver/Signal","kind":"struct","full_name":"Novika::Resolver::Signal","name":"Signal"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":74,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},"doc":"If signal receivers want to ask a question, gives them\na Proc which will do that and return a string answer, or\nnil if the user discarded the question.","summary":"If signal receivers want to ask a question, gives them a Proc which will do that and return a string answer, or nil if the user discarded the question.
","constructors":[{"html_id":"new(fn:Fn)-class-method","name":"new","abstract":false,"args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"args_string":"(fn : Fn)","args_html":"(fn : Fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"new","args":[{"name":"fn","external_name":"fn","restriction":"Fn"}],"visibility":"Public","body":"_ = allocate\n_.initialize(fn)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"clone-instance-method","name":"clone","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"clone","visibility":"Public","body":"self.class.new(@fn.clone)"}},{"html_id":"copy_with(fn_fn=@fn)-instance-method","name":"copy_with","abstract":false,"args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"args_string":"(fn _fn = @fn)","args_html":"(fn _fn = @fn)","location":{"filename":"src/novika/resolver.cr","line_number":74,"url":null},"def":{"name":"copy_with","args":[{"name":"_fn","default_value":"@fn","external_name":"fn","restriction":""}],"visibility":"Public","body":"self.class.new(_fn)"}},{"html_id":"fn:Fn-instance-method","name":"fn","abstract":false,"def":{"name":"fn","return_type":"Fn","visibility":"Public","body":"@fn"}}],"types":[{"html_id":"novika/Novika/Resolver/ToAskDo/Fn","path":"Novika/Resolver/ToAskDo/Fn.html","kind":"alias","full_name":"Novika::Resolver::ToAskDo::Fn","name":"Fn","abstract":false,"locations":[{"filename":"src/novika/resolver.cr","line_number":75,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":true,"aliased":"Proc(String, (String | Nil))","aliased_html":"String -> String?","const":false,"namespace":{"html_id":"novika/Novika/Resolver/ToAskDo","kind":"struct","full_name":"Novika::Resolver::ToAskDo","name":"ToAskDo"}}]}]},{"html_id":"novika/Novika/RunnableResolver","path":"Novika/RunnableResolver.html","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3095,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Resolver","kind":"module","full_name":"Novika::Resolver","name":"Resolver"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A very high-level interface to the Novika resolver. Designed as one-\nshot, meaning you shouldn't reuse the same object twice or call\n`resolve?` twice. In this regard, as a protection, calling `resolve?`\ntwice will raise.\n\nSee `Session` and `Response` if you want a lower-level interface.\n\n```\nresolver = Novika::RunnableResolver.new(cwd: Path[Dir.current], args: [\"repl\"])\n\n# Define 'gets' and 'print' to ask for permissions.\n\nresolver.on_permissions_gets do |string|\n print string\n gets\nend\n\nresolver.on_permissions_print do |string|\n print string\nend\n\n# Run \"repl\" and everything it requested.\n\nresolver.after_permissions(&.run)\nresolver.resolve?\n```","summary":"A very high-level interface to the Novika resolver.
","constructors":[{"html_id":"new(cwd:Path,args:Array(Query))-class-method","name":"new","doc":"Creates a new resolver for the given current working directory\n*cwd* and query arguments *args*.\n\nSee `RunnableResolver`.","summary":"Creates a new resolver for the given current working directory cwd and query arguments args.
","abstract":false,"args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"args_string":"(cwd : Path, args : Array(Query))","args_html":"(cwd : Path, args : Array(Query))","location":{"filename":"src/novika/resolver.cr","line_number":3166,"url":null},"def":{"name":"new","args":[{"name":"cwd","external_name":"cwd","restriction":"Path"},{"name":"args","external_name":"args","restriction":"Array(Query)"}],"visibility":"Public","body":"_ = allocate\n_.initialize(cwd, args)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"after_container_rewritten(&callback:RunnableContainer->)-instance-method","name":"after_container_rewritten","doc":"Called when some container under this resolver was thoroughly rewritten.\n\nYou'll have to do additional checks to figure out where the\ncontainer came from. This is mainly an inspection method.","summary":"Called when some container under this resolver was thoroughly rewritten.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3210,"url":null},"def":{"name":"after_container_rewritten","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(RunnableContainer ->)"},"visibility":"Public","body":"@session.on_container_rewritten(callback)"}},{"html_id":"after_permissions(&callback:PermissionsHook->)-instance-method","name":"after_permissions","doc":"Registers *callback* to run after a valid Novika program is formed,\nand permissions are given.","summary":"Registers callback to run after a valid Novika program is formed, and permissions are given.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3245,"url":null},"def":{"name":"after_permissions","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(PermissionsHook ->)"},"visibility":"Public","body":"@after_permissions << callback"}},{"html_id":"after_program(&callback:ProgramHook->)-instance-method","name":"after_program","doc":"Registers *callback* to run after a valid Novika program is formed.\nSee `ProgramHook` to learn what is considered a Novika program.","summary":"Registers callback to run after a valid Novika program is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3231,"url":null},"def":{"name":"after_program","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ProgramHook ->)"},"visibility":"Public","body":"@after_program << callback"}},{"html_id":"after_response(&callback:ResponseHook->)-instance-method","name":"after_response","doc":"Registers *callback* to run after a valid response is formed.","summary":"Registers callback to run after a valid response is formed.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3217,"url":null},"def":{"name":"after_response","yields":1,"block_arity":1,"block_arg":{"name":"callback","external_name":"callback","restriction":"(ResponseHook ->)"},"visibility":"Public","body":"@after_response << callback"}},{"html_id":"argument?(query:RunnableQuery)-instance-method","name":"argument?","doc":"Returns whether *query* was passed as an argument to this resolver.","summary":"Returns whether query was passed as an argument to this resolver.
","abstract":false,"args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"args_string":"(query : RunnableQuery)","args_html":"(query : RunnableQuery)","location":{"filename":"src/novika/resolver.cr","line_number":3193,"url":null},"def":{"name":"argument?","args":[{"name":"query","external_name":"query","restriction":"RunnableQuery"}],"visibility":"Public","body":"@args.any?(&.same?(query))"}},{"html_id":"on_permissions_gets(&on_permissions_gets:String->String|Nil)-instance-method","name":"on_permissions_gets","doc":"Registers a handler for permissions `gets`. Overrides the previous\nhandler, if any.","summary":"Registers a handler for permissions gets
.
Registers a handler for permissions print
.
Performs resolution.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3296,"url":null},"def":{"name":"resolve?","return_type":"Bool","visibility":"Public","body":"if @resolved\n raise(\"BUG: attempt to RunnableResolver#resolve? twice\")\nend\nif @args.empty?\n manifest = Manifest.find(@root.disk, @cwd)\n if resolve_cwd?(manifest)\n else\n return false\n end\nelse\n sched?(@args, explicit: true)\nend\nif @response.successful?\nelse\n raise(ResponseRejectedError.new(@response))\nend\non_response(@response)\nprogram = @response.accepted_set\napps = program.unique_apps\nif apps.size > 1\n raise(MoreThanOneAppError.new(apps))\nend\non_program(program)\n@root.send(DoDiskLoad.new)\n@root.send(ToAskDo.new(@on_permissions_gets))\n@root.send(ToAnswerDo.new(@on_permissions_print))\nprogram.each_unique_dependency_with_dependents do |dependency, dependents|\n skiplist = Set(Resolution).new\n visited = Set(RunnableGroup).new\n dependents.each_group do |group, resolution|\n if group.app? || group.lib?\n else\n next\n end\n if group.in?(visited)\n skiplist << resolution\n next\n end\n container = @root.containerof(group)\n container.request(dependency)\n visited << group\n skiplist << resolution\n end\n dependents.each do |resolution|\n if resolution.in?(skiplist)\n next\n end\n resolution.each_dependency(&.allow)\n end\nend\n@root.send(DoDiskSave.new)\non_permissions(program)\n@resolved = true\ntrue\n"}}],"types":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","path":"Novika/RunnableResolver/PermissionsHook.html","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook","abstract":false,"superclass":{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},"ancestors":[{"html_id":"novika/Novika/RunnableResolver/ProgramHook","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3143,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"Same as `ProgramHook` but also allows you to run the program.","summary":"Same as ProgramHook
but also allows you to run the program.
Returns the list of designations in the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3145,"url":null},"def":{"name":"designations","return_type":"Array(Designation)","visibility":"Public","body":"designations = [] of Designation\n@program.each_designation(@root) do |designation|\n designations << designation\nend\ndesignations\n"}},{"html_id":"run-instance-method","name":"run","doc":"Runs the program.","summary":"Runs the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3154,"url":null},"def":{"name":"run","visibility":"Public","body":"@program.each_designation(@root, &.run)"}}]},{"html_id":"novika/Novika/RunnableResolver/ProgramHook","path":"Novika/RunnableResolver/ProgramHook.html","kind":"class","full_name":"Novika::RunnableResolver::ProgramHook","name":"ProgramHook","abstract":false,"superclass":{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/resolver.cr","line_number":3127,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"subclasses":[{"html_id":"novika/Novika/RunnableResolver/PermissionsHook","kind":"class","full_name":"Novika::RunnableResolver::PermissionsHook","name":"PermissionsHook"}],"namespace":{"html_id":"novika/Novika/RunnableResolver","kind":"class","full_name":"Novika::RunnableResolver","name":"RunnableResolver"},"doc":"An object that helps you do high-level things with a `ResolutionSet`\nfor the entire *program*.\n\nA Novika program is basically a collection of properly arranged\nNovika scripts. This is represented by a single `ResolutionSet`,\nwhich is an ordered set. It being a set means that you cannot\nexecute a single script twice in one session of the resolver,\nthat is, globally.","summary":"An object that helps you do high-level things with a ResolutionSet
for the entire program.
Makes and yields designations for the program.
","abstract":false,"location":{"filename":"src/novika/resolver.cr","line_number":3137,"url":null},"def":{"name":"each_designation","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(Designation ->)"},"visibility":"Public","body":"@program.each_designation(@root) do |designation|\n yield designation\nend"}},{"html_id":"program:Novika::Resolver::ResolutionSet-instance-method","name":"program","doc":"Returns the program `ResolutionSet`.","summary":"Returns the program ResolutionSet
.
An object that helps you do high-level things with a Response
.
Yields preambles of apps and libs that were queried for in arguments to RunnableResolver#new
specifically, followed by their corresponding runnable groups.
Returns the Response
object.
Marks this object as schedulable in Engine
.
Safe #schedule
.
Unsafe #schedule
.
The includer should be a Form
.
Scissors deal with cutting a source string into fragments, known as unclassified forms.
","class_methods":[{"html_id":"cut(source:String,&:Int32,Int32,Int32|Nil->)-class-method","name":"cut","doc":"Cuts *source* into a series of *unclassified forms*; yields\nstart byte index and byte length of each to the block.","summary":"Cuts source into a series of unclassified forms; yields start byte index and byte length of each to the block.
","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String, & : Int32, Int32, Int32 | Nil -> )","args_html":"(source : String, & : Int32, Int32, Int32 | Nil -> )","location":{"filename":"src/novika/scissors.cr","line_number":215,"url":null},"def":{"name":"cut","args":[{"name":"source","external_name":"source","restriction":"String"}],"yields":3,"block_arity":3,"block_arg":{"name":"","external_name":"","restriction":"(Int32, Int32, Int32 | ::Nil ->)"},"visibility":"Public","body":"slicer = new(source)\nslicer.each do |start, count, dot|\n yield start, count, dot\nend\n"}}],"constructors":[{"html_id":"new(source:String)-class-method","name":"new","abstract":false,"args":[{"name":"source","external_name":"source","restriction":"String"}],"args_string":"(source : String)","args_html":"(source : String)","location":{"filename":"src/novika/scissors.cr","line_number":14,"url":null},"def":{"name":"new","args":[{"name":"source","external_name":"source","restriction":"String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(source)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"each(&)-instance-method","name":"each","doc":"Cuts the source string into a series of *unclassified forms*;\nyields start byte index, byte length, and first dot `'.'` byte\nindex of each to the block.\n\nDot byte index is yielded to save an O(N) search, which would\nbe otherwise required since '.' is handled specially by several\nforms in Novika.","summary":"Cuts the source string into a series of unclassified forms; yields start byte index, byte length, and first dot '.'
byte index of each to the block.
Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::SmallDecimalSnapshot]","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"basic\", name: value, cls: Int64, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Decimal)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"args_string":"(form : Decimal)","args_html":"(form : Decimal)","location":{"filename":"src/novika/image.cr","line_number":140,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Decimal"}],"visibility":"Public","body":"decimal = new\ndecimal.value = form.to_i64\ndecimal\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":131,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":136,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Decimal.new(value)"}},{"html_id":"value:Int64-instance-method","name":"value","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"def":{"name":"value","return_type":"Int64","visibility":"Public","body":"@value"}},{"html_id":"value=(value:Int64)-instance-method","name":"value=","doc":"Holds the i64 value.","summary":"Holds the i64 value.
","abstract":false,"args":[{"name":"value","external_name":"value","restriction":"Int64"}],"args_string":"(value : Int64)","args_html":"(value : Int64)","def":{"name":"value=","args":[{"name":"value","external_name":"value","restriction":"Int64"}],"visibility":"Public","body":"@value = value"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a decimal form, small enough to fit into\nan i64.\n\nIts type is `SnapshotType::SmallDecimal`.","summary":"Snapshot of a decimal form, small enough to fit into an i64.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":130,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/Snapshot","path":"Novika/Snapshot.html","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot","abstract":true,"superclass":{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},"ancestors":[{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":38,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"system\"]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::Snapshot]","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"PARTS","name":"PARTS","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
"}],"subclasses":[{"html_id":"novika/Novika/BlockRefSnapshot","kind":"class","full_name":"Novika::BlockRefSnapshot","name":"BlockRefSnapshot"},{"html_id":"novika/Novika/BooleanSnapshot","kind":"class","full_name":"Novika::BooleanSnapshot","name":"BooleanSnapshot"},{"html_id":"novika/Novika/BuiltinSnapshot","kind":"class","full_name":"Novika::BuiltinSnapshot","name":"BuiltinSnapshot"},{"html_id":"novika/Novika/BytesliceSnapshot","kind":"class","full_name":"Novika::BytesliceSnapshot","name":"BytesliceSnapshot"},{"html_id":"novika/Novika/ColorSnapshot","kind":"class","full_name":"Novika::ColorSnapshot","name":"ColorSnapshot"},{"html_id":"novika/Novika/LargeDecimalSnapshot","kind":"class","full_name":"Novika::LargeDecimalSnapshot","name":"LargeDecimalSnapshot"},{"html_id":"novika/Novika/QuotedWordSnapshot","kind":"class","full_name":"Novika::QuotedWordSnapshot","name":"QuotedWordSnapshot"},{"html_id":"novika/Novika/QuoteSnapshot","kind":"class","full_name":"Novika::QuoteSnapshot","name":"QuoteSnapshot"},{"html_id":"novika/Novika/SmallDecimalSnapshot","kind":"class","full_name":"Novika::SmallDecimalSnapshot","name":"SmallDecimalSnapshot"},{"html_id":"novika/Novika/WordSnapshot","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}}],"instance_methods":[{"html_id":"to_form(assembler:BlockAssembler)-instance-method","name":"to_form","doc":"Converts this snapshot to the corresponding form.","summary":"Converts this snapshot to the corresponding form.
","abstract":true,"args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"args_string":"(assembler : BlockAssembler)","args_html":"(assembler : BlockAssembler)","location":{"filename":"src/novika/image.cr","line_number":40,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":"BlockAssembler"}],"visibility":"Public","body":""}}],"macros":[{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Base class for *snapshots*.\n\nSnapshots are blobs of binary data corresponding to a\nNovika *value* form. Since `Block`s are not value\nforms, they are stored in `BlockPool` and pointed to by\n\"imaginary\" (or \"transitory\") forms that go by the name\nof *block references*.\n\nAll snapshots are big-endian-ordered.","summary":"Base class for snapshots.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":38,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}}]},{"html_id":"novika/Novika/SnapshotType","path":"Novika/SnapshotType.html","kind":"enum","full_name":"Novika::SnapshotType","name":"SnapshotType","abstract":false,"ancestors":[{"html_id":"novika/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"novika/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":11,"url":null}],"repository_name":"novika","program":false,"enum":true,"alias":false,"const":false,"constants":[{"id":"Word","name":"Word","value":"0_u8"},{"id":"BlockRef","name":"BlockRef","value":"1_u8"},{"id":"SmallDecimal","name":"SmallDecimal","value":"2_u8"},{"id":"LargeDecimal","name":"LargeDecimal","value":"3_u8"},{"id":"Quote","name":"Quote","value":"4_u8"},{"id":"QuotedWord","name":"QuotedWord","value":"5_u8"},{"id":"Boolean","name":"Boolean","value":"6_u8"},{"id":"Color","name":"Color","value":"7_u8"},{"id":"Builtin","name":"Builtin","value":"8_u8"},{"id":"Byteslice","name":"Byteslice","value":"9_u8"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Holds the type of a snapshot.\n\nMembers are sorted by their frequency in code (eyeballed),\nnot to say that it matters.","summary":"Holds the type of a snapshot.
","instance_methods":[{"html_id":"block_ref?-instance-method","name":"block_ref?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":13,"url":null},"def":{"name":"block_ref?","visibility":"Public","body":"self == BlockRef"}},{"html_id":"boolean?-instance-method","name":"boolean?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":18,"url":null},"def":{"name":"boolean?","visibility":"Public","body":"self == Boolean"}},{"html_id":"builtin?-instance-method","name":"builtin?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":20,"url":null},"def":{"name":"builtin?","visibility":"Public","body":"self == Builtin"}},{"html_id":"byteslice?-instance-method","name":"byteslice?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":21,"url":null},"def":{"name":"byteslice?","visibility":"Public","body":"self == Byteslice"}},{"html_id":"color?-instance-method","name":"color?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":19,"url":null},"def":{"name":"color?","visibility":"Public","body":"self == Color"}},{"html_id":"large_decimal?-instance-method","name":"large_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":15,"url":null},"def":{"name":"large_decimal?","visibility":"Public","body":"self == LargeDecimal"}},{"html_id":"quote?-instance-method","name":"quote?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":16,"url":null},"def":{"name":"quote?","visibility":"Public","body":"self == Quote"}},{"html_id":"quoted_word?-instance-method","name":"quoted_word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":17,"url":null},"def":{"name":"quoted_word?","visibility":"Public","body":"self == QuotedWord"}},{"html_id":"small_decimal?-instance-method","name":"small_decimal?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":14,"url":null},"def":{"name":"small_decimal?","visibility":"Public","body":"self == SmallDecimal"}},{"html_id":"word?-instance-method","name":"word?","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":12,"url":null},"def":{"name":"word?","visibility":"Public","body":"self == Word"}}]},{"html_id":"novika/Novika/StructLayoutForm","path":"Novika/StructLayoutForm.html","kind":"struct","full_name":"Novika::StructLayoutForm","name":"StructLayoutForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":235,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin form wrapper around `FFI::StructLayout`. Lazily parses\na struct layout definition and keeps the corresponding\n`FFI::StructLayout` in sync.","summary":"A thin form wrapper around FFI::StructLayout
.
Initializes a struct layout form.
","abstract":false,"args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","args_html":"(this : Block, names : Array(Word), types : Array(Word), comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":250,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":"Block"},{"name":"names","external_name":"names","restriction":"Array(Word)"},{"name":"types","external_name":"types","restriction":"Array(Word)"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, names, types, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(layout:Novika::FFI::StructLayout,comment:Nil|String)-class-method","name":"new","doc":"Initializes a struct layout form from the given *layout*.\nThe layout must contain at least one field.","summary":"Initializes a struct layout form from the given layout.
","abstract":false,"args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"args_string":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","args_html":"(layout : Novika::FFI::StructLayout, comment : Nil | String)","location":{"filename":"src/novika/forms/foreign.cr","line_number":256,"url":null},"def":{"name":"new","args":[{"name":"layout","external_name":"layout","restriction":"::Novika::FFI::StructLayout"},{"name":"comment","external_name":"comment","restriction":"::Nil | ::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(layout, comment)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":295,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if layout == other.layout\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":287,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"@comment ? io << @comment : to_s(io)"}},{"html_id":"layout(outerset=nil)-instance-method","name":"layout","doc":"Returns the underlying layout.","summary":"Returns the underlying layout.
","abstract":false,"args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"args_string":"(outerset = nil)","args_html":"(outerset = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":268,"url":null},"def":{"name":"layout","args":[{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":""}],"visibility":"Public","body":"if @layout.field_count > 0 || outerset.try(&.includes?(object_id))\n return @layout\nend\nif this = @this\nelse\n return @layout\nend\nif names = @names\nelse\n return @layout\nend\nif types = @types\nelse\n return @layout\nend\nnames.zip(types) do |name, typename|\n parser = StructLayoutParser.new(this, typename, name, self, outerset)\n @layout.add(name.id, parser.parse)\nend\n@layout\n"}},{"html_id":"object_id(*args,**options)-instance-method","name":"object_id","doc":"Since `StructLayoutForm` is a struct, it doesn't have its own\nobject id, and instead borrows it from the names array, which\nis assumed to be created personally for this struct layout form.","summary":"Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Since StructLayoutForm
is a struct, it doesn't have its own object id, and instead borrows it from the names array, which is assumed to be created personally for this struct layout form.
Parses types in struct layouts.
","constructors":[{"html_id":"new(this,typename,field:Word,current:StructLayoutForm,outerset:Set(UInt64)|Nil=nil)-class-method","name":"new","abstract":false,"args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"args_string":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","args_html":"(this, typename, field : Word, current : StructLayoutForm, outerset : Set(UInt64) | Nil = nil)","location":{"filename":"src/novika/forms/foreign.cr","line_number":171,"url":null},"def":{"name":"new","args":[{"name":"this","external_name":"this","restriction":""},{"name":"typename","external_name":"typename","restriction":""},{"name":"field","external_name":"field","restriction":"Word"},{"name":"current","external_name":"current","restriction":"StructLayoutForm"},{"name":"outerset","default_value":"nil","external_name":"outerset","restriction":"Set(UInt64) | ::Nil"}],"visibility":"Public","body":"_ = allocate\n_.initialize(this, typename, field, current, outerset)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"on_inline_struct(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_inline_struct","doc":"Inline struct-annotated struct layout middleware.","summary":"Inline struct-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":219,"url":null},"def":{"name":"on_inline_struct","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).inline\n"}},{"html_id":"on_struct_reference(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_struct_reference","doc":"Struct reference-annotated struct layout middleware.","summary":"Struct reference-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":225,"url":null},"def":{"name":"on_struct_reference","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"add_to_outerset\n(form.layout(@outerset)).reference\n"}},{"html_id":"on_union(form:StructLayoutForm):FFI::ForeignType-instance-method","name":"on_union","doc":"Union-annotated struct layout middleware.","summary":"Union-annotated struct layout middleware.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"args_string":"(form : StructLayoutForm) : FFI::ForeignType","args_html":"(form : StructLayoutForm) : FFI::ForeignType","location":{"filename":"src/novika/forms/foreign.cr","line_number":213,"url":null},"def":{"name":"on_union","args":[{"name":"form","external_name":"form","restriction":"StructLayoutForm"}],"return_type":"FFI::ForeignType","visibility":"Public","body":"check_cycles(form)\n(form.layout(@outerset)).union\n"}}]},{"html_id":"novika/Novika/StructViewForm","path":"Novika/StructViewForm.html","kind":"struct","full_name":"Novika::StructViewForm","name":"StructViewForm","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/foreign.cr","line_number":85,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/IReadableStore","kind":"module","full_name":"Novika::IReadableStore","name":"IReadableStore"},{"html_id":"novika/Novika/ISubmittableStore","kind":"module","full_name":"Novika::ISubmittableStore","name":"ISubmittableStore"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A thin wrapper around `FFI::StructView` and its descendants.\n\nThis form is a readable and submittable store, which means you\ncan read (e.g. `entry:fetch`) and submit (e.g. `entry:submit`)\nto exsisting entries.","summary":"A thin wrapper around FFI::StructView
and its descendants.
Returns whether this and other struct views are equal.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","location":{"filename":"src/novika/forms/foreign.cr","line_number":162,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if @view == (other.@view)\nelse\n return false\nend\ntrue\n"}},{"html_id":"address(*args,**options)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options)","args_html":"(*args, **options)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"visibility":"Public","body":"view.address(*args, **options)"}},{"html_id":"address(*args,**options,&)-instance-method","name":"address","doc":"Returns the address of the underlying struct in memory.","summary":"Returns the address of the underlying struct in memory.
","abstract":false,"args":[{"name":"args","external_name":"args","restriction":""}],"args_string":"(*args, **options, &)","args_html":"(*args, **options, &)","location":{"filename":"src/novika/forms/foreign.cr","line_number":97,"url":null},"def":{"name":"address","args":[{"name":"args","external_name":"args","restriction":""}],"double_splat":{"name":"options","external_name":"options","restriction":""},"splat_index":0,"yields":1,"block_arity":1,"visibility":"Public","body":"view.address(*args, **options) do |*yield_args|\n yield *yield_args\nend"}},{"html_id":"desc(io)-instance-method","name":"desc","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":151,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"to_s(io)"}},{"html_id":"form_for?(name:Form):Form|Nil-instance-method","name":"form_for?","doc":"Returns the value form for an entry with the given *name*, or\nnil if no such entry exists.","summary":"Returns the value form for an entry with the given name, or nil if no such entry exists.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Form | Nil","args_html":"(name : Form) : Form | Nil","location":{"filename":"src/novika/forms/foreign.cr","line_number":108,"url":null},"def":{"name":"form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Form | ::Nil","visibility":"Public","body":"if name.is_a?(Word)\n @view[name.id]?.try(&.to_form?)\nend"}},{"html_id":"has_form_for?(name:Form):Bool-instance-method","name":"has_form_for?","doc":"Returns whether this store has an entry with the given *name*.","summary":"Returns whether this store has an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":104,"url":null},"def":{"name":"has_form_for?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"name.is_a?(Word) ? @view.has_field?(name.id) : false"}},{"html_id":"inline?-instance-method","name":"inline?","doc":"Returns whether this view is an inline struct view.","summary":"Returns whether this view is an inline struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":138,"url":null},"def":{"name":"inline?","visibility":"Public","body":"view.is_a?(FFI::InlineStructView)"}},{"html_id":"layout:StructLayoutForm-instance-method","name":"layout","doc":"Returns the struct layout of the underlying struct view.","summary":"Returns the struct layout of the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":100,"url":null},"def":{"name":"layout","return_type":"StructLayoutForm","visibility":"Public","body":"StructLayoutForm.new(view.layout, comment: nil)"}},{"html_id":"opener?(name:Form):Bool-instance-method","name":"opener?","doc":"Returns whether *name* opens its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name opens its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":120,"url":null},"def":{"name":"opener?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\nfalse\n"}},{"html_id":"pusher?(name:Form):Bool-instance-method","name":"pusher?","doc":"Returns whether *name* pushes its value form, as defined in this\nstore. Dies if *name* is not defined in this store.","summary":"Returns whether name pushes its value form, as defined in this store.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"}],"args_string":"(name : Form) : Bool","args_html":"(name : Form) : Bool","location":{"filename":"src/novika/forms/foreign.cr","line_number":126,"url":null},"def":{"name":"pusher?","args":[{"name":"name","external_name":"name","restriction":"Form"}],"return_type":"Bool","visibility":"Public","body":"form_for(name)\ntrue\n"}},{"html_id":"reference?-instance-method","name":"reference?","doc":"Returns whether this view is a struct reference view.","summary":"Returns whether this view is a struct reference view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":133,"url":null},"def":{"name":"reference?","visibility":"Public","body":"view.is_a?(FFI::StructReferenceView)"}},{"html_id":"submit?(name:Form,form:Form)-instance-method","name":"submit?","doc":"Submits value *form* to an entry with the given *name*.\nReturns nil if no such entry exists.","summary":"Submits value form to an entry with the given name.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"args_string":"(name : Form, form : Form)","args_html":"(name : Form, form : Form)","location":{"filename":"src/novika/forms/foreign.cr","line_number":112,"url":null},"def":{"name":"submit?","args":[{"name":"name","external_name":"name","restriction":"Form"},{"name":"form","external_name":"form","restriction":"Form"}],"visibility":"Public","body":"if name.is_a?(Word)\nelse\n return\nend\n(@view.layout.desc?(name.id)).try do |desc|\n @view[name.id] = desc.type.from(form)\nend\n"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/foreign.cr","line_number":155,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"io << @view"}},{"html_id":"union?-instance-method","name":"union?","doc":"Returns whether this view is a union view.","summary":"Returns whether this view is a union view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":143,"url":null},"def":{"name":"union?","visibility":"Public","body":"view.is_a?(FFI::UnionView)"}},{"html_id":"view:FFI::StructView-instance-method","name":"view","doc":"Returns the underlying struct view.","summary":"Returns the underlying struct view.
","abstract":false,"location":{"filename":"src/novika/forms/foreign.cr","line_number":91,"url":null},"def":{"name":"view","return_type":"FFI::StructView","visibility":"Public","body":"@view"}}]},{"html_id":"novika/Novika/Substrate","path":"Novika/Substrate.html","kind":"module","full_name":"Novika::Substrate(T)","name":"Substrate","abstract":false,"locations":[{"filename":"src/novika/substrate.cr","line_number":17,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Substrate is a fast, low-level copy-on-write wrapper for\nan array.","summary":"Substrate is a fast, low-level copy-on-write wrapper for an array.
","class_methods":[{"html_id":"[]-class-method","name":"[]","doc":"Initializes an empty substrate.","summary":"Initializes an empty substrate.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":19,"url":null},"def":{"name":"[]","visibility":"Public","body":"RealSubstrate(T).new"}},{"html_id":"[](*elements)-class-method","name":"[]","doc":"Initializes a substrate with *elements*.","summary":"Initializes a substrate with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/substrate.cr","line_number":24,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"for(elements.to_a)"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Initializes a substrate with *elements* as the underlying array.","summary":"Initializes a substrate with elements as the underlying array.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"args_string":"(elements : Array(T))","args_html":"(elements : Array(T))","location":{"filename":"src/novika/substrate.cr","line_number":29,"url":null},"def":{"name":"for","args":[{"name":"elements","external_name":"elements","restriction":"Array(T)"}],"visibility":"Public","body":"RealSubstrate.new(elements)"}}],"instance_methods":[{"html_id":"==(other)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/substrate.cr","line_number":96,"url":null},"def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"other.is_a?(Substrate) && (array == other.array)"}},{"html_id":"at!(index)-instance-method","name":"at!","doc":"Unsafely fetches the element at *index*.","summary":"Unsafely fetches the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":37,"url":null},"def":{"name":"at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"array.unsafe_fetch(index)"}},{"html_id":"at?(index)-instance-method","name":"at?","doc":"Returns the element at *index*. Returns nil if *index* is\nout of bounds, i.e., *not* in `0 <= index < count`.","summary":"Returns the element at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":48,"url":null},"def":{"name":"at?","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"if index.in?(0...count)\n at!(index)\nend"}},{"html_id":"copy-instance-method","name":"copy","doc":"Returns a copy of this substrate.","summary":"Returns a copy of this substrate.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":79,"url":null},"def":{"name":"copy","visibility":"Public","body":""}},{"html_id":"count-instance-method","name":"count","doc":"Returns the amount of elements in the array.","summary":"Returns the amount of elements in the array.
","abstract":false,"location":{"filename":"src/novika/substrate.cr","line_number":42,"url":null},"def":{"name":"count","visibility":"Public","body":"array.size"}},{"html_id":"delete?(atindex)-instance-method","name":"delete?","doc":"Deletes the element at *index*. Returns nil if *index* is\nout of bounds (see `at?`).","summary":"Deletes the element at index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""}],"args_string":"(at index)","args_html":"(at index)","location":{"filename":"src/novika/substrate.cr","line_number":73,"url":null},"def":{"name":"delete?","args":[{"name":"index","external_name":"at","restriction":""}],"visibility":"Public","body":""}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"Same as `Array#each`.","summary":"Same as Array#each
.
Same as Array#each
.
Adds element before index.
","abstract":true,"args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"args_string":"(at index, element)","args_html":"(at index, element)","location":{"filename":"src/novika/substrate.cr","line_number":69,"url":null},"def":{"name":"insert?","args":[{"name":"index","external_name":"at","restriction":""},{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":""}},{"html_id":"map!(&:T->T|Nil)-instance-method","name":"map!","doc":"Replaces elements of this substrate with the result of the\nblock. If the result is nil, leaves the original element.","summary":"Replaces elements of this substrate with the result of the block.
","abstract":true,"location":{"filename":"src/novika/substrate.cr","line_number":90,"url":null},"def":{"name":"map!","yields":1,"block_arity":1,"block_arg":{"name":"","external_name":"","restriction":"(T -> T | ::Nil)"},"visibility":"Public","body":""}},{"html_id":"slice_at!(index)-instance-method","name":"slice_at!","doc":"Splits this substrate in two at *index*. Returns the two\nresulting substrates.\n\nThis method is unsafe: it does not check whether *index*\nis in bounds.","summary":"Splits this substrate in two at index.
","abstract":false,"args":[{"name":"index","external_name":"index","restriction":""}],"args_string":"(index)","args_html":"(index)","location":{"filename":"src/novika/substrate.cr","line_number":57,"url":null},"def":{"name":"slice_at!","args":[{"name":"index","external_name":"index","restriction":""}],"visibility":"Public","body":"lhs = Array(T).new(index) do |i|\n at!(i)\nend\nrhs = Array(T).new(count - index) do |j|\n at!(index + j)\nend\n{RealSubstrate.new(lhs), RealSubstrate.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"Sorts elements of this substrate inplace, using a *cmp*\ncomparator proc for comparing two elements.","summary":"Sorts elements of this substrate inplace, using a cmp comparator proc for comparing two elements.
","abstract":true,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/substrate.cr","line_number":94,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":""}},{"html_id":"unsafe_paste(other:Substrate(T),index,other_start,other_insert_count)-instance-method","name":"unsafe_paste","doc":"Pastes *count* elements of other starting at *b*egin, to\n*dest* index in self, without doing any checks whatsoever.\n\nA lot of undefined behavior unless you are sure all\nnumbers are good.","summary":"Pastes count elements of other starting at begin, to dest index in self, without doing any checks whatsoever.
","abstract":true,"args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"args_string":"(other : Substrate(T), index, other_start, other_insert_count)","args_html":"(other : Substrate(T), index, other_start, other_insert_count)","location":{"filename":"src/novika/substrate.cr","line_number":86,"url":null},"def":{"name":"unsafe_paste","args":[{"name":"other","external_name":"other","restriction":"Substrate(T)"},{"name":"index","external_name":"index","restriction":""},{"name":"other_start","external_name":"other_start","restriction":""},{"name":"other_insert_count","external_name":"other_insert_count","restriction":""}],"visibility":"Public","body":""}}]},{"html_id":"novika/Novika/Tape","path":"Novika/Tape.html","kind":"struct","full_name":"Novika::Tape(T)","name":"Tape","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/tape.cr","line_number":5,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A `Substrate` with an integer cursor.","summary":"A Substrate
with an integer cursor.
Initializes a tape with elements.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":""}],"args_string":"(*elements)","args_html":"(*elements)","location":{"filename":"src/novika/tape.cr","line_number":23,"url":null},"def":{"name":"[]","args":[{"name":"elements","external_name":"elements","restriction":""}],"splat_index":0,"visibility":"Public","body":"Tape.new(Substrate[*elements])"}},{"html_id":"for(elements:Array(T))-class-method","name":"for","doc":"Creates a tape from an existing array of *elements*, which\nwill be used as the underlying container for `Substrate`.\nThis means that all mutations of substrate will be performed\non the *elements* array, and vice versa.","summary":"Creates a tape from an existing array of elements, which will be used as the underlying container for Substrate
.
Adds element before the cursor, and advances the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":57,"url":null},"def":{"name":"add","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor + 1)"}},{"html_id":"at!(*args,**options)-instance-method","name":"at!","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
See the same method in Substrate
.
Returns a shallow copy of this tape.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":133,"url":null},"def":{"name":"copy","visibility":"Public","body":"Tape.new(substrate.copy, cursor)"}},{"html_id":"count(*args,**options)-instance-method","name":"count","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Returns the cursor position.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":9,"url":null},"def":{"name":"cursor","return_type":"Int32","visibility":"Public","body":"@cursor"}},{"html_id":"drop?-instance-method","name":"drop?","doc":"Removes the element before the cursor, and moves the cursor\nback once. Returns the resulting tape.","summary":"Removes the element before the cursor, and moves the cursor back once.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":82,"url":null},"def":{"name":"drop?","visibility":"Public","body":"Tape.new((substrate.delete?(cursor - 1)) || (return), cursor - 1)"}},{"html_id":"each(*args,**options)-instance-method","name":"each","doc":"See the same method in `Substrate`.","summary":"See the same method in Substrate
.
See the same method in Substrate
.
Drops and returns the element after cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":92,"url":null},"def":{"name":"eject?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new((substrate.delete?(cursor)).not_nil!, cursor), element}\n"}},{"html_id":"empty?-instance-method","name":"empty?","doc":"Returns whether this tape is empty (has no elements).","summary":"Returns whether this tape is empty (has no elements).
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":31,"url":null},"def":{"name":"empty?","visibility":"Public","body":"count.zero?"}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Adds element after cursor without moving the cursor.
","abstract":false,"args":[{"name":"element","external_name":"element","restriction":""}],"args_string":"(element)","args_html":"(element)","location":{"filename":"src/novika/tape.cr","line_number":87,"url":null},"def":{"name":"inject","args":[{"name":"element","external_name":"element","restriction":""}],"visibility":"Public","body":"Tape.new((substrate.insert?(cursor, element)).not_nil!, cursor)"}},{"html_id":"map!(&)-instance-method","name":"map!","doc":"See `Substrate#map!`.","summary":"See Substrate#map!
.
Fetches the top element, and advances the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":51,"url":null},"def":{"name":"next?","visibility":"Public","body":"if cursor < count\n {Tape.new(substrate, cursor + 1), substrate.at!(cursor)}\nend"}},{"html_id":"paste(elements:Tape(T))-instance-method","name":"paste","doc":"Adds elements before cursor in *elements* to this tape.\nAdvances the cursor.","summary":"Adds elements before cursor in elements to this tape.
","abstract":false,"args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"args_string":"(elements : Tape(T))","args_html":"(elements : Tape(T))","location":{"filename":"src/novika/tape.cr","line_number":63,"url":null},"def":{"name":"paste","args":[{"name":"elements","external_name":"elements","restriction":"Tape(T)"}],"visibility":"Public","body":"Tape.new(substrate.unsafe_paste(elements.substrate, index: cursor, other_start: 0, other_insert_count: elements.cursor), cursor + elements.cursor)"}},{"html_id":"resub(other)-instance-method","name":"resub","doc":"Replaces this tape's substrate with other. *cursor* is\nleft where it was in self if it fits, else is moved to\nthe end.","summary":"Replaces this tape's substrate with other.
","abstract":false,"args":[{"name":"other","external_name":"other","restriction":""}],"args_string":"(other)","args_html":"(other)","location":{"filename":"src/novika/tape.cr","line_number":108,"url":null},"def":{"name":"resub","args":[{"name":"other","external_name":"other","restriction":""}],"visibility":"Public","body":"substrate.deref\nTape.new(other.substrate.copy, Math.min(cursor, other.count))\n"}},{"html_id":"slice:Tuple(Tape(T),Tape(T))-instance-method","name":"slice","doc":"Slices this tape's substrate at cursor, returns the\ntwo resulting tape halves.","summary":"Slices this tape's substrate at cursor, returns the two resulting tape halves.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":126,"url":null},"def":{"name":"slice","return_type":"::Tuple(Tape(T), Tape(T))","visibility":"Public","body":"lhs, rhs = substrate.slice_at!(cursor)\n{Tape.new(lhs), Tape.new(rhs)}\n"}},{"html_id":"sort_using!(cmp:T,T->Int32)-instance-method","name":"sort_using!","doc":"See `Substrate#sort_using!`","summary":"","abstract":false,"args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"args_string":"(cmp : T, T -> Int32)","args_html":"(cmp : T, T -> Int32)","location":{"filename":"src/novika/tape.cr","line_number":120,"url":null},"def":{"name":"sort_using!","args":[{"name":"cmp","external_name":"cmp","restriction":"(T, T -> Int32)"}],"visibility":"Public","body":"Tape.new(substrate.sort_using!(cmp), cursor)"}},{"html_id":"swap?-instance-method","name":"swap?","doc":"Swaps two elements before the cursor.","summary":"Swaps two elements before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":74,"url":null},"def":{"name":"swap?","visibility":"Public","body":"if cursor < 2\n return\nend\nTape.new(substrate.unsafe_swap(cursor - 2, cursor - 1), cursor)\n"}},{"html_id":"thru?-instance-method","name":"thru?","doc":"Returns the element after cursor and moves the cursor forward.","summary":"Returns the element after cursor and moves the cursor forward.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":99,"url":null},"def":{"name":"thru?","visibility":"Public","body":"element = (substrate.at?(cursor)) || (return)\n{Tape.new(substrate, cursor + 1), element}\n"}},{"html_id":"to?(cursorposition)-instance-method","name":"to?","doc":"Moves the cursor to *position*. Returns the resulting tape\non success, nil if position is out of bounds (see `Substrate#at?`).","summary":"Moves the cursor to position.
","abstract":false,"args":[{"name":"position","external_name":"cursor","restriction":""}],"args_string":"(cursor position)","args_html":"(cursor position)","location":{"filename":"src/novika/tape.cr","line_number":44,"url":null},"def":{"name":"to?","args":[{"name":"position","external_name":"cursor","restriction":""}],"visibility":"Public","body":"if position.in?(0..count)\n Tape.new(substrate, position)\nend"}},{"html_id":"top?-instance-method","name":"top?","doc":"Returns the element before the cursor.","summary":"Returns the element before the cursor.
","abstract":false,"location":{"filename":"src/novika/tape.cr","line_number":36,"url":null},"def":{"name":"top?","visibility":"Public","body":"if cursor.zero?\n return\nend\nsubstrate.at!(cursor - 1)\n"}}]},{"html_id":"novika/Novika/True","path":"Novika/True.html","kind":"struct","full_name":"Novika::True","name":"True","abstract":false,"superclass":{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},"ancestors":[{"html_id":"novika/Novika/Boolean","kind":"struct","full_name":"Novika::Boolean","name":"Boolean"},{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/boolean.cr","line_number":45,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Represents a truthy `Boolean`.","summary":"Represents a truthy Boolean
.
Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/boolean.cr","line_number":46,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"io << \"boolean true\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::TypedSnapshot]","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"enum\", name: type, cls: UInt8, onlyif: nil, verify: nil, value: nil, encoding: SnapshotType}, {type: \"basic\", name: snapshot, cls: Snapshot, onlyif: nil, verify: nil, value: nil}] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"BinData.bit_fields.merge(@@bit_fields)"}},{"html_id":"from_io(io:IO,format:IO::ByteFormat=IO::ByteFormat::BigEndian)-class-method","name":"from_io","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"args_string":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","args_html":"(io : IO, format : IO::ByteFormat = IO::ByteFormat::BigEndian)","location":{"filename":"src/novika/image.cr","line_number":304,"url":null},"def":{"name":"from_io","args":[{"name":"io","external_name":"io","restriction":"IO"},{"name":"format","default_value":"IO::ByteFormat::BigEndian","external_name":"format","restriction":"IO::ByteFormat"}],"visibility":"Public","body":"type = SnapshotType.new(io.read_bytes(UInt8, format))\nsnapshot = case type\nin .block_ref?\n io.read_bytes(BlockRefSnapshot, format)\nin .boolean?\n io.read_bytes(BooleanSnapshot, format)\nin .color?\n io.read_bytes(ColorSnapshot, format)\nin .small_decimal?\n io.read_bytes(SmallDecimalSnapshot, format)\nin .large_decimal?\n io.read_bytes(LargeDecimalSnapshot, format)\nin .quote?\n io.read_bytes(QuoteSnapshot, format)\nin .word?\n io.read_bytes(WordSnapshot, format)\nin .quoted_word?\n io.read_bytes(QuotedWordSnapshot, format)\nin .builtin?\n io.read_bytes(BuiltinSnapshot, format)\nin .byteslice?\n io.read_bytes(BytesliceSnapshot, format)\nend\nnew(type, snapshot)\n"}}],"constructors":[{"html_id":"new(type:Novika::SnapshotType,snapshot:Novika::Snapshot)-class-method","name":"new","abstract":false,"args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"args_string":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","args_html":"(type : Novika::SnapshotType, snapshot : Novika::Snapshot)","location":{"filename":"src/novika/image.cr","line_number":296,"url":null},"def":{"name":"new","args":[{"name":"type","external_name":"type","restriction":"::Novika::SnapshotType"},{"name":"snapshot","external_name":"snapshot","restriction":"::Novika::Snapshot"}],"visibility":"Public","body":"_ = allocate\n_.initialize(type, snapshot)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}},{"html_id":"new(form:Block)-class-method","name":"new","doc":"Creates the corresponding `TypedSnapshot` for *form*.","summary":"Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Creates the corresponding TypedSnapshot
for form.
Raises: no overload for form.
","abstract":false,"args":[{"name":"form","external_name":"form","restriction":""}],"args_string":"(form)","args_html":"(form)","location":{"filename":"src/novika/image.cr","line_number":382,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":""}],"visibility":"Public","body":"raise(\"no overload for #{form.class}\")"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":288,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"snapshot:Snapshot-instance-method","name":"snapshot","doc":"Holds the `Snapshot` object.","summary":"Holds the Snapshot
object.
Holds the Snapshot
object.
See Snapshot#to_form
.
Holds the type of the #snapshot
.
Holds the type of the #snapshot
.
A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_builtin_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_builtin_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_builtin_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BuiltinSnapshot = Novika::BuiltinSnapshot.new\n \n"}},{"html_id":"novika_byteslice_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_byteslice_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_byteslice_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BytesliceSnapshot = Novika::BytesliceSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_quoted_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quoted_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_quoted_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuotedWordSnapshot = Novika::QuotedWordSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_typed_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_typed_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_typed_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::TypedSnapshot = Novika::TypedSnapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"A snapshot with a type, basis for (de)serializing value\nforms to/from binary data.","summary":"A snapshot with a type, basis for (de)serializing value forms to/from binary data.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":287,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]},{"html_id":"novika/Novika/ValueForm","path":"Novika/ValueForm.html","kind":"module","full_name":"Novika::ValueForm","name":"ValueForm","abstract":false,"locations":[{"filename":"src/novika/forms/form.cr","line_number":88,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"including_types":[{"html_id":"novika/Novika/Decimal","kind":"class","full_name":"Novika::Decimal","name":"Decimal"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Includers are classes (that is, reference types) that want\nto pretend they're value forms, i.e., value types.","summary":"Includers are classes (that is, reference types) that want to pretend they're value forms, i.e., value types.
"},{"html_id":"novika/Novika/Word","path":"Novika/Word.html","kind":"struct","full_name":"Novika::Word","name":"Word","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"},{"html_id":"novika/Novika/Schedulable","kind":"module","full_name":"Novika::Schedulable","name":"Schedulable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/words.cr","line_number":4,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Novika/Form","kind":"module","full_name":"Novika::Form","name":"Form"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Words open entries they're assigned to in the dictionary\nof their enclosing block.","summary":"Words open entries they're assigned to in the dictionary of their enclosing block.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":17,"url":null},"def":{"name":"typedesc","visibility":"Public","body":"\"word\""}}],"constructors":[{"html_id":"new(id:String)-class-method","name":"new","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"::String"}],"args_string":"(id : String)","args_html":"(id : String)","location":{"filename":"src/novika/forms/words.cr","line_number":10,"url":null},"def":{"name":"new","args":[{"name":"id","external_name":"id","restriction":"::String"}],"visibility":"Public","body":"_ = allocate\n_.initialize(id)\nif _.responds_to?(:finalize)\n ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"html_id":"==(other:self)-instance-method","name":"==","abstract":false,"args":[{"name":"other","external_name":"other","restriction":"self"}],"args_string":"(other : self)","args_html":"(other : self)","def":{"name":"==","args":[{"name":"other","external_name":"other","restriction":"self"}],"visibility":"Public","body":"if id == other.id\nelse\n return false\nend\ntrue\n"}},{"html_id":"desc(io:IO)-instance-method","name":"desc","doc":"Appends a string description of this form to *io*.","summary":"Appends a string description of this form to io.
","abstract":false,"args":[{"name":"io","external_name":"io","restriction":"IO"}],"args_string":"(io : IO)","args_html":"(io : IO)","location":{"filename":"src/novika/forms/words.cr","line_number":13,"url":null},"def":{"name":"desc","args":[{"name":"io","external_name":"io","restriction":"IO"}],"visibility":"Public","body":"((io << \"word named '\") << id) << \"'\""}},{"html_id":"hash(hasher)-instance-method","name":"hash","doc":"See `Object#hash(hasher)`","summary":"See Object#hash(hasher)
Returns the underlying string id.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":8,"url":null},"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"on_parent_open(engine:Engine):self-instance-method","name":"on_parent_open","doc":"Reacts to this form's enclosing block being opened with *engine*.","summary":"Reacts to this form's enclosing block being opened with engine.
","abstract":false,"args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"args_string":"(engine : Engine) : self","args_html":"(engine : Engine) : self","location":{"filename":"src/novika/forms/words.cr","line_number":31,"url":null},"def":{"name":"on_parent_open","args":[{"name":"engine","external_name":"engine","restriction":"Engine"}],"return_type":"self","visibility":"Public","body":"if entry = engine.block.entry_for?(self)\n entry.on_open(engine)\n return self\nend\nblock = current = engine.block\nwhile block && (trap = block.entry_for?(Hook.trap))\n form = trap.form\n if form.is_a?(Block) && (form.prototype.same?(current.prototype))\n block = block.parent?\n next\n end\n engine.stack.add(Word.new(id))\n trap.on_open(engine)\n return self\nend\ndie(\"definition for #{self} not found in the enclosing block(s)\")\nself\n"}},{"html_id":"private?-instance-method","name":"private?","doc":"Returns whether this word is private (by convention).","summary":"Returns whether this word is private (by convention).
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":22,"url":null},"def":{"name":"private?","visibility":"Public","body":"(id.prefixed_by?('_')) && (!(id.ends_with?('_')))"}},{"html_id":"to_quoted_word-instance-method","name":"to_quoted_word","doc":"Adds a level of quoting so this word becomes a quoted word.","summary":"Adds a level of quoting so this word becomes a quoted word.
","abstract":false,"location":{"filename":"src/novika/forms/words.cr","line_number":27,"url":null},"def":{"name":"to_quoted_word","visibility":"Public","body":"QuotedWord.new(@id)"}},{"html_id":"to_s(io)-instance-method","name":"to_s","abstract":false,"args":[{"name":"io","external_name":"io","restriction":""}],"args_string":"(io)","args_html":"(io)","location":{"filename":"src/novika/forms/words.cr","line_number":67,"url":null},"def":{"name":"to_s","args":[{"name":"io","external_name":"io","restriction":""}],"visibility":"Public","body":"if id.in?(\"true\", \"false\")\n io << \"#\"\nend\nio << id\n"}}]},{"html_id":"novika/Novika/WordSnapshot","path":"Novika/WordSnapshot.html","kind":"class","full_name":"Novika::WordSnapshot","name":"WordSnapshot","abstract":false,"superclass":{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},"ancestors":[{"html_id":"novika/Novika/Snapshot","kind":"class","full_name":"Novika::Snapshot","name":"Snapshot"},{"html_id":"novika/BinData","kind":"class","full_name":"BinData","name":"BinData"},{"html_id":"novika/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/image.cr","line_number":196,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"constants":[{"id":"ENDIAN","name":"ENDIAN","value":"[\"big\"]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"KLASS_NAME","name":"KLASS_NAME","value":"[Novika::WordSnapshot]","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"PARTS","name":"PARTS","value":"[{type: \"string\", name: id, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"},{"id":"REMAINING","name":"REMAINING","value":"[] of Nil","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
"}],"namespace":{"html_id":"novika/Novika","kind":"module","full_name":"Novika","name":"Novika"},"doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","class_methods":[{"html_id":"bit_fields-class-method","name":"bit_fields","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"bit_fields","visibility":"Public","body":"Novika::Snapshot.bit_fields.merge(@@bit_fields)"}}],"constructors":[{"html_id":"new(form:Word)-class-method","name":"new","abstract":false,"args":[{"name":"form","external_name":"form","restriction":"Word"}],"args_string":"(form : Word)","args_html":"(form : Word)","location":{"filename":"src/novika/image.cr","line_number":206,"url":null},"def":{"name":"new","args":[{"name":"form","external_name":"form","restriction":"Word"}],"visibility":"Public","body":"word = new\nword.id = form.id\nword\n"}}],"instance_methods":[{"html_id":"__format__:IO::ByteFormat-instance-method","name":"__format__","abstract":false,"location":{"filename":"src/novika/image.cr","line_number":197,"url":null},"def":{"name":"__format__","return_type":"IO::ByteFormat","visibility":"Public","body":"IO::ByteFormat::BigEndian"}},{"html_id":"id:String-instance-method","name":"id","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"def":{"name":"id","return_type":"String","visibility":"Public","body":"@id"}},{"html_id":"id=(id:String)-instance-method","name":"id=","doc":"Holds the 0-terminated id (name) of the word.","summary":"Holds the 0-terminated id (name) of the word.
","abstract":false,"args":[{"name":"id","external_name":"id","restriction":"String"}],"args_string":"(id : String)","args_html":"(id : String)","def":{"name":"id=","args":[{"name":"id","external_name":"id","restriction":"String"}],"visibility":"Public","body":"@id = id"}},{"html_id":"to_form(assembler)-instance-method","name":"to_form","abstract":false,"args":[{"name":"assembler","external_name":"assembler","restriction":""}],"args_string":"(assembler)","args_html":"(assembler)","location":{"filename":"src/novika/image.cr","line_number":202,"url":null},"def":{"name":"to_form","args":[{"name":"assembler","external_name":"assembler","restriction":""}],"visibility":"Public","body":"Word.new(id)"}}],"macros":[{"html_id":"novika_block_ref_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_block_ref_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_block_ref_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BlockRefSnapshot = Novika::BlockRefSnapshot.new\n \n"}},{"html_id":"novika_boolean_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_boolean_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_boolean_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::BooleanSnapshot = Novika::BooleanSnapshot.new\n \n"}},{"html_id":"novika_color_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_color_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_color_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::ColorSnapshot = Novika::ColorSnapshot.new\n \n"}},{"html_id":"novika_large_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_large_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_large_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::LargeDecimalSnapshot = Novika::LargeDecimalSnapshot.new\n \n"}},{"html_id":"novika_quote_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_quote_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_quote_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::QuoteSnapshot = Novika::QuoteSnapshot.new\n \n"}},{"html_id":"novika_small_decimal_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_small_decimal_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_small_decimal_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::SmallDecimalSnapshot = Novika::SmallDecimalSnapshot.new\n \n"}},{"html_id":"novika_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::Snapshot = Novika::Snapshot.new\n \n"}},{"html_id":"novika_word_snapshot(name,onlyif=nil,verify=nil,value=nil)-macro","name":"novika_word_snapshot","doc":"Snapshot of a word form.\n\nIts type is `SnapshotType::Word`.","summary":"Snapshot of a word form.
","abstract":false,"args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"args_string":"(name, onlyif = nil, verify = nil, value = nil)","args_html":"(name, onlyif = nil, verify = nil, value = nil)","location":{"filename":"src/novika/image.cr","line_number":196,"url":null},"def":{"name":"novika_word_snapshot","args":[{"name":"name","external_name":"name","restriction":""},{"name":"onlyif","default_value":"nil","external_name":"onlyif","restriction":""},{"name":"verify","default_value":"nil","external_name":"verify","restriction":""},{"name":"value","default_value":"nil","external_name":"value","restriction":""}],"visibility":"Public","body":" custom \n{{ name.id }}\n : Novika::WordSnapshot = Novika::WordSnapshot.new\n \n"}}]}]},{"html_id":"novika/Set","path":"Set.html","kind":"struct","full_name":"Set(T)","name":"Set","abstract":false,"superclass":{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},"ancestors":[{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"},{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Struct","kind":"struct","full_name":"Struct","name":"Struct"},{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika.cr","line_number":19,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"included_modules":[{"html_id":"novika/Enumerable","kind":"module","full_name":"Enumerable","name":"Enumerable"},{"html_id":"novika/Iterable","kind":"module","full_name":"Iterable","name":"Iterable"}],"doc":"`Set` implements a collection of unordered values with no duplicates.\n\nAn `Enumerable` object can be converted to `Set` using the `#to_set` method.\n\n`Set` uses `Hash` as storage, so you must note the following points:\n\n* Equality of elements is determined according to `Object#==` and `Object#hash`.\n* `Set` assumes that the identity of each element does not change while it is stored. Modifying an element of a set will render the set to an unreliable state.\n\n### Example\n\n```\ns1 = Set{1, 2}\ns2 = [1, 2].to_set\ns3 = Set.new [1, 2]\ns1 == s2 # => true\ns1 == s3 # => true\ns1.add(2)\ns1.concat([6, 8])\ns1.subset_of? s2 # => false\ns2.subset_of? s1 # => true\n```","summary":"Set
implements a collection of unordered values with no duplicates.
A String
represents an immutable sequence of UTF-8 characters.
Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"args_string":"(prefix : String) : Bool","args_html":"(prefix : String) : Bool","location":{"filename":"src/novika.cr","line_number":9,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"String"}],"return_type":"Bool","visibility":"Public","body":"bytesize > prefix.bytesize && (starts_with?(prefix))"}},{"html_id":"prefixed_by?(prefix:Char):Bool-instance-method","name":"prefixed_by?","doc":"Returns whether this string starts with *prefix* but also\nhas other characters after it.","summary":"Returns whether this string starts with prefix but also has other characters after it.
","abstract":false,"args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"args_string":"(prefix : Char) : Bool","args_html":"(prefix : Char) : Bool","location":{"filename":"src/novika.cr","line_number":14,"url":null},"def":{"name":"prefixed_by?","args":[{"name":"prefix","external_name":"prefix","restriction":"Char"}],"return_type":"Bool","visibility":"Public","body":"bytesize > 1 && (starts_with?(prefix))"}}]},{"html_id":"novika/Union","path":"Union.html","kind":"struct","full_name":"Union(*T)","name":"Union","abstract":false,"superclass":{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},"ancestors":[{"html_id":"novika/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"novika/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"src/novika/forms/form.cr","line_number":1,"url":null}],"repository_name":"novika","program":false,"enum":false,"alias":false,"const":false,"doc":"A union type represents the possibility of a variable or an expression\nhaving more than one possible type at compile time.\n\nWhen invoking a method on a union type, the language checks that the\nmethod exists and can be resolved (typed) for each type in the union.\nFor this reason, adding instance methods to `Union` makes no sense and\nhas no effect. However, adding class method to `Union` is possible\nand can be useful. One example is parsing `JSON` into one of many\npossible types.\n\nUnion is special in that it is a generic type but instantiating it\nmight not return a union type:\n\n```\nUnion(Int32 | String) # => (Int32 | String)\nUnion(Int32) # => Int32\nUnion(Int32, Int32, Int32) # => Int32\n```","summary":"A union type represents the possibility of a variable or an expression having more than one possible type at compile time.
","class_methods":[{"html_id":"typedesc-class-method","name":"typedesc","doc":"Joins union members' `Form#typedesc`.","summary":"Joins union members' Form#typedesc
.