utopia 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +1 -0
  3. data/.travis.yml +3 -1
  4. data/Gemfile +2 -0
  5. data/README.md +2 -2
  6. data/Rakefile +19 -7
  7. data/docs/.nojekyll +0 -0
  8. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +6 -0
  9. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +5 -0
  10. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +8 -0
  11. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +6 -0
  12. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +10 -0
  13. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +3 -0
  14. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.css.css +14 -0
  15. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +16 -0
  16. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.html.css +5 -0
  17. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +3 -0
  18. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +2 -0
  19. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.python.css +6 -0
  20. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +2 -0
  21. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +18 -0
  22. data/docs/_components/jquery-syntax/base/jquery.syntax.core.css +62 -0
  23. data/docs/_components/jquery-syntax/base/jquery.syntax.editor.css +6 -0
  24. data/docs/_components/jquery-syntax/base/theme.js +1 -0
  25. data/docs/_components/jquery-syntax/bright/jquery.syntax.core.css +27 -0
  26. data/docs/_components/jquery-syntax/bright/theme.js +1 -0
  27. data/docs/_components/jquery-syntax/jquery.syntax.brush.apache.js +41 -0
  28. data/docs/_components/jquery-syntax/jquery.syntax.brush.applescript.js +57 -0
  29. data/docs/_components/jquery-syntax/jquery.syntax.brush.assembly.js +37 -0
  30. data/docs/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +67 -0
  31. data/docs/_components/jquery-syntax/jquery.syntax.brush.bash.js +33 -0
  32. data/docs/_components/jquery-syntax/jquery.syntax.brush.basic.js +51 -0
  33. data/docs/_components/jquery-syntax/jquery.syntax.brush.clang.js +89 -0
  34. data/docs/_components/jquery-syntax/jquery.syntax.brush.csharp.js +47 -0
  35. data/docs/_components/jquery-syntax/jquery.syntax.brush.css.js +80 -0
  36. data/docs/_components/jquery-syntax/jquery.syntax.brush.diff.js +24 -0
  37. data/docs/_components/jquery-syntax/jquery.syntax.brush.go.js +47 -0
  38. data/docs/_components/jquery-syntax/jquery.syntax.brush.haskell.js +45 -0
  39. data/docs/_components/jquery-syntax/jquery.syntax.brush.html.js +66 -0
  40. data/docs/_components/jquery-syntax/jquery.syntax.brush.io.js +45 -0
  41. data/docs/_components/jquery-syntax/jquery.syntax.brush.java.js +45 -0
  42. data/docs/_components/jquery-syntax/jquery.syntax.brush.javascript.js +40 -0
  43. data/docs/_components/jquery-syntax/jquery.syntax.brush.kai.js +29 -0
  44. data/docs/_components/jquery-syntax/jquery.syntax.brush.lisp.js +34 -0
  45. data/docs/_components/jquery-syntax/jquery.syntax.brush.lua.js +44 -0
  46. data/docs/_components/jquery-syntax/jquery.syntax.brush.nginx.js +31 -0
  47. data/docs/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +73 -0
  48. data/docs/_components/jquery-syntax/jquery.syntax.brush.ooc.js +46 -0
  49. data/docs/_components/jquery-syntax/jquery.syntax.brush.pascal.js +51 -0
  50. data/docs/_components/jquery-syntax/jquery.syntax.brush.perl5.js +52 -0
  51. data/docs/_components/jquery-syntax/jquery.syntax.brush.php-script.js +48 -0
  52. data/docs/_components/jquery-syntax/jquery.syntax.brush.php.js +15 -0
  53. data/docs/_components/jquery-syntax/jquery.syntax.brush.plain.js +10 -0
  54. data/docs/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +43 -0
  55. data/docs/_components/jquery-syntax/jquery.syntax.brush.python.js +44 -0
  56. data/docs/_components/jquery-syntax/jquery.syntax.brush.ruby.js +77 -0
  57. data/docs/_components/jquery-syntax/jquery.syntax.brush.scala.js +44 -0
  58. data/docs/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +29 -0
  59. data/docs/_components/jquery-syntax/jquery.syntax.brush.sql.js +31 -0
  60. data/docs/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +57 -0
  61. data/docs/_components/jquery-syntax/jquery.syntax.brush.swift.js +55 -0
  62. data/docs/_components/jquery-syntax/jquery.syntax.brush.trenni.js +35 -0
  63. data/docs/_components/jquery-syntax/jquery.syntax.brush.xml.js +50 -0
  64. data/docs/_components/jquery-syntax/jquery.syntax.brush.yaml.js +29 -0
  65. data/docs/_components/jquery-syntax/jquery.syntax.cache.js +65 -0
  66. data/docs/_components/jquery-syntax/jquery.syntax.core.js +1098 -0
  67. data/docs/_components/jquery-syntax/jquery.syntax.editor.js +291 -0
  68. data/docs/_components/jquery-syntax/jquery.syntax.js +258 -0
  69. data/docs/_components/jquery-syntax/jquery.syntax.min.js +13 -0
  70. data/docs/_components/jquery-syntax/paper/jquery.syntax.core.css +31 -0
  71. data/docs/_components/jquery-syntax/paper/theme.js +1 -0
  72. data/docs/_components/jquery/core.js +482 -0
  73. data/docs/_components/jquery/jquery.js +10220 -0
  74. data/docs/_components/jquery/jquery.min.js +4 -0
  75. data/docs/_components/jquery/jquery.min.map +1 -0
  76. data/docs/_components/jquery/jquery.slim.js +8107 -0
  77. data/docs/_components/jquery/jquery.slim.min.js +4 -0
  78. data/docs/_components/jquery/jquery.slim.min.map +1 -0
  79. data/docs/_static/icon.png +0 -0
  80. data/docs/_static/site.css +205 -0
  81. data/docs/_static/utopia-background.svg +1 -0
  82. data/docs/_static/utopia.svg +1 -0
  83. data/docs/code/Utopia.html +511 -0
  84. data/docs/code/Utopia/Basename.html +654 -0
  85. data/docs/code/Utopia/Bootstrap.html +538 -0
  86. data/docs/code/Utopia/Command.html +207 -0
  87. data/docs/code/Utopia/Command/Environment.html +321 -0
  88. data/docs/code/Utopia/Command/Server.html +214 -0
  89. data/docs/code/Utopia/Command/Server/Create.html +222 -0
  90. data/docs/code/Utopia/Command/Server/Environment.html +236 -0
  91. data/docs/code/Utopia/Command/Server/Update.html +317 -0
  92. data/docs/code/Utopia/Command/Setup.html +145 -0
  93. data/docs/code/Utopia/Command/Setup/Server.html +298 -0
  94. data/docs/code/Utopia/Command/Setup/Site.html +180 -0
  95. data/docs/code/Utopia/Command/Site.html +279 -0
  96. data/docs/code/Utopia/Command/Site/Create.html +324 -0
  97. data/docs/code/Utopia/Command/Site/Update.html +407 -0
  98. data/docs/code/Utopia/Command/Top.html +279 -0
  99. data/docs/code/Utopia/Content.html +826 -0
  100. data/docs/code/Utopia/Content/Document.html +1818 -0
  101. data/docs/code/Utopia/Content/Document/State.html +1220 -0
  102. data/docs/code/Utopia/Content/Link.html +1286 -0
  103. data/docs/code/Utopia/Content/Links.html +841 -0
  104. data/docs/code/Utopia/Content/MarkupParser.html +881 -0
  105. data/docs/code/Utopia/Content/MarkupParser/ParsedTag.html +422 -0
  106. data/docs/code/Utopia/Content/MarkupParser/UnbalancedTagError.html +615 -0
  107. data/docs/code/Utopia/Content/Namespace.html +485 -0
  108. data/docs/code/Utopia/Content/Node.html +1188 -0
  109. data/docs/code/Utopia/Content/Node/Context.html +938 -0
  110. data/docs/code/Utopia/Content/Response.html +813 -0
  111. data/docs/code/Utopia/Content/SymbolicHash.html +419 -0
  112. data/docs/code/Utopia/Content/Tag.html +399 -0
  113. data/docs/code/Utopia/Content/Tags.html +136 -0
  114. data/docs/code/Utopia/Content/Tags/ContentTag.html +187 -0
  115. data/docs/code/Utopia/Content/Tags/DeferredTag.html +193 -0
  116. data/docs/code/Utopia/Content/Tags/Library.html +333 -0
  117. data/docs/code/Utopia/Content/Tags/NodeTag.html +193 -0
  118. data/docs/code/Utopia/Content/UnbalancedTagError.html +298 -0
  119. data/docs/code/Utopia/ContentLength.html +339 -0
  120. data/docs/code/Utopia/Controller.html +901 -0
  121. data/docs/code/Utopia/Controller/Actions.html +289 -0
  122. data/docs/code/Utopia/Controller/Actions/Action.html +978 -0
  123. data/docs/code/Utopia/Controller/Actions/ClassMethods.html +442 -0
  124. data/docs/code/Utopia/Controller/Base.html +1216 -0
  125. data/docs/code/Utopia/Controller/Respond.html +283 -0
  126. data/docs/code/Utopia/Controller/Respond/ClassMethods.html +236 -0
  127. data/docs/code/Utopia/Controller/Respond/Converter.html +256 -0
  128. data/docs/code/Utopia/Controller/Respond/Converter/Callback.html +484 -0
  129. data/docs/code/Utopia/Controller/Respond/Converter/ToJSON.html +375 -0
  130. data/docs/code/Utopia/Controller/Respond/Passthrough.html +291 -0
  131. data/docs/code/Utopia/Controller/Respond/Responder.html +529 -0
  132. data/docs/code/Utopia/Controller/Rewrite.html +290 -0
  133. data/docs/code/Utopia/Controller/Rewrite/ClassMethods.html +242 -0
  134. data/docs/code/Utopia/Controller/Rewrite/ExtractPrefixRule.html +364 -0
  135. data/docs/code/Utopia/Controller/Rewrite/Rewriter.html +464 -0
  136. data/docs/code/Utopia/Controller/Rewrite/Rule.html +209 -0
  137. data/docs/code/Utopia/Controller/Variables.html +550 -0
  138. data/docs/code/Utopia/Controllers.html +244 -0
  139. data/docs/code/Utopia/Exceptions.html +127 -0
  140. data/docs/code/Utopia/Exceptions/Handler.html +526 -0
  141. data/docs/code/Utopia/Exceptions/Mailer.html +476 -0
  142. data/docs/code/Utopia/Extensions.html +117 -0
  143. data/docs/code/Utopia/Extensions/ArraySplit.html +183 -0
  144. data/docs/code/Utopia/Extensions/DateTimeComparison.html +193 -0
  145. data/docs/code/Utopia/Extensions/TimeDateComparison.html +193 -0
  146. data/docs/code/Utopia/HTTP.html +244 -0
  147. data/docs/code/Utopia/HTTP/Status.html +415 -0
  148. data/docs/code/Utopia/Locale.html +606 -0
  149. data/docs/code/Utopia/Localization.html +1235 -0
  150. data/docs/code/Utopia/Localization/Wrapper.html +459 -0
  151. data/docs/code/Utopia/Logger.html +205 -0
  152. data/docs/code/Utopia/Logger/CompactFormatter.html +335 -0
  153. data/docs/code/Utopia/Path.html +3304 -0
  154. data/docs/code/Utopia/Path/Matcher.html +518 -0
  155. data/docs/code/Utopia/Path/Matcher/MatchData.html +475 -0
  156. data/docs/code/Utopia/Redirection.html +145 -0
  157. data/docs/code/Utopia/Redirection/ClientRedirect.html +717 -0
  158. data/docs/code/Utopia/Redirection/DirectoryIndex.html +298 -0
  159. data/docs/code/Utopia/Redirection/Errors.html +470 -0
  160. data/docs/code/Utopia/Redirection/Moved.html +312 -0
  161. data/docs/code/Utopia/Redirection/RequestFailure.html +226 -0
  162. data/docs/code/Utopia/Redirection/Rewrite.html +296 -0
  163. data/docs/code/Utopia/Session.html +883 -0
  164. data/docs/code/Utopia/Session/LazyHash.html +859 -0
  165. data/docs/code/Utopia/Setup.html +964 -0
  166. data/docs/code/Utopia/Static.html +690 -0
  167. data/docs/code/Utopia/Static/LocalFile.html +1098 -0
  168. data/docs/code/Utopia/Static/MimeTypeLoader.html +541 -0
  169. data/docs/code/Utopia/Static/MimeTypeLoader/ExpansionError.html +124 -0
  170. data/docs/code/Utopia/Tags.html +115 -0
  171. data/docs/code/Utopia/Tags/Environment.html +314 -0
  172. data/docs/code/Utopia/Tags/EnvironmentTag.html +314 -0
  173. data/docs/code/Utopia/Tags/Library.html +340 -0
  174. data/docs/code/_index.html +758 -0
  175. data/docs/code/class_list.html +51 -0
  176. data/docs/code/css/common.css +1 -0
  177. data/docs/code/css/full_list.css +58 -0
  178. data/docs/code/css/style.css +499 -0
  179. data/docs/code/file.README.html +169 -0
  180. data/docs/code/file_list.html +56 -0
  181. data/docs/code/frames.html +17 -0
  182. data/docs/code/index.html +169 -0
  183. data/docs/code/js/app.js +248 -0
  184. data/docs/code/js/full_list.js +216 -0
  185. data/docs/code/js/jquery.js +4 -0
  186. data/docs/code/materials/utopia.png +0 -0
  187. data/docs/code/materials/utopia.svg +1 -0
  188. data/docs/code/method_list.html +3443 -0
  189. data/docs/code/top-level-namespace.html +110 -0
  190. data/docs/index.html +92 -0
  191. data/docs/wiki.html +92 -0
  192. data/docs/wiki/bower-integration.html +74 -0
  193. data/docs/wiki/bower-integration/index.html +74 -0
  194. data/docs/wiki/development-environment-setup.html +60 -0
  195. data/docs/wiki/development-environment-setup/index.html +60 -0
  196. data/docs/wiki/edit.html +103 -0
  197. data/docs/wiki/faq/what-is-xnode.html +79 -0
  198. data/docs/wiki/faq/what-is-xnode/index.html +79 -0
  199. data/docs/wiki/middleware/content.html +64 -0
  200. data/docs/wiki/middleware/content/index.html +64 -0
  201. data/docs/wiki/middleware/controller.html +104 -0
  202. data/docs/wiki/middleware/controller/actions.html +117 -0
  203. data/docs/wiki/middleware/controller/actions/index.html +117 -0
  204. data/docs/wiki/middleware/controller/actions/rewrite/index.html +48 -0
  205. data/docs/wiki/middleware/controller/index.html +104 -0
  206. data/docs/wiki/middleware/controller/rewrite.html +111 -0
  207. data/docs/wiki/middleware/controller/rewrite/index.html +111 -0
  208. data/docs/wiki/middleware/localization.html +59 -0
  209. data/docs/wiki/middleware/localization/index.html +59 -0
  210. data/docs/wiki/middleware/redirection.html +61 -0
  211. data/docs/wiki/middleware/redirection/index.html +61 -0
  212. data/docs/wiki/middleware/session.html +71 -0
  213. data/docs/wiki/middleware/session/index.html +71 -0
  214. data/docs/wiki/middleware/static.html +57 -0
  215. data/docs/wiki/middleware/static/index.html +57 -0
  216. data/docs/wiki/server-setup.html +118 -0
  217. data/docs/wiki/server-setup/index.html +118 -0
  218. data/docs/wiki/testing.html +59 -0
  219. data/docs/wiki/testing/index.html +59 -0
  220. data/docs/wiki/updating-utopia.html +108 -0
  221. data/docs/wiki/updating-utopia/index.html +108 -0
  222. data/docs/wiki/your-first-page.html +80 -0
  223. data/docs/wiki/your-first-page/index.html +80 -0
  224. data/documentation/Guardfile +0 -12
  225. data/documentation/Rakefile +3 -0
  226. data/documentation/pages/_page.xnode +2 -0
  227. data/documentation/pages/wiki/content.md +1 -0
  228. data/documentation/pages/wiki/faq/what-is-xnode/content.md +37 -0
  229. data/documentation/pages/wiki/links.yaml +3 -1
  230. data/documentation/pages/wiki/server-setup/content.md +1 -1
  231. data/documentation/pages/wiki/show.xnode +2 -0
  232. data/documentation/pages/wiki/your-first-page/content.md +1 -1
  233. data/lib/utopia/command.rb +4 -4
  234. data/lib/utopia/command/environment.rb +73 -0
  235. data/lib/utopia/command/server.rb +19 -32
  236. data/lib/utopia/command/site.rb +26 -9
  237. data/lib/utopia/content/markup.rb +1 -1
  238. data/lib/utopia/setup.rb +49 -20
  239. data/lib/utopia/version.rb +1 -1
  240. data/setup/site/README.md +6 -7
  241. data/setup/site/Rakefile +3 -0
  242. data/setup/site/pages/_page.xnode +1 -1
  243. data/setup/site/public/_static/site.css +1 -1
  244. data/setup/site/tasks/bower.rake +3 -6
  245. data/setup/site/tasks/deploy.rake +1 -1
  246. data/setup/site/tasks/development.rake +1 -1
  247. data/setup/site/tasks/environment.rake +2 -2
  248. data/setup/site/tasks/static.rake +43 -0
  249. data/spec/utopia/command_spec.rb +170 -0
  250. data/spec/utopia/setup_spec.rb +20 -142
  251. metadata +225 -42
  252. data/documentation/public/_components/jquery-syntax/.sass-cache/040afc1428b286fb3c50151378b349a6149698d3/jquery.syntax.core.sassc +0 -0
  253. data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.editor.sassc +0 -0
  254. data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.fixed.sassc +0 -0
  255. data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.inline.sassc +0 -0
  256. data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.list.sassc +0 -0
  257. data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.plain.sassc +0 -0
  258. data/documentation/public/_components/jquery-syntax/.sass-cache/098642d80a1682613dca2bba6fd0a3bc9fd2bf04/jquery.syntax.layout.table.sassc +0 -0
  259. data/documentation/public/_components/jquery-syntax/.sass-cache/10c58b30c53bf84f8360af8a864797092be26882/jquery.syntax.core.sassc +0 -0
  260. data/documentation/public/_components/jquery-syntax/.sass-cache/10c58b30c53bf84f8360af8a864797092be26882/jquery.syntax.layout.fixed.sassc +0 -0
  261. data/documentation/public/_components/jquery-syntax/.sass-cache/10c58b30c53bf84f8360af8a864797092be26882/jquery.syntax.layout.inline.sassc +0 -0
  262. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/_layout.scssc +0 -0
  263. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.apache.sassc +0 -0
  264. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.applescript.sassc +0 -0
  265. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.assembly.sassc +0 -0
  266. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.bash-script.sassc +0 -0
  267. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.bash.sassc +0 -0
  268. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.clang.sassc +0 -0
  269. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.css.sassc +0 -0
  270. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.diff.sassc +0 -0
  271. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.html.sassc +0 -0
  272. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.ocaml.sassc +0 -0
  273. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.protobuf.sassc +0 -0
  274. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.python.sassc +0 -0
  275. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.ruby.sassc +0 -0
  276. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.brush.xml.sassc +0 -0
  277. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.core.sassc +0 -0
  278. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.editor.sassc +0 -0
  279. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.editor.sassc +0 -0
  280. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.fixed.sassc +0 -0
  281. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.list.sassc +0 -0
  282. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.plain.sassc +0 -0
  283. data/documentation/public/_components/jquery-syntax/.sass-cache/3c69ad94149e2a6d9f4ffda01814fee3947b1389/jquery.syntax.layout.table.sassc +0 -0
  284. data/documentation/public/_components/jquery-syntax/.sass-cache/8638ad407c5ea29f6547cf8ac6983da587354889/master.sassc +0 -0
  285. data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.editor.sassc +0 -0
  286. data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.fixed.sassc +0 -0
  287. data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.inline.sassc +0 -0
  288. data/documentation/public/_components/jquery-syntax/.sass-cache/b7ab87e6269b4fe89f9475b7a260077391d3567b/jquery.syntax.layout.plain.sassc +0 -0
  289. data/documentation/public/_components/jquery-syntax/.sass-cache/e82f8cf4c8436da086a4506e01ef78755ebab1ce/master.scssc +0 -0
  290. data/lib/utopia/command/setup.rb +0 -78
