utopia 2.13.4 → 2.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (353) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/development.yml +62 -0
  3. data/README.md +3 -5
  4. data/bake/utopia/yarn.rb +4 -2
  5. data/docs/_components/jquery-litebox/jquery.litebox.css +23 -0
  6. data/docs/_components/jquery-litebox/jquery.litebox.gallery.css +48 -0
  7. data/docs/_components/jquery-litebox/jquery.litebox.js +30 -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.bash.css +4 -10
  10. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +5 -2
  11. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +8 -8
  12. data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +1 -1
  13. data/docs/_components/jquery-syntax/base/jquery.syntax.core.css +43 -47
  14. data/docs/_components/jquery-syntax/jquery.syntax.brush.apache.js +3 -41
  15. data/docs/_components/jquery-syntax/jquery.syntax.brush.applescript.js +5 -57
  16. data/docs/_components/jquery-syntax/jquery.syntax.brush.assembly.js +3 -37
  17. data/docs/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +4 -67
  18. data/docs/_components/jquery-syntax/jquery.syntax.brush.bash.js +2 -33
  19. data/docs/_components/jquery-syntax/jquery.syntax.brush.basic.js +5 -51
  20. data/docs/_components/jquery-syntax/jquery.syntax.brush.clang.js +5 -89
  21. data/docs/_components/jquery-syntax/jquery.syntax.brush.csharp.js +4 -47
  22. data/docs/_components/jquery-syntax/jquery.syntax.brush.css.js +5 -80
  23. data/docs/_components/jquery-syntax/jquery.syntax.brush.diff.js +2 -24
  24. data/docs/_components/jquery-syntax/jquery.syntax.brush.go.js +3 -47
  25. data/docs/_components/jquery-syntax/jquery.syntax.brush.haskell.js +3 -45
  26. data/docs/_components/jquery-syntax/jquery.syntax.brush.html.js +4 -66
  27. data/docs/_components/jquery-syntax/jquery.syntax.brush.io.js +3 -45
  28. data/docs/_components/jquery-syntax/jquery.syntax.brush.java.js +4 -45
  29. data/docs/_components/jquery-syntax/jquery.syntax.brush.javascript.js +3 -40
  30. data/docs/_components/jquery-syntax/jquery.syntax.brush.kai.js +2 -29
  31. data/docs/_components/jquery-syntax/jquery.syntax.brush.lisp.js +2 -34
  32. data/docs/_components/jquery-syntax/jquery.syntax.brush.lua.js +3 -44
  33. data/docs/_components/jquery-syntax/jquery.syntax.brush.nginx.js +2 -31
  34. data/docs/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +4 -73
  35. data/docs/_components/jquery-syntax/jquery.syntax.brush.ooc.js +4 -46
  36. data/docs/_components/jquery-syntax/jquery.syntax.brush.pascal.js +4 -51
  37. data/docs/_components/jquery-syntax/jquery.syntax.brush.perl5.js +3 -52
  38. data/docs/_components/jquery-syntax/jquery.syntax.brush.php-script.js +4 -48
  39. data/docs/_components/jquery-syntax/jquery.syntax.brush.php.js +2 -15
  40. data/docs/_components/jquery-syntax/jquery.syntax.brush.plain.js +2 -10
  41. data/docs/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +3 -43
  42. data/docs/_components/jquery-syntax/jquery.syntax.brush.python.js +5 -44
  43. data/docs/_components/jquery-syntax/jquery.syntax.brush.ruby.js +5 -77
  44. data/docs/_components/jquery-syntax/jquery.syntax.brush.scala.js +4 -44
  45. data/docs/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +2 -29
  46. data/docs/_components/jquery-syntax/jquery.syntax.brush.sql.js +4 -31
  47. data/docs/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +3 -57
  48. data/docs/_components/jquery-syntax/jquery.syntax.brush.swift.js +3 -55
  49. data/docs/_components/jquery-syntax/jquery.syntax.brush.trenni.js +2 -35
  50. data/docs/_components/jquery-syntax/jquery.syntax.brush.xml.js +4 -50
  51. data/docs/_components/jquery-syntax/jquery.syntax.brush.yaml.js +2 -29
  52. data/docs/_components/jquery-syntax/jquery.syntax.cache.js +7 -65
  53. data/docs/_components/jquery-syntax/jquery.syntax.core.js +34 -1098
  54. data/docs/_components/jquery-syntax/jquery.syntax.editor.js +11 -291
  55. data/docs/_components/jquery-syntax/jquery.syntax.js +8 -258
  56. data/docs/_components/jquery/jquery.js +1678 -1026
  57. data/docs/_components/jquery/jquery.min.js +2 -4
  58. data/docs/_components/jquery/jquery.min.map +1 -1
  59. data/docs/_components/jquery/jquery.slim.js +1602 -932
  60. data/docs/_components/jquery/jquery.slim.min.js +2 -4
  61. data/docs/_components/jquery/jquery.slim.min.map +1 -1
  62. data/docs/_static/icon.png +0 -0
  63. data/docs/_static/site.css +100 -114
  64. data/docs/{wiki/development-environment-setup.html → development-environment-setup/index.html} +9 -15
  65. data/docs/{wiki/faq/what-is-xnode.html → faq/what-is-xnode/index.html} +9 -15
  66. data/docs/index.html +25 -31
  67. data/docs/javascript/index.html +108 -0
  68. data/docs/{wiki/middleware/content.html → middleware/content/index.html} +9 -15
  69. data/docs/{wiki/middleware/controller/actions.html → middleware/controller/actions/index.html} +11 -17
  70. data/docs/{wiki/middleware/controller.html → middleware/controller/index.html} +9 -15
  71. data/docs/{wiki/middleware/controller/rewrite.html → middleware/controller/rewrite/index.html} +9 -15
  72. data/docs/{wiki/middleware/localization.html → middleware/localization/index.html} +9 -15
  73. data/docs/{wiki/middleware/redirection.html → middleware/redirection/index.html} +9 -15
  74. data/docs/{wiki/middleware/session.html → middleware/session/index.html} +9 -15
  75. data/docs/{wiki/middleware/static.html → middleware/static/index.html} +9 -15
  76. data/docs/{wiki/server-setup.html → server-setup/index.html} +11 -42
  77. data/docs/{wiki/testing.html → testing/index.html} +10 -16
  78. data/docs/{wiki/updating-utopia.html → updating-utopia/index.html} +9 -15
  79. data/docs/{wiki/your-first-page.html → your-first-page/index.html} +11 -17
  80. data/lib/utopia/content.rb +23 -19
  81. data/lib/utopia/content/link.rb +29 -34
  82. data/lib/utopia/content/links.rb +185 -123
  83. data/lib/utopia/content/node.rb +13 -17
  84. data/lib/utopia/content/response.rb +2 -2
  85. data/lib/utopia/localization.rb +18 -10
  86. data/lib/utopia/path.rb +36 -32
  87. data/lib/utopia/version.rb +1 -1
  88. data/setup/site/Gemfile +7 -5
  89. data/spec/utopia/command_spec.rb +1 -1
  90. data/spec/utopia/content/links/bar/index.xnode +0 -0
  91. data/spec/utopia/content/links/bar/parent/child/index.en.xnode +0 -0
  92. data/spec/utopia/content/links/bar/parent/child/index.ja.xnode +0 -0
  93. data/spec/utopia/content/links/bar/parent/links.yaml +2 -0
  94. data/spec/utopia/content/links/index.xnode +0 -0
  95. data/spec/utopia/content/links/links.yaml +10 -1
  96. data/spec/utopia/content/links/redirect/links.yaml +2 -0
  97. data/spec/utopia/content/links_spec.rb +160 -43
  98. data/spec/utopia/content/localized/links.yaml +2 -5
  99. data/spec/utopia/content/node_spec.rb +1 -1
  100. data/spec/utopia/path_spec.rb +50 -5
  101. data/wiki/Gemfile +9 -0
  102. data/wiki/config.ru +7 -0
  103. data/{documentation/pages/wiki/development-environment-setup/content.md → wiki/pages/development-environment-setup/index.md} +0 -0
  104. data/wiki/pages/faq/links.yaml +2 -0
  105. data/{documentation/pages/wiki/faq/what-is-xnode/content.md → wiki/pages/faq/what-is-xnode/index.md} +1 -1
  106. data/wiki/pages/faq/what-is-xnode/links.yaml +2 -0
  107. data/{documentation/pages/wiki/content.md → wiki/pages/index.md} +2 -2
  108. data/{documentation/pages/wiki/javascript/content.md → wiki/pages/javascript/index.md} +15 -13
  109. data/wiki/pages/javascript/links.yaml +2 -0
  110. data/wiki/pages/links.yaml +2 -0
  111. data/{documentation/pages/wiki/middleware/content/content.md → wiki/pages/middleware/content/index.md} +0 -0
  112. data/{documentation/pages/wiki/middleware/controller/actions/content.md → wiki/pages/middleware/controller/actions/index.md} +2 -2
  113. data/{documentation/pages/wiki/middleware/controller/content.md → wiki/pages/middleware/controller/index.md} +0 -0
  114. data/{documentation/pages/wiki → wiki/pages}/middleware/controller/links.yaml +0 -0
  115. data/{documentation/pages/wiki/middleware/controller/rewrite/content.md → wiki/pages/middleware/controller/rewrite/index.md} +0 -0
  116. data/{documentation/pages/wiki/middleware/localization/content.md → wiki/pages/middleware/localization/index.md} +0 -0
  117. data/{documentation/pages/wiki/middleware/redirection/content.md → wiki/pages/middleware/redirection/index.md} +0 -0
  118. data/{documentation/pages/wiki/middleware/session/content.md → wiki/pages/middleware/session/index.md} +0 -0
  119. data/{documentation/pages/wiki/middleware/static/content.md → wiki/pages/middleware/static/index.md} +0 -0
  120. data/{documentation/pages/wiki/server-setup/content.md → wiki/pages/server-setup/index.md} +0 -0
  121. data/{documentation/pages/wiki/testing/content.md → wiki/pages/testing/index.md} +0 -0
  122. data/{documentation/pages/wiki/updating-utopia/content.md → wiki/pages/updating-utopia/index.md} +0 -0
  123. data/{documentation/pages/wiki/your-first-page/content.md → wiki/pages/your-first-page/index.md} +2 -2
  124. metadata +56 -263
  125. data/.travis.yml +0 -28
  126. data/Rakefile +0 -33
  127. data/docs/_components/jquery/core.js +0 -482
  128. data/docs/_static/utopia-background.svg +0 -1
  129. data/docs/_static/utopia.svg +0 -1
  130. data/docs/code/Utopia.html +0 -517
  131. data/docs/code/Utopia/Basename.html +0 -654
  132. data/docs/code/Utopia/Bootstrap.html +0 -538
  133. data/docs/code/Utopia/Command.html +0 -213
  134. data/docs/code/Utopia/Command/Environment.html +0 -321
  135. data/docs/code/Utopia/Command/Server.html +0 -214
  136. data/docs/code/Utopia/Command/Server/Create.html +0 -222
  137. data/docs/code/Utopia/Command/Server/Environment.html +0 -236
  138. data/docs/code/Utopia/Command/Server/Update.html +0 -317
  139. data/docs/code/Utopia/Command/Setup.html +0 -145
  140. data/docs/code/Utopia/Command/Setup/Server.html +0 -298
  141. data/docs/code/Utopia/Command/Setup/Site.html +0 -180
  142. data/docs/code/Utopia/Command/Site.html +0 -285
  143. data/docs/code/Utopia/Command/Site/Create.html +0 -324
  144. data/docs/code/Utopia/Command/Site/Update.html +0 -407
  145. data/docs/code/Utopia/Command/Top.html +0 -279
  146. data/docs/code/Utopia/Content.html +0 -832
  147. data/docs/code/Utopia/Content/Document.html +0 -1822
  148. data/docs/code/Utopia/Content/Document/State.html +0 -1220
  149. data/docs/code/Utopia/Content/Link.html +0 -1286
  150. data/docs/code/Utopia/Content/Links.html +0 -847
  151. data/docs/code/Utopia/Content/MarkupParser.html +0 -881
  152. data/docs/code/Utopia/Content/MarkupParser/ParsedTag.html +0 -422
  153. data/docs/code/Utopia/Content/MarkupParser/UnbalancedTagError.html +0 -615
  154. data/docs/code/Utopia/Content/Namespace.html +0 -485
  155. data/docs/code/Utopia/Content/Node.html +0 -1188
  156. data/docs/code/Utopia/Content/Node/Context.html +0 -938
  157. data/docs/code/Utopia/Content/Response.html +0 -813
  158. data/docs/code/Utopia/Content/SymbolicHash.html +0 -419
  159. data/docs/code/Utopia/Content/Tag.html +0 -399
  160. data/docs/code/Utopia/Content/Tags.html +0 -136
  161. data/docs/code/Utopia/Content/Tags/ContentTag.html +0 -187
  162. data/docs/code/Utopia/Content/Tags/DeferredTag.html +0 -193
  163. data/docs/code/Utopia/Content/Tags/Library.html +0 -333
  164. data/docs/code/Utopia/Content/Tags/NodeTag.html +0 -193
  165. data/docs/code/Utopia/Content/UnbalancedTagError.html +0 -298
  166. data/docs/code/Utopia/ContentLength.html +0 -343
  167. data/docs/code/Utopia/Controller.html +0 -907
  168. data/docs/code/Utopia/Controller/Actions.html +0 -289
  169. data/docs/code/Utopia/Controller/Actions/Action.html +0 -984
  170. data/docs/code/Utopia/Controller/Actions/ClassMethods.html +0 -442
  171. data/docs/code/Utopia/Controller/Base.html +0 -1216
  172. data/docs/code/Utopia/Controller/Respond.html +0 -293
  173. data/docs/code/Utopia/Controller/Respond/ClassMethods.html +0 -236
  174. data/docs/code/Utopia/Controller/Respond/Converter.html +0 -256
  175. data/docs/code/Utopia/Controller/Respond/Converter/Callback.html +0 -484
  176. data/docs/code/Utopia/Controller/Respond/Converter/ToJSON.html +0 -381
  177. data/docs/code/Utopia/Controller/Respond/Passthrough.html +0 -297
  178. data/docs/code/Utopia/Controller/Respond/Responder.html +0 -535
  179. data/docs/code/Utopia/Controller/Rewrite.html +0 -290
  180. data/docs/code/Utopia/Controller/Rewrite/ClassMethods.html +0 -242
  181. data/docs/code/Utopia/Controller/Rewrite/ExtractPrefixRule.html +0 -364
  182. data/docs/code/Utopia/Controller/Rewrite/Rewriter.html +0 -464
  183. data/docs/code/Utopia/Controller/Rewrite/Rule.html +0 -209
  184. data/docs/code/Utopia/Controller/Variables.html +0 -550
  185. data/docs/code/Utopia/Controllers.html +0 -244
  186. data/docs/code/Utopia/Exceptions.html +0 -127
  187. data/docs/code/Utopia/Exceptions/Handler.html +0 -526
  188. data/docs/code/Utopia/Exceptions/Mailer.html +0 -482
  189. data/docs/code/Utopia/Extensions.html +0 -117
  190. data/docs/code/Utopia/Extensions/ArraySplit.html +0 -183
  191. data/docs/code/Utopia/Extensions/DateTimeComparison.html +0 -193
  192. data/docs/code/Utopia/Extensions/TimeDateComparison.html +0 -193
  193. data/docs/code/Utopia/HTTP.html +0 -250
  194. data/docs/code/Utopia/HTTP/Status.html +0 -415
  195. data/docs/code/Utopia/Locale.html +0 -606
  196. data/docs/code/Utopia/Localization.html +0 -1241
  197. data/docs/code/Utopia/Localization/Wrapper.html +0 -459
  198. data/docs/code/Utopia/Logger.html +0 -205
  199. data/docs/code/Utopia/Logger/CompactFormatter.html +0 -335
  200. data/docs/code/Utopia/Path.html +0 -3310
  201. data/docs/code/Utopia/Path/Matcher.html +0 -518
  202. data/docs/code/Utopia/Path/Matcher/MatchData.html +0 -475
  203. data/docs/code/Utopia/Redirection.html +0 -151
  204. data/docs/code/Utopia/Redirection/ClientRedirect.html +0 -717
  205. data/docs/code/Utopia/Redirection/DirectoryIndex.html +0 -298
  206. data/docs/code/Utopia/Redirection/Errors.html +0 -476
  207. data/docs/code/Utopia/Redirection/Moved.html +0 -312
  208. data/docs/code/Utopia/Redirection/RequestFailure.html +0 -226
  209. data/docs/code/Utopia/Redirection/Rewrite.html +0 -296
  210. data/docs/code/Utopia/Session.html +0 -889
  211. data/docs/code/Utopia/Session/LazyHash.html +0 -859
  212. data/docs/code/Utopia/Setup.html +0 -970
  213. data/docs/code/Utopia/Static.html +0 -696
  214. data/docs/code/Utopia/Static/LocalFile.html +0 -1104
  215. data/docs/code/Utopia/Static/MimeTypeLoader.html +0 -541
  216. data/docs/code/Utopia/Static/MimeTypeLoader/ExpansionError.html +0 -124
  217. data/docs/code/Utopia/Tags.html +0 -115
  218. data/docs/code/Utopia/Tags/Environment.html +0 -314
  219. data/docs/code/Utopia/Tags/EnvironmentTag.html +0 -314
  220. data/docs/code/Utopia/Tags/Library.html +0 -340
  221. data/docs/code/_index.html +0 -758
  222. data/docs/code/class_list.html +0 -51
  223. data/docs/code/css/common.css +0 -1
  224. data/docs/code/css/full_list.css +0 -58
  225. data/docs/code/css/style.css +0 -496
  226. data/docs/code/file.README.html +0 -171
  227. data/docs/code/file_list.html +0 -56
  228. data/docs/code/frames.html +0 -17
  229. data/docs/code/index.html +0 -171
  230. data/docs/code/js/app.js +0 -292
  231. data/docs/code/js/full_list.js +0 -216
  232. data/docs/code/js/jquery.js +0 -4
  233. data/docs/code/materials/utopia.png +0 -0
  234. data/docs/code/materials/utopia.svg +0 -1
  235. data/docs/code/method_list.html +0 -3443
  236. data/docs/code/top-level-namespace.html +0 -110
  237. data/docs/wiki.html +0 -92
  238. data/docs/wiki/development-environment-setup/index.html +0 -60
  239. data/docs/wiki/edit.html +0 -103
  240. data/docs/wiki/faq/what-is-xnode/index.html +0 -79
  241. data/docs/wiki/javascript.html +0 -153
  242. data/docs/wiki/javascript/index.html +0 -153
  243. data/docs/wiki/middleware/content/index.html +0 -64
  244. data/docs/wiki/middleware/controller/actions/index.html +0 -117
  245. data/docs/wiki/middleware/controller/actions/rewrite/index.html +0 -48
  246. data/docs/wiki/middleware/controller/index.html +0 -104
  247. data/docs/wiki/middleware/controller/rewrite/index.html +0 -111
  248. data/docs/wiki/middleware/localization/index.html +0 -59
  249. data/docs/wiki/middleware/redirection/index.html +0 -61
  250. data/docs/wiki/middleware/session/index.html +0 -71
  251. data/docs/wiki/middleware/static/index.html +0 -57
  252. data/docs/wiki/server-setup/index.html +0 -118
  253. data/docs/wiki/testing/index.html +0 -59
  254. data/docs/wiki/updating-utopia/index.html +0 -108
  255. data/docs/wiki/your-first-page/index.html +0 -80
  256. data/documentation/.rspec +0 -4
  257. data/documentation/.yarnrc +0 -1
  258. data/documentation/Gemfile +0 -19
  259. data/documentation/Guardfile +0 -9
  260. data/documentation/Rakefile +0 -9
  261. data/documentation/config.ru +0 -41
  262. data/documentation/config/README.md +0 -7
  263. data/documentation/config/environment.rb +0 -12
  264. data/documentation/lib/readme.txt +0 -1
  265. data/documentation/pages/_editor.xnode +0 -64
  266. data/documentation/pages/_heading.xnode +0 -2
  267. data/documentation/pages/_page.xnode +0 -40
  268. data/documentation/pages/errors/exception.xnode +0 -5
  269. data/documentation/pages/errors/file-not-found.xnode +0 -5
  270. data/documentation/pages/links.yaml +0 -2
  271. data/documentation/pages/wiki/_listing.xnode +0 -32
  272. data/documentation/pages/wiki/_navigation.xnode +0 -15
  273. data/documentation/pages/wiki/controller.rb +0 -48
  274. data/documentation/pages/wiki/edit.xnode +0 -10
  275. data/documentation/pages/wiki/links.yaml +0 -6
  276. data/documentation/pages/wiki/show.xnode +0 -12
  277. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +0 -6
  278. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +0 -5
  279. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +0 -8
  280. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +0 -6
  281. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +0 -10
  282. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +0 -3
  283. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.css.css +0 -14
  284. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +0 -16
  285. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.html.css +0 -5
  286. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +0 -3
  287. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +0 -2
  288. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.python.css +0 -6
  289. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +0 -2
  290. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +0 -18
  291. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.core.css +0 -62
  292. data/documentation/public/_components/jquery-syntax/base/jquery.syntax.editor.css +0 -6
  293. data/documentation/public/_components/jquery-syntax/base/theme.js +0 -1
  294. data/documentation/public/_components/jquery-syntax/bright/jquery.syntax.core.css +0 -27
  295. data/documentation/public/_components/jquery-syntax/bright/theme.js +0 -1
  296. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.apache.js +0 -41
  297. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.applescript.js +0 -57
  298. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.assembly.js +0 -37
  299. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +0 -67
  300. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.bash.js +0 -33
  301. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.basic.js +0 -51
  302. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.clang.js +0 -89
  303. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.csharp.js +0 -47
  304. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.css.js +0 -80
  305. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.diff.js +0 -24
  306. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.go.js +0 -47
  307. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.haskell.js +0 -45
  308. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.html.js +0 -66
  309. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.io.js +0 -45
  310. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.java.js +0 -45
  311. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.javascript.js +0 -40
  312. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.kai.js +0 -29
  313. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.lisp.js +0 -34
  314. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.lua.js +0 -44
  315. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.nginx.js +0 -31
  316. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +0 -73
  317. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ooc.js +0 -46
  318. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.pascal.js +0 -51
  319. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.perl5.js +0 -52
  320. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.php-script.js +0 -48
  321. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.php.js +0 -15
  322. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.plain.js +0 -10
  323. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +0 -43
  324. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.python.js +0 -44
  325. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ruby.js +0 -77
  326. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.scala.js +0 -44
  327. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +0 -29
  328. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.sql.js +0 -31
  329. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +0 -57
  330. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.swift.js +0 -55
  331. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.trenni.js +0 -35
  332. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.xml.js +0 -50
  333. data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.yaml.js +0 -29
  334. data/documentation/public/_components/jquery-syntax/jquery.syntax.cache.js +0 -65
  335. data/documentation/public/_components/jquery-syntax/jquery.syntax.core.js +0 -1098
  336. data/documentation/public/_components/jquery-syntax/jquery.syntax.editor.js +0 -291
  337. data/documentation/public/_components/jquery-syntax/jquery.syntax.js +0 -258
  338. data/documentation/public/_components/jquery-syntax/jquery.syntax.min.js +0 -13
  339. data/documentation/public/_components/jquery-syntax/paper/jquery.syntax.core.css +0 -31
  340. data/documentation/public/_components/jquery-syntax/paper/theme.js +0 -1
  341. data/documentation/public/_components/jquery/core.js +0 -482
  342. data/documentation/public/_components/jquery/jquery.js +0 -10220
  343. data/documentation/public/_components/jquery/jquery.min.js +0 -4
  344. data/documentation/public/_components/jquery/jquery.min.map +0 -1
  345. data/documentation/public/_components/jquery/jquery.slim.js +0 -8107
  346. data/documentation/public/_components/jquery/jquery.slim.min.js +0 -4
  347. data/documentation/public/_components/jquery/jquery.slim.min.map +0 -1
  348. data/documentation/public/_static +0 -1
  349. data/documentation/public/materials +0 -1
  350. data/documentation/spec/website_context.rb +0 -12
  351. data/documentation/spec/website_spec.rb +0 -16
  352. data/documentation/tasks +0 -1
  353. data/spec/utopia/content/link_spec.rb +0 -47
