text: crystal_doc_search_index_callback({"repository_name":"github.com/krthr/haye.cr","body":"# Haye.cr\n\n> Based on the [javascript version](https://github.com/poppinss/haye).\n\nHaye is a simple super fast string expression parser. In support `pipe` and `qs` string expressions ( explained below ).\n\n### Pipe expression\nThe pipe based expression is very popular in Laravel community, due to their [Validation engine](https://laravel.com/docs/validation), and same is adopted by [Indicative](http://indicative.adonisjs.com).\n\n\n#### Syntax example:\n\n```cr\nrequired|email|max:4|range:10,30\n```\n\n1. Each item is separated by `|`\n2. The values are defined after `:`\n3. Multiple values are separated by `,`.\n4. White spaces in keys are trimmed.\n\n---\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n  haye.cr:\n    github: krthr/haye.cr\n```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"haye.cr\"\n```\n\n#### Pipe -> Array\n\n```cr\nexpression = 'required|email:unique,users'\nparsed = Haye.fromPipe(expression) # Haye.fromPipe(expression, Haye::PresenterTypes::Array)\n```\n\nOutput (`Haye::Presenters::Node[]`)\n```\n[\n  #<Haye::Presenters::Node:0x7f11fd891e40 \n    @name=\"required\", \n    @args=[]\n  >, \n  #<Haye::Presenters::Node:0x7f11fd891de0 \n    @name=\"email\", \n    @args=[\"unique\", \"users\"]\n  >\n]\n```\n\n#### Pipe -> Hash\n\n```cr\nexpression = 'required|email:unique,users'\nparsed = Haye.fromPipe(expression, Haye::PresenterTypes::Hash)\n```\n\nOutput (`Hash`)\n```cr\n{\n  \"required\" => [], \n  \"email\" => [\"unique\", \"users\"]\n}\n```\n\n## Contributing\n\n1. Fork it (<https://github.com/krthr/haye.cr/fork>)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [krthr](https://github.com/krthr) - creator and maintainer\n","program":{"html_id":"github.com/krthr/haye.cr/toplevel","path":"toplevel.html","kind":"module","full_name":"Top Level Namespace","name":"Top Level Namespace","abstract":false,"superclass":null,"ancestors":[],"locations":[],"repository_name":"github.com/krthr/haye.cr","program":true,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":null,"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[{"html_id":"github.com/krthr/haye.cr/Haye","path":"Haye.html","kind":"module","full_name":"Haye","name":"Haye","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"parsers/pipe.cr","line_number":1,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/parsers/pipe.cr"},{"filename":"presenters/node.cr","line_number":3,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/node.cr"},{"filename":"presenters/array.cr","line_number":4,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr"},{"filename":"presenters/hash.cr","line_number":4,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr"},{"filename":"haye.cr","line_number":5,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/haye.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[{"id":"VERSION","name":"VERSION","value":"\"0.1.0\"","doc":null,"summary":null}],"included_modules":[],"extended_modules":[{"html_id":"github.com/krthr/haye.cr/Haye","kind":"module","full_name":"Haye","name":"Haye"}],"subclasses":[],"including_types":[],"namespace":null,"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[{"id":"fromPipe(expression:String,type:PresenterTypes=PresenterTypes::Array)-instance-method","html_id":"fromPipe(expression:String,type:PresenterTypes=PresenterTypes::Array)-instance-method","name":"fromPipe","doc":null,"summary":null,"abstract":false,"args":[{"name":"expression","doc":null,"default_value":"","external_name":"expression","restriction":"String"},{"name":"type","doc":null,"default_value":"PresenterTypes::Array","external_name":"type","restriction":"PresenterTypes"}],"args_string":"(expression : String, type : PresenterTypes = <span class=\"t\">PresenterTypes</span><span class=\"t\">::</span><span class=\"t\">Array</span>)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/haye.cr#L15","def":{"name":"fromPipe","args":[{"name":"expression","doc":null,"default_value":"","external_name":"expression","restriction":"String"},{"name":"type","doc":null,"default_value":"PresenterTypes::Array","external_name":"type","restriction":"PresenterTypes"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"type.array? ? (Parsers.pipe(expression, Presenters::ArrayPresenter.new)).to_array : (Parsers.pipe(expression, Presenters::HashPresenter.new)).to_hash"}}],"macros":[],"types":[{"html_id":"github.com/krthr/haye.cr/Haye/Parsers","path":"Haye/Parsers.html","kind":"module","full_name":"Haye::Parsers","name":"Parsers","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"parsers/pipe.cr","line_number":2,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/parsers/pipe.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/krthr/haye.cr/Haye","kind":"module","full_name":"Haye","name":"Haye"},"doc":null,"summary":null,"class_methods":[{"id":"pipe(chars:String,presenter:Presenters::ArrayPresenter|Presenters::HashPresenter)-class-method","html_id":"pipe(chars:String,presenter:Presenters::ArrayPresenter|Presenters::HashPresenter)-class-method","name":"pipe","doc":null,"summary":null,"abstract":false,"args":[{"name":"chars","doc":null,"default_value":"","external_name":"chars","restriction":"String"},{"name":"presenter","doc":null,"default_value":"","external_name":"presenter","restriction":"Presenters::ArrayPresenter | Presenters::HashPresenter"}],"args_string":"(chars : String, presenter : Presenters::ArrayPresenter | Presenters::HashPresenter)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/parsers/pipe.cr#L3","def":{"name":"pipe","args":[{"name":"chars","doc":null,"default_value":"","external_name":"chars","restriction":"String"},{"name":"presenter","doc":null,"default_value":"","external_name":"presenter","restriction":"Presenters::ArrayPresenter | Presenters::HashPresenter"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"presenter.add\ni = 0\ntarget_prop = \"name\"\nwhile i < chars.size\n  char = chars.char_at(i)\n  if (char == ':') || (char == ',')\n    target_prop = \"arg\"\n    presenter.shift_value\n  else\n    if char == '|'\n      target_prop = \"name\"\n      presenter.add\n    else\n      if target_prop == \"arg\"\n        presenter.append_value(char)\n      else\n        presenter.append_key(char)\n      end\n    end\n  end\n  i = i + 1\nend\npresenter\n"}}],"constructors":[],"instance_methods":[],"macros":[],"types":[]},{"html_id":"github.com/krthr/haye.cr/Haye/Presenters","path":"Haye/Presenters.html","kind":"module","full_name":"Haye::Presenters","name":"Presenters","abstract":false,"superclass":null,"ancestors":[],"locations":[{"filename":"presenters/node.cr","line_number":4,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/node.cr"},{"filename":"presenters/array.cr","line_number":5,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr"},{"filename":"presenters/hash.cr","line_number":5,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/krthr/haye.cr/Haye","kind":"module","full_name":"Haye","name":"Haye"},"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[],"macros":[],"types":[{"html_id":"github.com/krthr/haye.cr/Haye/Presenters/ArrayPresenter","path":"Haye/Presenters/ArrayPresenter.html","kind":"class","full_name":"Haye::Presenters::ArrayPresenter","name":"ArrayPresenter","abstract":false,"superclass":{"html_id":"github.com/krthr/haye.cr/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/krthr/haye.cr/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/krthr/haye.cr/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"presenters/array.cr","line_number":6,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/krthr/haye.cr/Haye/Presenters","kind":"module","full_name":"Haye::Presenters","name":"Presenters"},"doc":null,"summary":null,"class_methods":[],"constructors":[{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n  ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"add-instance-method","html_id":"add-instance-method","name":"add","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L14","def":{"name":"add","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@current_node = Node.new\n@nodes << (@current_node.as(Node))\n"}},{"id":"append_key(char:Char)-instance-method","html_id":"append_key(char:Char)-instance-method","name":"append_key","doc":null,"summary":null,"abstract":false,"args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L19","def":{"name":"append_key","args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if char != ' '\n  __temp_24 = @current_node.as(Node)\n  __temp_24.name = __temp_24.name + char\nend"}},{"id":"append_value(char:Char)-instance-method","html_id":"append_value(char:Char)-instance-method","name":"append_value","doc":null,"summary":null,"abstract":false,"args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L25","def":{"name":"append_value","args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"__temp_25 = (@current_node.as(Node)).args.size - 1\n__temp_26 = (@current_node.as(Node)).args\n__temp_26[__temp_25] = __temp_26[__temp_25] + char\n"}},{"id":"current_node:Node?-instance-method","html_id":"current_node:Node?-instance-method","name":"current_node","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : Node?","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L7","def":{"name":"current_node","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Node | ::Nil","visibility":"Public","body":"@current_node"}},{"id":"current_node=(current_node:Node?)-instance-method","html_id":"current_node=(current_node:Node?)-instance-method","name":"current_node=","doc":null,"summary":null,"abstract":false,"args":[{"name":"current_node","doc":null,"default_value":"","external_name":"current_node","restriction":"Node | ::Nil"}],"args_string":"(current_node : Node?)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L7","def":{"name":"current_node=","args":[{"name":"current_node","doc":null,"default_value":"","external_name":"current_node","restriction":"Node | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@current_node = current_node"}},{"id":"nodes:Array(Node)-instance-method","html_id":"nodes:Array(Node)-instance-method","name":"nodes","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : Array(Node)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L7","def":{"name":"nodes","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(Node)","visibility":"Public","body":"@nodes"}},{"id":"nodes=(nodes:Array(Node))-instance-method","html_id":"nodes=(nodes:Array(Node))-instance-method","name":"nodes=","doc":null,"summary":null,"abstract":false,"args":[{"name":"nodes","doc":null,"default_value":"","external_name":"nodes","restriction":"Array(Node)"}],"args_string":"(nodes : Array(Node))","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L7","def":{"name":"nodes=","args":[{"name":"nodes","doc":null,"default_value":"","external_name":"nodes","restriction":"Array(Node)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@nodes = nodes"}},{"id":"shift_value-instance-method","html_id":"shift_value-instance-method","name":"shift_value","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L31","def":{"name":"shift_value","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"(@current_node.as(Node)).args << \"\""}},{"id":"to_array:Array(Haye::Presenters::Node)-instance-method","html_id":"to_array:Array(Haye::Presenters::Node)-instance-method","name":"to_array","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : Array(Haye::Presenters::Node)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/array.cr#L35","def":{"name":"to_array","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@nodes"}}],"macros":[],"types":[]},{"html_id":"github.com/krthr/haye.cr/Haye/Presenters/HashPresenter","path":"Haye/Presenters/HashPresenter.html","kind":"class","full_name":"Haye::Presenters::HashPresenter","name":"HashPresenter","abstract":false,"superclass":{"html_id":"github.com/krthr/haye.cr/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/krthr/haye.cr/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/krthr/haye.cr/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"presenters/hash.cr","line_number":6,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/krthr/haye.cr/Haye/Presenters","kind":"module","full_name":"Haye::Presenters","name":"Presenters"},"doc":null,"summary":null,"class_methods":[],"constructors":[{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L9","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n  ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"add-instance-method","html_id":"add-instance-method","name":"add","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L14","def":{"name":"add","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@current_node = Node.new\n@nodes << (@current_node.as(Node))\n"}},{"id":"append_key(char:Char)-instance-method","html_id":"append_key(char:Char)-instance-method","name":"append_key","doc":null,"summary":null,"abstract":false,"args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L19","def":{"name":"append_key","args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"if char != ' '\n  __temp_37 = @current_node.as(Node)\n  __temp_37.name = __temp_37.name + char\nend"}},{"id":"append_value(char:Char)-instance-method","html_id":"append_value(char:Char)-instance-method","name":"append_value","doc":null,"summary":null,"abstract":false,"args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"args_string":"(char : Char)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L25","def":{"name":"append_value","args":[{"name":"char","doc":null,"default_value":"","external_name":"char","restriction":"Char"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"__temp_38 = (@current_node.as(Node)).args.size - 1\n__temp_39 = (@current_node.as(Node)).args\n__temp_39[__temp_38] = __temp_39[__temp_38] + char\n"}},{"id":"current_node:Node?-instance-method","html_id":"current_node:Node?-instance-method","name":"current_node","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : Node?","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L7","def":{"name":"current_node","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Node | ::Nil","visibility":"Public","body":"@current_node"}},{"id":"current_node=(current_node:Node?)-instance-method","html_id":"current_node=(current_node:Node?)-instance-method","name":"current_node=","doc":null,"summary":null,"abstract":false,"args":[{"name":"current_node","doc":null,"default_value":"","external_name":"current_node","restriction":"Node | ::Nil"}],"args_string":"(current_node : Node?)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L7","def":{"name":"current_node=","args":[{"name":"current_node","doc":null,"default_value":"","external_name":"current_node","restriction":"Node | ::Nil"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@current_node = current_node"}},{"id":"nodes:Array(Node)-instance-method","html_id":"nodes:Array(Node)-instance-method","name":"nodes","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : Array(Node)","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L7","def":{"name":"nodes","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(Node)","visibility":"Public","body":"@nodes"}},{"id":"nodes=(nodes:Array(Node))-instance-method","html_id":"nodes=(nodes:Array(Node))-instance-method","name":"nodes=","doc":null,"summary":null,"abstract":false,"args":[{"name":"nodes","doc":null,"default_value":"","external_name":"nodes","restriction":"Array(Node)"}],"args_string":"(nodes : Array(Node))","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L7","def":{"name":"nodes=","args":[{"name":"nodes","doc":null,"default_value":"","external_name":"nodes","restriction":"Array(Node)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@nodes = nodes"}},{"id":"shift_value-instance-method","html_id":"shift_value-instance-method","name":"shift_value","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L31","def":{"name":"shift_value","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"(@current_node.as(Node)).args << \"\""}},{"id":"to_hash-instance-method","html_id":"to_hash-instance-method","name":"to_hash","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/hash.cr#L35","def":{"name":"to_hash","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"hash = {} of String => Array(String)\n@nodes.each do |node|\n  hash[node.name] = node.args\nend\nhash\n"}}],"macros":[],"types":[]},{"html_id":"github.com/krthr/haye.cr/Haye/Presenters/Node","path":"Haye/Presenters/Node.html","kind":"class","full_name":"Haye::Presenters::Node","name":"Node","abstract":false,"superclass":{"html_id":"github.com/krthr/haye.cr/Reference","kind":"class","full_name":"Reference","name":"Reference"},"ancestors":[{"html_id":"github.com/krthr/haye.cr/Reference","kind":"class","full_name":"Reference","name":"Reference"},{"html_id":"github.com/krthr/haye.cr/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"presenters/node.cr","line_number":5,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/node.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":false,"alias":false,"aliased":"","const":false,"constants":[],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/krthr/haye.cr/Haye/Presenters","kind":"module","full_name":"Haye::Presenters","name":"Presenters"},"doc":null,"summary":null,"class_methods":[],"constructors":[{"id":"new(__temp_30:JSON::PullParser)-class-method","html_id":"new(__temp_30:JSON::PullParser)-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[{"name":"__temp_30","doc":null,"default_value":"","external_name":"__temp_30","restriction":"::JSON::PullParser"}],"args_string":"(__temp_30 : JSON::PullParser)","source_link":null,"def":{"name":"new","args":[{"name":"__temp_30","doc":null,"default_value":"","external_name":"__temp_30","restriction":"::JSON::PullParser"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize(__temp_30)\nif _.responds_to?(:finalize)\n  ::GC.add_finalizer(_)\nend\n_\n"}},{"id":"new-class-method","html_id":"new-class-method","name":"new","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/presenters/node.cr#L13","def":{"name":"new","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"_ = allocate\n_.initialize\nif _.responds_to?(:finalize)\n  ::GC.add_finalizer(_)\nend\n_\n"}}],"instance_methods":[{"id":"args:Array(String)-instance-method","html_id":"args:Array(String)-instance-method","name":"args","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : Array(String)","source_link":null,"def":{"name":"args","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"Array(String)","visibility":"Public","body":"@args"}},{"id":"args=(_args:Array(String))-instance-method","html_id":"args=(_args:Array(String))-instance-method","name":"args=","doc":null,"summary":null,"abstract":false,"args":[{"name":"_args","doc":null,"default_value":"","external_name":"_args","restriction":"Array(String)"}],"args_string":"(_args : Array(String))","source_link":null,"def":{"name":"args=","args":[{"name":"_args","doc":null,"default_value":"","external_name":"_args","restriction":"Array(String)"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@args = _args"}},{"id":"name:String-instance-method","html_id":"name:String-instance-method","name":"name","doc":null,"summary":null,"abstract":false,"args":[],"args_string":" : String","source_link":null,"def":{"name":"name","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"String","visibility":"Public","body":"@name"}},{"id":"name=(_name:String)-instance-method","html_id":"name=(_name:String)-instance-method","name":"name=","doc":null,"summary":null,"abstract":false,"args":[{"name":"_name","doc":null,"default_value":"","external_name":"_name","restriction":"String"}],"args_string":"(_name : String)","source_link":null,"def":{"name":"name=","args":[{"name":"_name","doc":null,"default_value":"","external_name":"_name","restriction":"String"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"@name = _name"}},{"id":"to_json(json:JSON::Builder)-instance-method","html_id":"to_json(json:JSON::Builder)-instance-method","name":"to_json","doc":null,"summary":null,"abstract":false,"args":[{"name":"json","doc":null,"default_value":"","external_name":"json","restriction":"::JSON::Builder"}],"args_string":"(json : JSON::Builder)","source_link":null,"def":{"name":"to_json","args":[{"name":"json","doc":null,"default_value":"","external_name":"json","restriction":"::JSON::Builder"}],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"json.object do\n  _name = @name\n  if _name.nil?\n  else\n    json.field(\"name\") do\n      _name.to_json(json)\n    end\n  end\n  _args = @args\n  if _args.nil?\n  else\n    json.field(\"args\") do\n      _args.to_json(json)\n    end\n  end\nend"}}],"macros":[],"types":[]}]},{"html_id":"github.com/krthr/haye.cr/Haye/PresenterTypes","path":"Haye/PresenterTypes.html","kind":"enum","full_name":"Haye::PresenterTypes","name":"PresenterTypes","abstract":false,"superclass":null,"ancestors":[{"html_id":"github.com/krthr/haye.cr/Enum","kind":"struct","full_name":"Enum","name":"Enum"},{"html_id":"github.com/krthr/haye.cr/Comparable","kind":"module","full_name":"Comparable","name":"Comparable"},{"html_id":"github.com/krthr/haye.cr/Value","kind":"struct","full_name":"Value","name":"Value"},{"html_id":"github.com/krthr/haye.cr/Object","kind":"class","full_name":"Object","name":"Object"}],"locations":[{"filename":"haye.cr","line_number":10,"url":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/haye.cr"}],"repository_name":"github.com/krthr/haye.cr","program":false,"enum":true,"alias":false,"aliased":"","const":false,"constants":[{"id":"Array","name":"Array","value":"0","doc":null,"summary":null},{"id":"Hash","name":"Hash","value":"1","doc":null,"summary":null}],"included_modules":[],"extended_modules":[],"subclasses":[],"including_types":[],"namespace":{"html_id":"github.com/krthr/haye.cr/Haye","kind":"module","full_name":"Haye","name":"Haye"},"doc":null,"summary":null,"class_methods":[],"constructors":[],"instance_methods":[{"id":"array?-instance-method","html_id":"array?-instance-method","name":"array?","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/haye.cr#L11","def":{"name":"array?","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"self == Array"}},{"id":"hash?-instance-method","html_id":"hash?-instance-method","name":"hash?","doc":null,"summary":null,"abstract":false,"args":[],"args_string":"","source_link":"https://github.com/krthr/haye.cr/blob/e410045688831420b1a29896699665153bb75727/src/haye.cr#L12","def":{"name":"hash?","args":[],"double_splat":null,"splat_index":null,"yields":null,"block_arg":null,"return_type":"","visibility":"Public","body":"self == Hash"}}],"macros":[],"types":[]}]}]}})