@@ -0,0 +1,1818 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Utopia::Content::Document
8
+
9
+ &mdash; Documentation by YARD 0.9.12
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "Utopia::Content::Document";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (D)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Utopia.html" title="Utopia (module)">Utopia</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Content.html" title="Utopia::Content (class)">Content</a></span></span>
41
+ &raquo;
42
+ <span class="title">Document</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Utopia::Content::Document
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="Response.html" title="Utopia::Content::Response (class)">Response</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="Response.html" title="Utopia::Content::Response (class)">Response</a></span></li>
78
+
79
+ <li class="next">Utopia::Content::Document</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/utopia/content/document.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+ <p>A single request through content middleware. We use a struct to hide instance varibles since we instance_exec within this context.</p>
107
+
108
+
109
+ </div>
110
+ </div>
111
+ <div class="tags">
112
+
113
+
114
+ </div><h2>Defined Under Namespace</h2>
115
+ <p class="children">
116
+
117
+
118
+
119
+
120
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Document/State.html" title="Utopia::Content::Document::State (class)">State</a></span>
121
+
122
+
123
+ </p>
124
+
125
+
126
+
127
+
128
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
129
+ <ul class="summary">
130
+
131
+ <li class="public ">
132
+ <span class="summary_signature">
133
+
134
+ <a href="#attributes-instance_method" title="#attributes (instance method)">#<strong>attributes</strong> &#x21d2; Object </a>
135
+
136
+
137
+
138
+ </span>
139
+
140
+
141
+
142
+
143
+ <span class="note title readonly">readonly</span>
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+ <span class="summary_desc"><div class='inline'><p>Per-document global attributes.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#current-instance_method" title="#current (instance method)">#<strong>current</strong> &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+ <span class="note title readonly">readonly</span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'><p>The current state, represents a list from outer to inner most tag by traversing <span class='object_link'><a href="Document/State.html#parent-instance_method" title="Utopia::Content::Document::State#parent (method)">State#parent</a></span>.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#end_tags-instance_method" title="#end_tags (instance method)">#<strong>end_tags</strong> &#x21d2; Object </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+ <span class="note title readonly">readonly</span>
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+ <span class="summary_desc"><div class='inline'><p>End tags represents a list of execution order.</p>
210
+ </div></span>
211
+
212
+ </li>
213
+
214
+
215
+ <li class="public ">
216
+ <span class="summary_signature">
217
+
218
+ <a href="#first-instance_method" title="#first (instance method)">#<strong>first</strong> &#x21d2; Object </a>
219
+
220
+
221
+
222
+ </span>
223
+
224
+
225
+
226
+
227
+ <span class="note title readonly">readonly</span>
228
+
229
+
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+ <span class="summary_desc"><div class='inline'><p>The first <span class='object_link'><a href="Document/State.html" title="Utopia::Content::Document::State (class)">State</a></span> generated by rendering this document.</p>
238
+ </div></span>
239
+
240
+ </li>
241
+
242
+
243
+ <li class="public ">
244
+ <span class="summary_signature">
245
+
246
+ <a href="#request-instance_method" title="#request (instance method)">#<strong>request</strong> &#x21d2; Object </a>
247
+
248
+
249
+
250
+ </span>
251
+
252
+
253
+
254
+
255
+ <span class="note title readonly">readonly</span>
256
+
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+ <span class="summary_desc"><div class='inline'><p>The Rack::Request for this document.</p>
266
+ </div></span>
267
+
268
+ </li>
269
+
270
+
271
+ </ul>
272
+
273
+
274
+
275
+
276
+
277
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Response.html" title="Utopia::Content::Response (class)">Response</a></span></h3>
278
+ <p class="inherited"><span class='object_link'><a href="Response.html#body-instance_method" title="Utopia::Content::Response#body (method)">#body</a></span>, <span class='object_link'><a href="Response.html#headers-instance_method" title="Utopia::Content::Response#headers (method)">#headers</a></span>, <span class='object_link'><a href="Response.html#status-instance_method" title="Utopia::Content::Response#status (method)">#status</a></span></p>
279
+
280
+
281
+
282
+ <h2>
283
+ Class Method Summary
284
+ <small><a href="#" class="summary_toggle">collapse</a></small>
285
+ </h2>
286
+
287
+ <ul class="summary">
288
+
289
+ <li class="public ">
290
+ <span class="summary_signature">
291
+
292
+ <a href="#render-class_method" title="render (class method)">.<strong>render</strong>(node, request, attributes) &#x21d2; Object </a>
293
+
294
+
295
+
296
+ </span>
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+ <span class="summary_desc"><div class='inline'>
307
+ </div></span>
308
+
309
+ </li>
310
+
311
+
312
+ </ul>
313
+
314
+ <h2>
315
+ Instance Method Summary
316
+ <small><a href="#" class="summary_toggle">collapse</a></small>
317
+ </h2>
318
+
319
+ <ul class="summary">
320
+
321
+ <li class="public ">
322
+ <span class="summary_signature">
323
+
324
+ <a href="#[]-instance_method" title="#[] (instance method)">#<strong>[]</strong>(key) &#x21d2; Object </a>
325
+
326
+
327
+
328
+ </span>
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+
337
+
338
+ <span class="summary_desc"><div class='inline'>
339
+ </div></span>
340
+
341
+ </li>
342
+
343
+
344
+ <li class="public ">
345
+ <span class="summary_signature">
346
+
347
+ <a href="#[]=-instance_method" title="#[]= (instance method)">#<strong>[]=</strong>(key, value) &#x21d2; Object </a>
348
+
349
+
350
+
351
+ </span>
352
+
353
+
354
+
355
+
356
+
357
+
358
+
359
+
360
+
361
+ <span class="summary_desc"><div class='inline'>
362
+ </div></span>
363
+
364
+ </li>
365
+
366
+
367
+ <li class="public ">
368
+ <span class="summary_signature">
369
+
370
+ <a href="#content-instance_method" title="#content (instance method)">#<strong>content</strong> &#x21d2; Object </a>
371
+
372
+
373
+
374
+ </span>
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+
383
+
384
+ <span class="summary_desc"><div class='inline'><p>The content of the node.</p>
385
+ </div></span>
386
+
387
+ </li>
388
+
389
+
390
+ <li class="public ">
391
+ <span class="summary_signature">
392
+
393
+ <a href="#controller-instance_method" title="#controller (instance method)">#<strong>controller</strong> &#x21d2; Object </a>
394
+
395
+
396
+
397
+ </span>
398
+
399
+
400
+
401
+
402
+
403
+
404
+
405
+
406
+
407
+ <span class="summary_desc"><div class='inline'><p>A helper method for accessing controller variables from view:.</p>
408
+ </div></span>
409
+
410
+ </li>
411
+
412
+
413
+ <li class="public ">
414
+ <span class="summary_signature">
415
+
416
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(request, attributes = {}) &#x21d2; Document </a>
417
+
418
+
419
+
420
+ </span>
421
+
422
+
423
+ <span class="note title constructor">constructor</span>
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+
432
+ <span class="summary_desc"><div class='inline'><p>A new instance of Document.</p>
433
+ </div></span>
434
+
435
+ </li>
436
+
437
+
438
+ <li class="public ">
439
+ <span class="summary_signature">
440
+
441
+ <a href="#localization-instance_method" title="#localization (instance method)">#<strong>localization</strong> &#x21d2; Object </a>
442
+
443
+
444
+
445
+ </span>
446
+
447
+
448
+
449
+
450
+
451
+
452
+
453
+
454
+
455
+ <span class="summary_desc"><div class='inline'>
456
+ </div></span>
457
+
458
+ </li>
459
+
460
+
461
+ <li class="public ">
462
+ <span class="summary_signature">
463
+
464
+ <a href="#lookup_node-instance_method" title="#lookup_node (instance method)">#<strong>lookup_node</strong>(path) &#x21d2; Node </a>
465
+
466
+
467
+
468
+ </span>
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+
477
+
478
+ <span class="summary_desc"><div class='inline'><p>Lookup a node with the given path relative to the current node.</p>
479
+ </div></span>
480
+
481
+ </li>
482
+
483
+
484
+ <li class="public ">
485
+ <span class="summary_signature">
486
+
487
+ <a href="#lookup_tag-instance_method" title="#lookup_tag (instance method)">#<strong>lookup_tag</strong>(tag) &#x21d2; Node </a>
488
+
489
+
490
+
491
+ </span>
492
+
493
+
494
+
495
+
496
+
497
+
498
+
499
+
500
+
501
+ <span class="summary_desc"><div class='inline'><p>Maps a tag to a node instance by asking the current node to lookup the tag name.</p>
502
+ </div></span>
503
+
504
+ </li>
505
+
506
+
507
+ <li class="public ">
508
+ <span class="summary_signature">
509
+
510
+ <a href="#parent-instance_method" title="#parent (instance method)">#<strong>parent</strong> &#x21d2; Object </a>
511
+
512
+
513
+
514
+ </span>
515
+
516
+
517
+
518
+
519
+
520
+
521
+
522
+
523
+
524
+ <span class="summary_desc"><div class='inline'>
525
+ </div></span>
526
+
527
+ </li>
528
+
529
+
530
+ <li class="public ">
531
+ <span class="summary_signature">
532
+
533
+ <a href="#parse_markup-instance_method" title="#parse_markup (instance method)">#<strong>parse_markup</strong>(markup) &#x21d2; Object </a>
534
+
535
+
536
+
537
+ </span>
538
+
539
+
540
+
541
+
542
+
543
+
544
+
545
+
546
+
547
+ <span class="summary_desc"><div class='inline'>
548
+ </div></span>
549
+
550
+ </li>
551
+
552
+
553
+ <li class="public ">
554
+ <span class="summary_signature">
555
+
556
+ <a href="#render!-instance_method" title="#render! (instance method)">#<strong>render!</strong>(node, attributes) &#x21d2; Object </a>
557
+
558
+
559
+
560
+ </span>
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+
569
+
570
+ <span class="summary_desc"><div class='inline'>
571
+ </div></span>
572
+
573
+ </li>
574
+
575
+
576
+ <li class="public ">
577
+ <span class="summary_signature">
578
+
579
+ <a href="#render_node-instance_method" title="#render_node (instance method)">#<strong>render_node</strong>(node, attributes = {}) &#x21d2; Object </a>
580
+
581
+
582
+
583
+ </span>
584
+
585
+
586
+
587
+
588
+
589
+
590
+
591
+
592
+
593
+ <span class="summary_desc"><div class='inline'>
594
+ </div></span>
595
+
596
+ </li>
597
+
598
+
599
+ <li class="public ">
600
+ <span class="summary_signature">
601
+
602
+ <a href="#tag-instance_method" title="#tag (instance method)">#<strong>tag</strong>(name, attributes = {}) &#x21d2; Object </a>
603
+
604
+
605
+
606
+ </span>
607
+
608
+
609
+
610
+
611
+
612
+
613
+
614
+
615
+
616
+ <span class="summary_desc"><div class='inline'>
617
+ </div></span>
618
+
619
+ </li>
620
+
621
+
622
+ <li class="public ">
623
+ <span class="summary_signature">
624
+
625
+ <a href="#tag_begin-instance_method" title="#tag_begin (instance method)">#<strong>tag_begin</strong>(tag, node = nil) &#x21d2; Object </a>
626
+
627
+
628
+
629
+ </span>
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+ <span class="summary_desc"><div class='inline'>
640
+ </div></span>
641
+
642
+ </li>
643
+
644
+
645
+ <li class="public ">
646
+ <span class="summary_signature">
647
+
648
+ <a href="#tag_complete-instance_method" title="#tag_complete (instance method)">#<strong>tag_complete</strong>(tag, node = nil) &#x21d2; Object </a>
649
+
650
+
651
+
652
+ </span>
653
+
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+ <span class="summary_desc"><div class='inline'>
663
+ </div></span>
664
+
665
+ </li>
666
+
667
+
668
+ <li class="public ">
669
+ <span class="summary_signature">
670
+
671
+ <a href="#tag_end-instance_method" title="#tag_end (instance method)">#<strong>tag_end</strong>(tag = nil) &#x21d2; Object </a>
672
+
673
+
674
+
675
+ </span>
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+ <span class="summary_desc"><div class='inline'>
686
+ </div></span>
687
+
688
+ </li>
689
+
690
+
691
+ <li class="public ">
692
+ <span class="summary_signature">
693
+
694
+ <a href="#text-instance_method" title="#text (instance method)">#<strong>text</strong>(string) &#x21d2; Object </a>
695
+
696
+
697
+
698
+ </span>
699
+
700
+
701
+
702
+
703
+
704
+
705
+
706
+
707
+
708
+ <span class="summary_desc"><div class='inline'>
709
+ </div></span>
710
+
711
+ </li>
712
+
713
+
714
+ <li class="public ">
715
+ <span class="summary_signature">
716
+
717
+ <a href="#write-instance_method" title="#write (instance method)">#<strong>write</strong>(string) &#x21d2; Object </a>
718
+
719
+
720
+
721
+ (also: #cdata)
722
+
723
+ </span>
724
+
725
+
726
+
727
+
728
+
729
+
730
+
731
+
732
+
733
+ <span class="summary_desc"><div class='inline'>
734
+ </div></span>
735
+
736
+ </li>
737
+
738
+
739
+ </ul>
740
+
741
+
742
+
743
+
744
+
745
+
746
+
747
+
748
+
749
+
750
+
751
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Response.html" title="Utopia::Content::Response (class)">Response</a></span></h3>
752
+ <p class="inherited"><span class='object_link'><a href="Response.html#cache!-instance_method" title="Utopia::Content::Response#cache! (method)">#cache!</a></span>, <span class='object_link'><a href="Response.html#content_type=-instance_method" title="Utopia::Content::Response#content_type= (method)">#content_type=</a></span>, <span class='object_link'><a href="Response.html#do_not_cache!-instance_method" title="Utopia::Content::Response#do_not_cache! (method)">#do_not_cache!</a></span>, <span class='object_link'><a href="Response.html#lookup-instance_method" title="Utopia::Content::Response#lookup (method)">#lookup</a></span>, <span class='object_link'><a href="Response.html#to_a-instance_method" title="Utopia::Content::Response#to_a (method)">#to_a</a></span></p>
753
+ <div id="constructor_details" class="method_details_list">
754
+ <h2>Constructor Details</h2>
755
+
756
+ <div class="method_details first">
757
+ <h3 class="signature first" id="initialize-instance_method">
758
+
759
+ #<strong>initialize</strong>(request, attributes = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Utopia::Content::Document (class)">Document</a></span></tt>
760
+
761
+
762
+
763
+
764
+
765
+ </h3><div class="docstring">
766
+ <div class="discussion">
767
+ <p>Returns a new instance of Document</p>
768
+
769
+
770
+ </div>
771
+ </div>
772
+ <div class="tags">
773
+
774
+
775
+ </div><table class="source_code">
776
+ <tr>
777
+ <td>
778
+ <pre class="lines">
779
+
780
+
781
+ 44
782
+ 45
783
+ 46
784
+ 47
785
+ 48
786
+ 49
787
+ 50
788
+ 51
789
+ 52
790
+ 53
791
+ 54</pre>
792
+ </td>
793
+ <td>
794
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 44</span>
795
+
796
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
797
+ <span class='ivar'>@request</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span>
798
+
799
+ <span class='ivar'>@attributes</span> <span class='op'>=</span> <span class='id identifier rubyid_attributes'>attributes</span>
800
+
801
+ <span class='ivar'>@first</span> <span class='op'>=</span> <span class='kw'>nil</span>
802
+ <span class='ivar'>@current</span> <span class='op'>=</span> <span class='kw'>nil</span>
803
+ <span class='ivar'>@end_tags</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
804
+
805
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
806
+ <span class='kw'>end</span></pre>
807
+ </td>
808
+ </tr>
809
+ </table>
810
+ </div>
811
+
812
+ </div>
813
+
814
+ <div id="instance_attr_details" class="attr_details">
815
+ <h2>Instance Attribute Details</h2>
816
+
817
+
818
+ <span id=""></span>
819
+ <div class="method_details first">
820
+ <h3 class="signature first" id="attributes-instance_method">
821
+
822
+ #<strong>attributes</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
823
+
824
+
825
+
826
+
827
+
828
+ </h3><div class="docstring">
829
+ <div class="discussion">
830
+ <p>Per-document global attributes.</p>
831
+
832
+
833
+ </div>
834
+ </div>
835
+ <div class="tags">
836
+
837
+
838
+ </div><table class="source_code">
839
+ <tr>
840
+ <td>
841
+ <pre class="lines">
842
+
843
+
844
+ 87
845
+ 88
846
+ 89</pre>
847
+ </td>
848
+ <td>
849
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 87</span>
850
+
851
+ <span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
852
+ <span class='ivar'>@attributes</span>
853
+ <span class='kw'>end</span></pre>
854
+ </td>
855
+ </tr>
856
+ </table>
857
+ </div>
858
+
859
+
860
+ <span id=""></span>
861
+ <div class="method_details ">
862
+ <h3 class="signature " id="current-instance_method">
863
+
864
+ #<strong>current</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
865
+
866
+
867
+
868
+
869
+
870
+ </h3><div class="docstring">
871
+ <div class="discussion">
872
+ <p>The current state, represents a list from outer to inner most tag by traversing <span class='object_link'><a href="Document/State.html#parent-instance_method" title="Utopia::Content::Document::State#parent (method)">Utopia::Content::Document::State#parent</a></span>.
873
+ At any point in parsing markup, this is a list of the inner most tag,
874
+ then the next outer tag, etc.</p>
875
+
876
+
877
+ </div>
878
+ </div>
879
+ <div class="tags">
880
+
881
+
882
+ </div><table class="source_code">
883
+ <tr>
884
+ <td>
885
+ <pre class="lines">
886
+
887
+
888
+ 92
889
+ 93
890
+ 94</pre>
891
+ </td>
892
+ <td>
893
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 92</span>
894
+
895
+ <span class='kw'>def</span> <span class='id identifier rubyid_current'>current</span>
896
+ <span class='ivar'>@current</span>
897
+ <span class='kw'>end</span></pre>
898
+ </td>
899
+ </tr>
900
+ </table>
901
+ </div>
902
+
903
+
904
+ <span id=""></span>
905
+ <div class="method_details ">
906
+ <h3 class="signature " id="end_tags-instance_method">
907
+
908
+ #<strong>end_tags</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
909
+
910
+
911
+
912
+
913
+
914
+ </h3><div class="docstring">
915
+ <div class="discussion">
916
+ <p>End tags represents a list of execution order. This is the order that end tags
917
+ have appeared when evaluating nodes.</p>
918
+
919
+
920
+ </div>
921
+ </div>
922
+ <div class="tags">
923
+
924
+
925
+ </div><table class="source_code">
926
+ <tr>
927
+ <td>
928
+ <pre class="lines">
929
+
930
+
931
+ 100
932
+ 101
933
+ 102</pre>
934
+ </td>
935
+ <td>
936
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 100</span>
937
+
938
+ <span class='kw'>def</span> <span class='id identifier rubyid_end_tags'>end_tags</span>
939
+ <span class='ivar'>@end_tags</span>
940
+ <span class='kw'>end</span></pre>
941
+ </td>
942
+ </tr>
943
+ </table>
944
+ </div>
945
+
946
+
947
+ <span id=""></span>
948
+ <div class="method_details ">
949
+ <h3 class="signature " id="first-instance_method">
950
+
951
+ #<strong>first</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
952
+
953
+
954
+
955
+
956
+
957
+ </h3><div class="docstring">
958
+ <div class="discussion">
959
+ <p>The first <span class='object_link'><a href="Document/State.html" title="Utopia::Content::Document::State (class)">State</a></span> generated by rendering this document. It contains useful information
960
+ regarding the node and uri used to access the resource.</p>
961
+
962
+
963
+ </div>
964
+ </div>
965
+ <div class="tags">
966
+
967
+
968
+ </div><table class="source_code">
969
+ <tr>
970
+ <td>
971
+ <pre class="lines">
972
+
973
+
974
+ 96
975
+ 97
976
+ 98</pre>
977
+ </td>
978
+ <td>
979
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 96</span>
980
+
981
+ <span class='kw'>def</span> <span class='id identifier rubyid_first'>first</span>
982
+ <span class='ivar'>@first</span>
983
+ <span class='kw'>end</span></pre>
984
+ </td>
985
+ </tr>
986
+ </table>
987
+ </div>
988
+
989
+
990
+ <span id=""></span>
991
+ <div class="method_details ">
992
+ <h3 class="signature " id="request-instance_method">
993
+
994
+ #<strong>request</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
995
+
996
+
997
+
998
+
999
+
1000
+ </h3><div class="docstring">
1001
+ <div class="discussion">
1002
+ <p>The Rack::Request for this document.</p>
1003
+
1004
+
1005
+ </div>
1006
+ </div>
1007
+ <div class="tags">
1008
+
1009
+
1010
+ </div><table class="source_code">
1011
+ <tr>
1012
+ <td>
1013
+ <pre class="lines">
1014
+
1015
+
1016
+ 84
1017
+ 85
1018
+ 86</pre>
1019
+ </td>
1020
+ <td>
1021
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 84</span>
1022
+
1023
+ <span class='kw'>def</span> <span class='id identifier rubyid_request'>request</span>
1024
+ <span class='ivar'>@request</span>
1025
+ <span class='kw'>end</span></pre>
1026
+ </td>
1027
+ </tr>
1028
+ </table>
1029
+ </div>
1030
+
1031
+ </div>
1032
+
1033
+
1034
+ <div id="class_method_details" class="method_details_list">
1035
+ <h2>Class Method Details</h2>
1036
+
1037
+
1038
+ <div class="method_details first">
1039
+ <h3 class="signature first" id="render-class_method">
1040
+
1041
+ .<strong>render</strong>(node, request, attributes) &#x21d2; <tt>Object</tt>
1042
+
1043
+
1044
+
1045
+
1046
+
1047
+ </h3><table class="source_code">
1048
+ <tr>
1049
+ <td>
1050
+ <pre class="lines">
1051
+
1052
+
1053
+ 40
1054
+ 41
1055
+ 42</pre>
1056
+ </td>
1057
+ <td>
1058
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 40</span>
1059
+
1060
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
1061
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_render!'>render!</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
1062
+ <span class='kw'>end</span></pre>
1063
+ </td>
1064
+ </tr>
1065
+ </table>
1066
+ </div>
1067
+
1068
+ </div>
1069
+
1070
+ <div id="instance_method_details" class="method_details_list">
1071
+ <h2>Instance Method Details</h2>
1072
+
1073
+
1074
+ <div class="method_details first">
1075
+ <h3 class="signature first" id="[]-instance_method">
1076
+
1077
+ #<strong>[]</strong>(key) &#x21d2; <tt>Object</tt>
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+ </h3><table class="source_code">
1084
+ <tr>
1085
+ <td>
1086
+ <pre class="lines">
1087
+
1088
+
1089
+ 56
1090
+ 57
1091
+ 58</pre>
1092
+ </td>
1093
+ <td>
1094
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 56</span>
1095
+
1096
+ <span class='kw'>def</span> <span class='op'>[]</span> <span class='id identifier rubyid_key'>key</span>
1097
+ <span class='ivar'>@attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span>
1098
+ <span class='kw'>end</span></pre>
1099
+ </td>
1100
+ </tr>
1101
+ </table>
1102
+ </div>
1103
+
1104
+ <div class="method_details ">
1105
+ <h3 class="signature " id="[]=-instance_method">
1106
+
1107
+ #<strong>[]=</strong>(key, value) &#x21d2; <tt>Object</tt>
1108
+
1109
+
1110
+
1111
+
1112
+
1113
+ </h3><table class="source_code">
1114
+ <tr>
1115
+ <td>
1116
+ <pre class="lines">
1117
+
1118
+
1119
+ 60
1120
+ 61
1121
+ 62</pre>
1122
+ </td>
1123
+ <td>
1124
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 60</span>
1125
+
1126
+ <span class='kw'>def</span> <span class='op'>[]=</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span>
1127
+ <span class='ivar'>@attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
1128
+ <span class='kw'>end</span></pre>
1129
+ </td>
1130
+ </tr>
1131
+ </table>
1132
+ </div>
1133
+
1134
+ <div class="method_details ">
1135
+ <h3 class="signature " id="content-instance_method">
1136
+
1137
+ #<strong>content</strong> &#x21d2; <tt>Object</tt>
1138
+
1139
+
1140
+
1141
+
1142
+
1143
+ </h3><div class="docstring">
1144
+ <div class="discussion">
1145
+ <p>The content of the node</p>
1146
+
1147
+
1148
+ </div>
1149
+ </div>
1150
+ <div class="tags">
1151
+
1152
+
1153
+ </div><table class="source_code">
1154
+ <tr>
1155
+ <td>
1156
+ <pre class="lines">
1157
+
1158
+
1159
+ 215
1160
+ 216
1161
+ 217</pre>
1162
+ </td>
1163
+ <td>
1164
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 215</span>
1165
+
1166
+ <span class='kw'>def</span> <span class='id identifier rubyid_content'>content</span>
1167
+ <span class='ivar'>@end_tags</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span>
1168
+ <span class='kw'>end</span></pre>
1169
+ </td>
1170
+ </tr>
1171
+ </table>
1172
+ </div>
1173
+
1174
+ <div class="method_details ">
1175
+ <h3 class="signature " id="controller-instance_method">
1176
+
1177
+ #<strong>controller</strong> &#x21d2; <tt>Object</tt>
1178
+
1179
+
1180
+
1181
+
1182
+
1183
+ </h3><div class="docstring">
1184
+ <div class="discussion">
1185
+ <p>A helper method for accessing controller variables from view:</p>
1186
+
1187
+
1188
+ </div>
1189
+ </div>
1190
+ <div class="tags">
1191
+
1192
+
1193
+ </div><table class="source_code">
1194
+ <tr>
1195
+ <td>
1196
+ <pre class="lines">
1197
+
1198
+
1199
+ 71
1200
+ 72
1201
+ 73</pre>
1202
+ </td>
1203
+ <td>
1204
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 71</span>
1205
+
1206
+ <span class='kw'>def</span> <span class='id identifier rubyid_controller'>controller</span>
1207
+ <span class='ivar'>@controller</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../../Utopia.html" title="Utopia (module)">Utopia</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Controller.html" title="Utopia::Controller (class)">Controller</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_request'>request</span><span class='rbracket'>]</span>
1208
+ <span class='kw'>end</span></pre>
1209
+ </td>
1210
+ </tr>
1211
+ </table>
1212
+ </div>
1213
+
1214
+ <div class="method_details ">
1215
+ <h3 class="signature " id="localization-instance_method">
1216
+
1217
+ #<strong>localization</strong> &#x21d2; <tt>Object</tt>
1218
+
1219
+
1220
+
1221
+
1222
+
1223
+ </h3><table class="source_code">
1224
+ <tr>
1225
+ <td>
1226
+ <pre class="lines">
1227
+
1228
+
1229
+ 75
1230
+ 76
1231
+ 77</pre>
1232
+ </td>
1233
+ <td>
1234
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 75</span>
1235
+
1236
+ <span class='kw'>def</span> <span class='id identifier rubyid_localization'>localization</span>
1237
+ <span class='ivar'>@localization</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="../../Utopia.html" title="Utopia (module)">Utopia</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Localization.html" title="Utopia::Localization (class)">Localization</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_request'>request</span><span class='rbracket'>]</span>
1238
+ <span class='kw'>end</span></pre>
1239
+ </td>
1240
+ </tr>
1241
+ </table>
1242
+ </div>
1243
+
1244
+ <div class="method_details ">
1245
+ <h3 class="signature " id="lookup_node-instance_method">
1246
+
1247
+ #<strong>lookup_node</strong>(path) &#x21d2; <tt><span class='object_link'><a href="Node.html" title="Utopia::Content::Node (class)">Node</a></span></tt>
1248
+
1249
+
1250
+
1251
+
1252
+
1253
+ </h3><div class="docstring">
1254
+ <div class="discussion">
1255
+ <p>Lookup a node with the given path relative to the current node.</p>
1256
+
1257
+
1258
+ </div>
1259
+ </div>
1260
+ <div class="tags">
1261
+
1262
+ <p class="tag_title">Returns:</p>
1263
+ <ul class="return">
1264
+
1265
+ <li>
1266
+
1267
+
1268
+ <span class='type'>(<tt><span class='object_link'><a href="Node.html" title="Utopia::Content::Node (class)">Node</a></span></tt>)</span>
1269
+
1270
+
1271
+
1272
+ &mdash;
1273
+ <div class='inline'><p>The node if could be found.</p>
1274
+ </div>
1275
+
1276
+ </li>
1277
+
1278
+ </ul>
1279
+
1280
+ </div><table class="source_code">
1281
+ <tr>
1282
+ <td>
1283
+ <pre class="lines">
1284
+
1285
+
1286
+ 210
1287
+ 211
1288
+ 212</pre>
1289
+ </td>
1290
+ <td>
1291
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 210</span>
1292
+
1293
+ <span class='kw'>def</span> <span class='id identifier rubyid_lookup_node'>lookup_node</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
1294
+ <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_lookup_node'>lookup_node</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
1295
+ <span class='kw'>end</span></pre>
1296
+ </td>
1297
+ </tr>
1298
+ </table>
1299
+ </div>
1300
+
1301
+ <div class="method_details ">
1302
+ <h3 class="signature " id="lookup_tag-instance_method">
1303
+
1304
+ #<strong>lookup_tag</strong>(tag) &#x21d2; <tt><span class='object_link'><a href="Node.html" title="Utopia::Content::Node (class)">Node</a></span></tt>
1305
+
1306
+
1307
+
1308
+
1309
+
1310
+ </h3><div class="docstring">
1311
+ <div class="discussion">
1312
+ <p>Maps a tag to a node instance by asking the current node to lookup the tag name. This function is called for each tag and thus heavily affects performance.</p>
1313
+
1314
+
1315
+ </div>
1316
+ </div>
1317
+ <div class="tags">
1318
+
1319
+ <p class="tag_title">Returns:</p>
1320
+ <ul class="return">
1321
+
1322
+ <li>
1323
+
1324
+
1325
+ <span class='type'>(<tt><span class='object_link'><a href="Node.html" title="Utopia::Content::Node (class)">Node</a></span></tt>)</span>
1326
+
1327
+
1328
+
1329
+ &mdash;
1330
+ <div class='inline'><p>The node for the given tag.</p>
1331
+ </div>
1332
+
1333
+ </li>
1334
+
1335
+ </ul>
1336
+
1337
+ </div><table class="source_code">
1338
+ <tr>
1339
+ <td>
1340
+ <pre class="lines">
1341
+
1342
+
1343
+ 190
1344
+ 191
1345
+ 192
1346
+ 193
1347
+ 194
1348
+ 195
1349
+ 196
1350
+ 197
1351
+ 198
1352
+ 199
1353
+ 200
1354
+ 201
1355
+ 202
1356
+ 203
1357
+ 204
1358
+ 205
1359
+ 206</pre>
1360
+ </td>
1361
+ <td>
1362
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 190</span>
1363
+
1364
+ <span class='kw'>def</span> <span class='id identifier rubyid_lookup_tag'>lookup_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1365
+ <span class='comment'># result = tag
1366
+ </span> <span class='comment'>#
1367
+ </span> <span class='comment'># # This loop works from inner to outer tags, and updates the tag we are currently searching for based on any overrides:
1368
+ </span> <span class='comment'># @begin_tags.reverse_each do |state|
1369
+ </span> <span class='comment'># result = state.lookup(result)
1370
+ </span> <span class='comment'>#
1371
+ </span> <span class='comment'># return result if result.is_a?(Node)
1372
+ </span> <span class='comment'># end
1373
+ </span>
1374
+ <span class='comment'># This loop looks up a tag by asking the most embedded node to look it up based on tag name. This almost always only evaluates the top state:
1375
+ </span> <span class='ivar'>@end_tags</span><span class='period'>.</span><span class='id identifier rubyid_reverse_each'>reverse_each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_state'>state</span><span class='op'>|</span>
1376
+ <span class='kw'>return</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_lookup_tag'>lookup_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_state'>state</span><span class='period'>.</span><span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:lookup_tag</span><span class='rparen'>)</span>
1377
+ <span class='kw'>end</span>
1378
+
1379
+ <span class='kw'>return</span> <span class='kw'>nil</span>
1380
+ <span class='kw'>end</span></pre>
1381
+ </td>
1382
+ </tr>
1383
+ </table>
1384
+ </div>
1385
+
1386
+ <div class="method_details ">
1387
+ <h3 class="signature " id="parent-instance_method">
1388
+
1389
+ #<strong>parent</strong> &#x21d2; <tt>Object</tt>
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+ </h3><table class="source_code">
1396
+ <tr>
1397
+ <td>
1398
+ <pre class="lines">
1399
+
1400
+
1401
+ 219
1402
+ 220
1403
+ 221</pre>
1404
+ </td>
1405
+ <td>
1406
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 219</span>
1407
+
1408
+ <span class='kw'>def</span> <span class='id identifier rubyid_parent'>parent</span>
1409
+ <span class='ivar'>@end_tags</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>2</span><span class='rbracket'>]</span>
1410
+ <span class='kw'>end</span></pre>
1411
+ </td>
1412
+ </tr>
1413
+ </table>
1414
+ </div>
1415
+
1416
+ <div class="method_details ">
1417
+ <h3 class="signature " id="parse_markup-instance_method">
1418
+
1419
+ #<strong>parse_markup</strong>(markup) &#x21d2; <tt>Object</tt>
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+ </h3><table class="source_code">
1426
+ <tr>
1427
+ <td>
1428
+ <pre class="lines">
1429
+
1430
+
1431
+ 79
1432
+ 80
1433
+ 81</pre>
1434
+ </td>
1435
+ <td>
1436
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 79</span>
1437
+
1438
+ <span class='kw'>def</span> <span class='id identifier rubyid_parse_markup'>parse_markup</span><span class='lparen'>(</span><span class='id identifier rubyid_markup'>markup</span><span class='rparen'>)</span>
1439
+ <span class='const'><span class='object_link'><a href="MarkupParser.html" title="Utopia::Content::MarkupParser (class)">MarkupParser</a></span></span><span class='period'>.</span><span class='id identifier rubyid_parse'><span class='object_link'><a href="MarkupParser.html#parse-class_method" title="Utopia::Content::MarkupParser.parse (method)">parse</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_markup'>markup</span><span class='comma'>,</span> <span class='kw'>self</span><span class='rparen'>)</span>
1440
+ <span class='kw'>end</span></pre>
1441
+ </td>
1442
+ </tr>
1443
+ </table>
1444
+ </div>
1445
+
1446
+ <div class="method_details ">
1447
+ <h3 class="signature " id="render!-instance_method">
1448
+
1449
+ #<strong>render!</strong>(node, attributes) &#x21d2; <tt>Object</tt>
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+ </h3><table class="source_code">
1456
+ <tr>
1457
+ <td>
1458
+ <pre class="lines">
1459
+
1460
+
1461
+ 64
1462
+ 65
1463
+ 66
1464
+ 67
1465
+ 68</pre>
1466
+ </td>
1467
+ <td>
1468
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 64</span>
1469
+
1470
+ <span class='kw'>def</span> <span class='id identifier rubyid_render!'>render!</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
1471
+ <span class='ivar'>@body</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_render_node'>render_node</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
1472
+
1473
+ <span class='kw'>return</span> <span class='kw'>self</span>
1474
+ <span class='kw'>end</span></pre>
1475
+ </td>
1476
+ </tr>
1477
+ </table>
1478
+ </div>
1479
+
1480
+ <div class="method_details ">
1481
+ <h3 class="signature " id="render_node-instance_method">
1482
+
1483
+ #<strong>render_node</strong>(node, attributes = {}) &#x21d2; <tt>Object</tt>
1484
+
1485
+
1486
+
1487
+
1488
+
1489
+ </h3><table class="source_code">
1490
+ <tr>
1491
+ <td>
1492
+ <pre class="lines">
1493
+
1494
+
1495
+ 178
1496
+ 179
1497
+ 180
1498
+ 181
1499
+ 182
1500
+ 183
1501
+ 184
1502
+ 185
1503
+ 186</pre>
1504
+ </td>
1505
+ <td>
1506
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 178</span>
1507
+
1508
+ <span class='kw'>def</span> <span class='id identifier rubyid_render_node'>render_node</span><span class='lparen'>(</span><span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1509
+ <span class='ivar'>@current</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Document/State.html" title="Utopia::Content::Document::State (class)">State</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Document/State.html#initialize-instance_method" title="Utopia::Content::Document::State#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@current</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
1510
+
1511
+ <span class='comment'># We keep track of the first thing rendered by this document.
1512
+ </span> <span class='ivar'>@first</span> <span class='op'>||=</span> <span class='ivar'>@current</span>
1513
+
1514
+ <span class='comment'># This returns the content of rendering the tag:
1515
+ </span> <span class='kw'>return</span> <span class='id identifier rubyid_tag_end'>tag_end</span>
1516
+ <span class='kw'>end</span></pre>
1517
+ </td>
1518
+ </tr>
1519
+ </table>
1520
+ </div>
1521
+
1522
+ <div class="method_details ">
1523
+ <h3 class="signature " id="tag-instance_method">
1524
+
1525
+ #<strong>tag</strong>(name, attributes = {}) &#x21d2; <tt>Object</tt>
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+ </h3><table class="source_code">
1532
+ <tr>
1533
+ <td>
1534
+ <pre class="lines">
1535
+
1536
+
1537
+ 102
1538
+ 103
1539
+ 104
1540
+ 105
1541
+ 106
1542
+ 107
1543
+ 108
1544
+ 109
1545
+ 110
1546
+ 111
1547
+ 112
1548
+ 113</pre>
1549
+ </td>
1550
+ <td>
1551
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 102</span>
1552
+
1553
+ <span class='kw'>def</span> <span class='id identifier rubyid_tag'>tag</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1554
+ <span class='comment'># If we provide a block which can give inner data, we are not self-closing.
1555
+ </span> <span class='id identifier rubyid_tag'>tag</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Content.html#Tag-constant" title="Utopia::Content::Tag (constant)">Tag</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../Content.html#initialize-instance_method" title="Utopia::Content#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>!</span><span class='id identifier rubyid_block_given?'>block_given?</span><span class='comma'>,</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
1556
+
1557
+ <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1558
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='id identifier rubyid_tag_begin'>tag_begin</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1559
+ <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span>
1560
+ <span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1561
+ <span class='kw'>else</span>
1562
+ <span class='id identifier rubyid_tag_complete'>tag_complete</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
1563
+ <span class='kw'>end</span>
1564
+ <span class='kw'>end</span></pre>
1565
+ </td>
1566
+ </tr>
1567
+ </table>
1568
+ </div>
1569
+
1570
+ <div class="method_details ">
1571
+ <h3 class="signature " id="tag_begin-instance_method">
1572
+
1573
+ #<strong>tag_begin</strong>(tag, node = nil) &#x21d2; <tt>Object</tt>
1574
+
1575
+
1576
+
1577
+
1578
+
1579
+ </h3><table class="source_code">
1580
+ <tr>
1581
+ <td>
1582
+ <pre class="lines">
1583
+
1584
+
1585
+ 126
1586
+ 127
1587
+ 128
1588
+ 129
1589
+ 130
1590
+ 131
1591
+ 132
1592
+ 133
1593
+ 134
1594
+ 135
1595
+ 136
1596
+ 137
1597
+ 138
1598
+ 139
1599
+ 140
1600
+ 141
1601
+ 142</pre>
1602
+ </td>
1603
+ <td>
1604
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 126</span>
1605
+
1606
+ <span class='kw'>def</span> <span class='id identifier rubyid_tag_begin'>tag_begin</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1607
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>||=</span> <span class='id identifier rubyid_lookup_tag'>lookup_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1608
+
1609
+ <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span>
1610
+ <span class='ivar'>@current</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Document/State.html" title="Utopia::Content::Document::State (class)">State</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Document/State.html#initialize-instance_method" title="Utopia::Content::Document::State#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@current</span><span class='comma'>,</span> <span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
1611
+
1612
+ <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_tag_begin'>tag_begin</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id identifier rubyid_state'>state</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:tag_begin</span><span class='rparen'>)</span>
1613
+
1614
+ <span class='kw'>return</span> <span class='id identifier rubyid_node'>node</span>
1615
+ <span class='kw'>end</span>
1616
+
1617
+ <span class='comment'># raise ArgumentError.new(&quot;tag_begin: #{tag} is tag.self_closed?&quot;) if tag.self_closed?
1618
+ </span>
1619
+ <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_tag_begin'>tag_begin</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1620
+
1621
+ <span class='kw'>return</span> <span class='kw'>nil</span>
1622
+ <span class='kw'>end</span></pre>
1623
+ </td>
1624
+ </tr>
1625
+ </table>
1626
+ </div>
1627
+
1628
+ <div class="method_details ">
1629
+ <h3 class="signature " id="tag_complete-instance_method">
1630
+
1631
+ #<strong>tag_complete</strong>(tag, node = nil) &#x21d2; <tt>Object</tt>
1632
+
1633
+
1634
+
1635
+
1636
+
1637
+ </h3><table class="source_code">
1638
+ <tr>
1639
+ <td>
1640
+ <pre class="lines">
1641
+
1642
+
1643
+ 115
1644
+ 116
1645
+ 117
1646
+ 118
1647
+ 119
1648
+ 120
1649
+ 121
1650
+ 122
1651
+ 123
1652
+ 124</pre>
1653
+ </td>
1654
+ <td>
1655
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 115</span>
1656
+
1657
+ <span class='kw'>def</span> <span class='id identifier rubyid_tag_complete'>tag_complete</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1658
+ <span class='id identifier rubyid_node'>node</span> <span class='op'>||=</span> <span class='id identifier rubyid_lookup_tag'>lookup_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1659
+
1660
+ <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span>
1661
+ <span class='id identifier rubyid_tag_begin'>tag_begin</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='id identifier rubyid_node'>node</span><span class='rparen'>)</span>
1662
+ <span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1663
+ <span class='kw'>else</span>
1664
+ <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_tag_complete'>tag_complete</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1665
+ <span class='kw'>end</span>
1666
+ <span class='kw'>end</span></pre>
1667
+ </td>
1668
+ </tr>
1669
+ </table>
1670
+ </div>
1671
+
1672
+ <div class="method_details ">
1673
+ <h3 class="signature " id="tag_end-instance_method">
1674
+
1675
+ #<strong>tag_end</strong>(tag = nil) &#x21d2; <tt>Object</tt>
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+ </h3><table class="source_code">
1682
+ <tr>
1683
+ <td>
1684
+ <pre class="lines">
1685
+
1686
+
1687
+ 154
1688
+ 155
1689
+ 156
1690
+ 157
1691
+ 158
1692
+ 159
1693
+ 160
1694
+ 161
1695
+ 162
1696
+ 163
1697
+ 164
1698
+ 165
1699
+ 166
1700
+ 167
1701
+ 168
1702
+ 169
1703
+ 170
1704
+ 171
1705
+ 172
1706
+ 173
1707
+ 174
1708
+ 175
1709
+ 176</pre>
1710
+ </td>
1711
+ <td>
1712
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 154</span>
1713
+
1714
+ <span class='kw'>def</span> <span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1715
+ <span class='comment'># Determine if the current state contains tags that need to be completed, or if the state itself is finished.
1716
+ </span> <span class='kw'>if</span> <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1717
+ <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span> <span class='op'>=</span> <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_node'>node</span>
1718
+ <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='ivar'>@current</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:tag_end</span><span class='rparen'>)</span>
1719
+ <span class='kw'>end</span>
1720
+
1721
+ <span class='ivar'>@end_tags</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@current</span>
1722
+ <span class='id identifier rubyid_buffer'>buffer</span> <span class='op'>=</span> <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span>
1723
+
1724
+ <span class='ivar'>@current</span> <span class='op'>=</span> <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_parent'>parent</span>
1725
+ <span class='ivar'>@end_tags</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span>
1726
+
1727
+ <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_buffer'>buffer</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@current</span>
1728
+
1729
+ <span class='kw'>return</span> <span class='id identifier rubyid_buffer'>buffer</span>
1730
+ <span class='kw'>else</span>
1731
+ <span class='comment'># raise ArgumentError.new(&quot;tag_begin: #{tag} is tag.self_closed?&quot;) if tag.self_closed?
1732
+ </span> <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_tag_end'>tag_end</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span>
1733
+ <span class='kw'>end</span>
1734
+
1735
+ <span class='kw'>return</span> <span class='kw'>nil</span>
1736
+ <span class='kw'>end</span></pre>
1737
+ </td>
1738
+ </tr>
1739
+ </table>
1740
+ </div>
1741
+
1742
+ <div class="method_details ">
1743
+ <h3 class="signature " id="text-instance_method">
1744
+
1745
+ #<strong>text</strong>(string) &#x21d2; <tt>Object</tt>
1746
+
1747
+
1748
+
1749
+
1750
+
1751
+ </h3><table class="source_code">
1752
+ <tr>
1753
+ <td>
1754
+ <pre class="lines">
1755
+
1756
+
1757
+ 150
1758
+ 151
1759
+ 152</pre>
1760
+ </td>
1761
+ <td>
1762
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 150</span>
1763
+
1764
+ <span class='kw'>def</span> <span class='id identifier rubyid_text'>text</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
1765
+ <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
1766
+ <span class='kw'>end</span></pre>
1767
+ </td>
1768
+ </tr>
1769
+ </table>
1770
+ </div>
1771
+
1772
+ <div class="method_details ">
1773
+ <h3 class="signature " id="write-instance_method">
1774
+
1775
+ #<strong>write</strong>(string) &#x21d2; <tt>Object</tt>
1776
+
1777
+
1778
+
1779
+ <span class="aliases">Also known as:
1780
+ <span class="names"><span id='cdata-instance_method'>cdata</span></span>
1781
+ </span>
1782
+
1783
+
1784
+
1785
+ </h3><table class="source_code">
1786
+ <tr>
1787
+ <td>
1788
+ <pre class="lines">
1789
+
1790
+
1791
+ 144
1792
+ 145
1793
+ 146</pre>
1794
+ </td>
1795
+ <td>
1796
+ <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 144</span>
1797
+
1798
+ <span class='kw'>def</span> <span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
1799
+ <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
1800
+ <span class='kw'>end</span></pre>
1801
+ </td>
1802
+ </tr>
1803
+ </table>
1804
+ </div>
1805
+
1806
+ </div>
1807
+
1808
+ </div>
1809
+
1810
+ <div id="footer">
1811
+ Generated on Sat Mar 24 21:17:21 2018 by
1812
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1813
+ 0.9.12 (ruby-2.5.0).
1814
+ </div>
1815
+
1816
+ </div>
1817
+ </body>
1818
+ </html>