@@ -1,1822 +0,0 @@
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.18
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
- 217
1160
- 218
1161
- 219</pre>
1162
- </td>
1163
- <td>
1164
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 217</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
1289
- 213
1290
- 214</pre>
1291
- </td>
1292
- <td>
1293
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 210</span>
1294
-
1295
- <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>
1296
- <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>
1297
- <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_node'>lookup_node</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</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_node</span><span class='rparen'>)</span>
1298
- <span class='kw'>end</span>
1299
- <span class='kw'>end</span></pre>
1300
- </td>
1301
- </tr>
1302
- </table>
1303
- </div>
1304
-
1305
- <div class="method_details ">
1306
- <h3 class="signature " id="lookup_tag-instance_method">
1307
-
1308
- #<strong>lookup_tag</strong>(tag) &#x21d2; <tt><span class='object_link'><a href="Node.html" title="Utopia::Content::Node (class)">Node</a></span></tt>
1309
-
1310
-
1311
-
1312
-
1313
-
1314
- </h3><div class="docstring">
1315
- <div class="discussion">
1316
- <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>
1317
-
1318
-
1319
- </div>
1320
- </div>
1321
- <div class="tags">
1322
-
1323
- <p class="tag_title">Returns:</p>
1324
- <ul class="return">
1325
-
1326
- <li>
1327
-
1328
-
1329
- <span class='type'>(<tt><span class='object_link'><a href="Node.html" title="Utopia::Content::Node (class)">Node</a></span></tt>)</span>
1330
-
1331
-
1332
-
1333
- &mdash;
1334
- <div class='inline'><p>The node for the given tag.</p>
1335
- </div>
1336
-
1337
- </li>
1338
-
1339
- </ul>
1340
-
1341
- </div><table class="source_code">
1342
- <tr>
1343
- <td>
1344
- <pre class="lines">
1345
-
1346
-
1347
- 190
1348
- 191
1349
- 192
1350
- 193
1351
- 194
1352
- 195
1353
- 196
1354
- 197
1355
- 198
1356
- 199
1357
- 200
1358
- 201
1359
- 202
1360
- 203
1361
- 204
1362
- 205
1363
- 206</pre>
1364
- </td>
1365
- <td>
1366
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 190</span>
1367
-
1368
- <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>
1369
- <span class='comment'># result = tag
1370
- </span> <span class='comment'>#
1371
- </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:
1372
- </span> <span class='comment'># @begin_tags.reverse_each do |state|
1373
- </span> <span class='comment'># result = state.lookup(result)
1374
- </span> <span class='comment'>#
1375
- </span> <span class='comment'># return result if result.is_a?(Node)
1376
- </span> <span class='comment'># end
1377
- </span>
1378
- <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:
1379
- </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>
1380
- <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>
1381
- <span class='kw'>end</span>
1382
-
1383
- <span class='kw'>return</span> <span class='kw'>nil</span>
1384
- <span class='kw'>end</span></pre>
1385
- </td>
1386
- </tr>
1387
- </table>
1388
- </div>
1389
-
1390
- <div class="method_details ">
1391
- <h3 class="signature " id="parent-instance_method">
1392
-
1393
- #<strong>parent</strong> &#x21d2; <tt>Object</tt>
1394
-
1395
-
1396
-
1397
-
1398
-
1399
- </h3><table class="source_code">
1400
- <tr>
1401
- <td>
1402
- <pre class="lines">
1403
-
1404
-
1405
- 221
1406
- 222
1407
- 223</pre>
1408
- </td>
1409
- <td>
1410
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 221</span>
1411
-
1412
- <span class='kw'>def</span> <span class='id identifier rubyid_parent'>parent</span>
1413
- <span class='ivar'>@end_tags</span><span class='lbracket'>[</span><span class='op'>-</span><span class='int'>2</span><span class='rbracket'>]</span>
1414
- <span class='kw'>end</span></pre>
1415
- </td>
1416
- </tr>
1417
- </table>
1418
- </div>
1419
-
1420
- <div class="method_details ">
1421
- <h3 class="signature " id="parse_markup-instance_method">
1422
-
1423
- #<strong>parse_markup</strong>(markup) &#x21d2; <tt>Object</tt>
1424
-
1425
-
1426
-
1427
-
1428
-
1429
- </h3><table class="source_code">
1430
- <tr>
1431
- <td>
1432
- <pre class="lines">
1433
-
1434
-
1435
- 79
1436
- 80
1437
- 81</pre>
1438
- </td>
1439
- <td>
1440
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 79</span>
1441
-
1442
- <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>
1443
- <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>
1444
- <span class='kw'>end</span></pre>
1445
- </td>
1446
- </tr>
1447
- </table>
1448
- </div>
1449
-
1450
- <div class="method_details ">
1451
- <h3 class="signature " id="render!-instance_method">
1452
-
1453
- #<strong>render!</strong>(node, attributes) &#x21d2; <tt>Object</tt>
1454
-
1455
-
1456
-
1457
-
1458
-
1459
- </h3><table class="source_code">
1460
- <tr>
1461
- <td>
1462
- <pre class="lines">
1463
-
1464
-
1465
- 64
1466
- 65
1467
- 66
1468
- 67
1469
- 68</pre>
1470
- </td>
1471
- <td>
1472
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 64</span>
1473
-
1474
- <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>
1475
- <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>
1476
-
1477
- <span class='kw'>return</span> <span class='kw'>self</span>
1478
- <span class='kw'>end</span></pre>
1479
- </td>
1480
- </tr>
1481
- </table>
1482
- </div>
1483
-
1484
- <div class="method_details ">
1485
- <h3 class="signature " id="render_node-instance_method">
1486
-
1487
- #<strong>render_node</strong>(node, attributes = {}) &#x21d2; <tt>Object</tt>
1488
-
1489
-
1490
-
1491
-
1492
-
1493
- </h3><table class="source_code">
1494
- <tr>
1495
- <td>
1496
- <pre class="lines">
1497
-
1498
-
1499
- 178
1500
- 179
1501
- 180
1502
- 181
1503
- 182
1504
- 183
1505
- 184
1506
- 185
1507
- 186</pre>
1508
- </td>
1509
- <td>
1510
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 178</span>
1511
-
1512
- <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>
1513
- <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>
1514
-
1515
- <span class='comment'># We keep track of the first thing rendered by this document.
1516
- </span> <span class='ivar'>@first</span> <span class='op'>||=</span> <span class='ivar'>@current</span>
1517
-
1518
- <span class='comment'># This returns the content of rendering the tag:
1519
- </span> <span class='kw'>return</span> <span class='id identifier rubyid_tag_end'>tag_end</span>
1520
- <span class='kw'>end</span></pre>
1521
- </td>
1522
- </tr>
1523
- </table>
1524
- </div>
1525
-
1526
- <div class="method_details ">
1527
- <h3 class="signature " id="tag-instance_method">
1528
-
1529
- #<strong>tag</strong>(name, attributes = {}) &#x21d2; <tt>Object</tt>
1530
-
1531
-
1532
-
1533
-
1534
-
1535
- </h3><table class="source_code">
1536
- <tr>
1537
- <td>
1538
- <pre class="lines">
1539
-
1540
-
1541
- 102
1542
- 103
1543
- 104
1544
- 105
1545
- 106
1546
- 107
1547
- 108
1548
- 109
1549
- 110
1550
- 111
1551
- 112
1552
- 113</pre>
1553
- </td>
1554
- <td>
1555
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 102</span>
1556
-
1557
- <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>
1558
- <span class='comment'># If we provide a block which can give inner data, we are not self-closing.
1559
- </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>
1560
-
1561
- <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
1562
- <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>
1563
- <span class='kw'>yield</span> <span class='id identifier rubyid_node'>node</span>
1564
- <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>
1565
- <span class='kw'>else</span>
1566
- <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>
1567
- <span class='kw'>end</span>
1568
- <span class='kw'>end</span></pre>
1569
- </td>
1570
- </tr>
1571
- </table>
1572
- </div>
1573
-
1574
- <div class="method_details ">
1575
- <h3 class="signature " id="tag_begin-instance_method">
1576
-
1577
- #<strong>tag_begin</strong>(tag, node = nil) &#x21d2; <tt>Object</tt>
1578
-
1579
-
1580
-
1581
-
1582
-
1583
- </h3><table class="source_code">
1584
- <tr>
1585
- <td>
1586
- <pre class="lines">
1587
-
1588
-
1589
- 126
1590
- 127
1591
- 128
1592
- 129
1593
- 130
1594
- 131
1595
- 132
1596
- 133
1597
- 134
1598
- 135
1599
- 136
1600
- 137
1601
- 138
1602
- 139
1603
- 140
1604
- 141
1605
- 142</pre>
1606
- </td>
1607
- <td>
1608
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 126</span>
1609
-
1610
- <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>
1611
- <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>
1612
-
1613
- <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span>
1614
- <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>
1615
-
1616
- <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>
1617
-
1618
- <span class='kw'>return</span> <span class='id identifier rubyid_node'>node</span>
1619
- <span class='kw'>end</span>
1620
-
1621
- <span class='comment'># raise ArgumentError.new(&quot;tag_begin: #{tag} is tag.self_closed?&quot;) if tag.self_closed?
1622
- </span>
1623
- <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>
1624
-
1625
- <span class='kw'>return</span> <span class='kw'>nil</span>
1626
- <span class='kw'>end</span></pre>
1627
- </td>
1628
- </tr>
1629
- </table>
1630
- </div>
1631
-
1632
- <div class="method_details ">
1633
- <h3 class="signature " id="tag_complete-instance_method">
1634
-
1635
- #<strong>tag_complete</strong>(tag, node = nil) &#x21d2; <tt>Object</tt>
1636
-
1637
-
1638
-
1639
-
1640
-
1641
- </h3><table class="source_code">
1642
- <tr>
1643
- <td>
1644
- <pre class="lines">
1645
-
1646
-
1647
- 115
1648
- 116
1649
- 117
1650
- 118
1651
- 119
1652
- 120
1653
- 121
1654
- 122
1655
- 123
1656
- 124</pre>
1657
- </td>
1658
- <td>
1659
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 115</span>
1660
-
1661
- <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>
1662
- <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>
1663
-
1664
- <span class='kw'>if</span> <span class='id identifier rubyid_node'>node</span>
1665
- <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>
1666
- <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>
1667
- <span class='kw'>else</span>
1668
- <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>
1669
- <span class='kw'>end</span>
1670
- <span class='kw'>end</span></pre>
1671
- </td>
1672
- </tr>
1673
- </table>
1674
- </div>
1675
-
1676
- <div class="method_details ">
1677
- <h3 class="signature " id="tag_end-instance_method">
1678
-
1679
- #<strong>tag_end</strong>(tag = nil) &#x21d2; <tt>Object</tt>
1680
-
1681
-
1682
-
1683
-
1684
-
1685
- </h3><table class="source_code">
1686
- <tr>
1687
- <td>
1688
- <pre class="lines">
1689
-
1690
-
1691
- 154
1692
- 155
1693
- 156
1694
- 157
1695
- 158
1696
- 159
1697
- 160
1698
- 161
1699
- 162
1700
- 163
1701
- 164
1702
- 165
1703
- 166
1704
- 167
1705
- 168
1706
- 169
1707
- 170
1708
- 171
1709
- 172
1710
- 173
1711
- 174
1712
- 175
1713
- 176</pre>
1714
- </td>
1715
- <td>
1716
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 154</span>
1717
-
1718
- <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>
1719
- <span class='comment'># Determine if the current state contains tags that need to be completed, or if the state itself is finished.
1720
- </span> <span class='kw'>if</span> <span class='ivar'>@current</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
1721
- <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>
1722
- <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>
1723
- <span class='kw'>end</span>
1724
-
1725
- <span class='ivar'>@end_tags</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@current</span>
1726
- <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>
1727
-
1728
- <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>
1729
- <span class='ivar'>@end_tags</span><span class='period'>.</span><span class='id identifier rubyid_pop'>pop</span>
1730
-
1731
- <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>
1732
-
1733
- <span class='kw'>return</span> <span class='id identifier rubyid_buffer'>buffer</span>
1734
- <span class='kw'>else</span>
1735
- <span class='comment'># raise ArgumentError.new(&quot;tag_begin: #{tag} is tag.self_closed?&quot;) if tag.self_closed?
1736
- </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>
1737
- <span class='kw'>end</span>
1738
-
1739
- <span class='kw'>return</span> <span class='kw'>nil</span>
1740
- <span class='kw'>end</span></pre>
1741
- </td>
1742
- </tr>
1743
- </table>
1744
- </div>
1745
-
1746
- <div class="method_details ">
1747
- <h3 class="signature " id="text-instance_method">
1748
-
1749
- #<strong>text</strong>(string) &#x21d2; <tt>Object</tt>
1750
-
1751
-
1752
-
1753
-
1754
-
1755
- </h3><table class="source_code">
1756
- <tr>
1757
- <td>
1758
- <pre class="lines">
1759
-
1760
-
1761
- 150
1762
- 151
1763
- 152</pre>
1764
- </td>
1765
- <td>
1766
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 150</span>
1767
-
1768
- <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>
1769
- <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>
1770
- <span class='kw'>end</span></pre>
1771
- </td>
1772
- </tr>
1773
- </table>
1774
- </div>
1775
-
1776
- <div class="method_details ">
1777
- <h3 class="signature " id="write-instance_method">
1778
-
1779
- #<strong>write</strong>(string) &#x21d2; <tt>Object</tt>
1780
-
1781
-
1782
-
1783
- <span class="aliases">Also known as:
1784
- <span class="names"><span id='cdata-instance_method'>cdata</span></span>
1785
- </span>
1786
-
1787
-
1788
-
1789
- </h3><table class="source_code">
1790
- <tr>
1791
- <td>
1792
- <pre class="lines">
1793
-
1794
-
1795
- 144
1796
- 145
1797
- 146</pre>
1798
- </td>
1799
- <td>
1800
- <pre class="code"><span class="info file"># File 'lib/utopia/content/document.rb', line 144</span>
1801
-
1802
- <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>
1803
- <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>
1804
- <span class='kw'>end</span></pre>
1805
- </td>
1806
- </tr>
1807
- </table>
1808
- </div>
1809
-
1810
- </div>
1811
-
1812
- </div>
1813
-
1814
- <div id="footer">
1815
- Generated on Sat Mar 9 12:01:54 2019 by
1816
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1817
- 0.9.18 (ruby-2.6.1).
1818
- </div>
1819
-
1820
- </div>
1821
- </body>
1822
- </html>