utopia 2.13.4 → 2.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bake/utopia/{yarn.rb → node.rb} +13 -5
- data/lib/.DS_Store +0 -0
- data/lib/utopia/.DS_Store +0 -0
- data/lib/utopia/command.rb +2 -2
- data/lib/utopia/command/site.rb +1 -1
- data/lib/utopia/content.rb +23 -19
- data/lib/utopia/content/.DS_Store +0 -0
- data/lib/utopia/content/link.rb +29 -34
- data/lib/utopia/content/links.rb +185 -123
- data/lib/utopia/content/markup.rb +1 -1
- data/lib/utopia/content/node.rb +15 -19
- data/lib/utopia/content/response.rb +5 -5
- data/lib/utopia/controller.rb +0 -17
- data/lib/utopia/controller/.DS_Store +0 -0
- data/lib/utopia/controller/base.rb +27 -3
- data/lib/utopia/controller/respond.rb +50 -107
- data/lib/utopia/extensions/array_split.rb +2 -2
- data/lib/utopia/http.rb +3 -3
- data/lib/utopia/localization.rb +18 -10
- data/lib/utopia/middleware.rb +2 -2
- data/lib/utopia/path.rb +40 -36
- data/lib/utopia/redirection.rb +0 -2
- data/lib/utopia/responder.rb +76 -0
- data/lib/utopia/version.rb +1 -1
- data/setup/.DS_Store +0 -0
- data/setup/server/.DS_Store +0 -0
- data/setup/site/.DS_Store +0 -0
- data/setup/site/.gitignore +8 -7
- data/setup/site/Gemfile +7 -5
- data/setup/site/pages/.DS_Store +0 -0
- data/setup/site/public/.DS_Store +0 -0
- metadata +81 -603
- data/.codeclimate.yml +0 -5
- data/.gitignore +0 -8
- data/.rspec +0 -4
- data/.travis.yml +0 -28
- data/.yardopts +0 -2
- data/Gemfile +0 -28
- data/README.md +0 -92
- data/Rakefile +0 -33
- data/benchmark/call_vs_check.rb +0 -38
- data/benchmark/const_vs_hash.rb +0 -35
- data/benchmark/hash_vs_openstruct.rb +0 -54
- data/benchmark/string_vs_symbol.rb +0 -14
- data/benchmark/struct_vs_class.rb +0 -91
- data/docs/.nojekyll +0 -0
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +0 -6
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +0 -5
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +0 -8
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +0 -6
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +0 -10
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +0 -3
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.css.css +0 -14
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +0 -16
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.html.css +0 -5
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +0 -3
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +0 -2
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.python.css +0 -6
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +0 -2
- data/docs/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +0 -18
- data/docs/_components/jquery-syntax/base/jquery.syntax.core.css +0 -62
- data/docs/_components/jquery-syntax/base/jquery.syntax.editor.css +0 -6
- data/docs/_components/jquery-syntax/base/theme.js +0 -1
- data/docs/_components/jquery-syntax/bright/jquery.syntax.core.css +0 -27
- data/docs/_components/jquery-syntax/bright/theme.js +0 -1
- data/docs/_components/jquery-syntax/jquery.syntax.brush.apache.js +0 -41
- data/docs/_components/jquery-syntax/jquery.syntax.brush.applescript.js +0 -57
- data/docs/_components/jquery-syntax/jquery.syntax.brush.assembly.js +0 -37
- data/docs/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +0 -67
- data/docs/_components/jquery-syntax/jquery.syntax.brush.bash.js +0 -33
- data/docs/_components/jquery-syntax/jquery.syntax.brush.basic.js +0 -51
- data/docs/_components/jquery-syntax/jquery.syntax.brush.clang.js +0 -89
- data/docs/_components/jquery-syntax/jquery.syntax.brush.csharp.js +0 -47
- data/docs/_components/jquery-syntax/jquery.syntax.brush.css.js +0 -80
- data/docs/_components/jquery-syntax/jquery.syntax.brush.diff.js +0 -24
- data/docs/_components/jquery-syntax/jquery.syntax.brush.go.js +0 -47
- data/docs/_components/jquery-syntax/jquery.syntax.brush.haskell.js +0 -45
- data/docs/_components/jquery-syntax/jquery.syntax.brush.html.js +0 -66
- data/docs/_components/jquery-syntax/jquery.syntax.brush.io.js +0 -45
- data/docs/_components/jquery-syntax/jquery.syntax.brush.java.js +0 -45
- data/docs/_components/jquery-syntax/jquery.syntax.brush.javascript.js +0 -40
- data/docs/_components/jquery-syntax/jquery.syntax.brush.kai.js +0 -29
- data/docs/_components/jquery-syntax/jquery.syntax.brush.lisp.js +0 -34
- data/docs/_components/jquery-syntax/jquery.syntax.brush.lua.js +0 -44
- data/docs/_components/jquery-syntax/jquery.syntax.brush.nginx.js +0 -31
- data/docs/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +0 -73
- data/docs/_components/jquery-syntax/jquery.syntax.brush.ooc.js +0 -46
- data/docs/_components/jquery-syntax/jquery.syntax.brush.pascal.js +0 -51
- data/docs/_components/jquery-syntax/jquery.syntax.brush.perl5.js +0 -52
- data/docs/_components/jquery-syntax/jquery.syntax.brush.php-script.js +0 -48
- data/docs/_components/jquery-syntax/jquery.syntax.brush.php.js +0 -15
- data/docs/_components/jquery-syntax/jquery.syntax.brush.plain.js +0 -10
- data/docs/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +0 -43
- data/docs/_components/jquery-syntax/jquery.syntax.brush.python.js +0 -44
- data/docs/_components/jquery-syntax/jquery.syntax.brush.ruby.js +0 -77
- data/docs/_components/jquery-syntax/jquery.syntax.brush.scala.js +0 -44
- data/docs/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +0 -29
- data/docs/_components/jquery-syntax/jquery.syntax.brush.sql.js +0 -31
- data/docs/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +0 -57
- data/docs/_components/jquery-syntax/jquery.syntax.brush.swift.js +0 -55
- data/docs/_components/jquery-syntax/jquery.syntax.brush.trenni.js +0 -35
- data/docs/_components/jquery-syntax/jquery.syntax.brush.xml.js +0 -50
- data/docs/_components/jquery-syntax/jquery.syntax.brush.yaml.js +0 -29
- data/docs/_components/jquery-syntax/jquery.syntax.cache.js +0 -65
- data/docs/_components/jquery-syntax/jquery.syntax.core.js +0 -1098
- data/docs/_components/jquery-syntax/jquery.syntax.editor.js +0 -291
- data/docs/_components/jquery-syntax/jquery.syntax.js +0 -258
- data/docs/_components/jquery-syntax/jquery.syntax.min.js +0 -13
- data/docs/_components/jquery-syntax/paper/jquery.syntax.core.css +0 -31
- data/docs/_components/jquery-syntax/paper/theme.js +0 -1
- data/docs/_components/jquery/core.js +0 -482
- data/docs/_components/jquery/jquery.js +0 -10220
- data/docs/_components/jquery/jquery.min.js +0 -4
- data/docs/_components/jquery/jquery.min.map +0 -1
- data/docs/_components/jquery/jquery.slim.js +0 -8107
- data/docs/_components/jquery/jquery.slim.min.js +0 -4
- data/docs/_components/jquery/jquery.slim.min.map +0 -1
- data/docs/_static/icon.png +0 -0
- data/docs/_static/site.css +0 -205
- data/docs/_static/utopia-background.svg +0 -1
- data/docs/_static/utopia.svg +0 -1
- data/docs/code/Utopia.html +0 -517
- data/docs/code/Utopia/Basename.html +0 -654
- data/docs/code/Utopia/Bootstrap.html +0 -538
- data/docs/code/Utopia/Command.html +0 -213
- data/docs/code/Utopia/Command/Environment.html +0 -321
- data/docs/code/Utopia/Command/Server.html +0 -214
- data/docs/code/Utopia/Command/Server/Create.html +0 -222
- data/docs/code/Utopia/Command/Server/Environment.html +0 -236
- data/docs/code/Utopia/Command/Server/Update.html +0 -317
- data/docs/code/Utopia/Command/Setup.html +0 -145
- data/docs/code/Utopia/Command/Setup/Server.html +0 -298
- data/docs/code/Utopia/Command/Setup/Site.html +0 -180
- data/docs/code/Utopia/Command/Site.html +0 -285
- data/docs/code/Utopia/Command/Site/Create.html +0 -324
- data/docs/code/Utopia/Command/Site/Update.html +0 -407
- data/docs/code/Utopia/Command/Top.html +0 -279
- data/docs/code/Utopia/Content.html +0 -832
- data/docs/code/Utopia/Content/Document.html +0 -1822
- data/docs/code/Utopia/Content/Document/State.html +0 -1220
- data/docs/code/Utopia/Content/Link.html +0 -1286
- data/docs/code/Utopia/Content/Links.html +0 -847
- data/docs/code/Utopia/Content/MarkupParser.html +0 -881
- data/docs/code/Utopia/Content/MarkupParser/ParsedTag.html +0 -422
- data/docs/code/Utopia/Content/MarkupParser/UnbalancedTagError.html +0 -615
- data/docs/code/Utopia/Content/Namespace.html +0 -485
- data/docs/code/Utopia/Content/Node.html +0 -1188
- data/docs/code/Utopia/Content/Node/Context.html +0 -938
- data/docs/code/Utopia/Content/Response.html +0 -813
- data/docs/code/Utopia/Content/SymbolicHash.html +0 -419
- data/docs/code/Utopia/Content/Tag.html +0 -399
- data/docs/code/Utopia/Content/Tags.html +0 -136
- data/docs/code/Utopia/Content/Tags/ContentTag.html +0 -187
- data/docs/code/Utopia/Content/Tags/DeferredTag.html +0 -193
- data/docs/code/Utopia/Content/Tags/Library.html +0 -333
- data/docs/code/Utopia/Content/Tags/NodeTag.html +0 -193
- data/docs/code/Utopia/Content/UnbalancedTagError.html +0 -298
- data/docs/code/Utopia/ContentLength.html +0 -343
- data/docs/code/Utopia/Controller.html +0 -907
- data/docs/code/Utopia/Controller/Actions.html +0 -289
- data/docs/code/Utopia/Controller/Actions/Action.html +0 -984
- data/docs/code/Utopia/Controller/Actions/ClassMethods.html +0 -442
- data/docs/code/Utopia/Controller/Base.html +0 -1216
- data/docs/code/Utopia/Controller/Respond.html +0 -293
- data/docs/code/Utopia/Controller/Respond/ClassMethods.html +0 -236
- data/docs/code/Utopia/Controller/Respond/Converter.html +0 -256
- data/docs/code/Utopia/Controller/Respond/Converter/Callback.html +0 -484
- data/docs/code/Utopia/Controller/Respond/Converter/ToJSON.html +0 -381
- data/docs/code/Utopia/Controller/Respond/Passthrough.html +0 -297
- data/docs/code/Utopia/Controller/Respond/Responder.html +0 -535
- data/docs/code/Utopia/Controller/Rewrite.html +0 -290
- data/docs/code/Utopia/Controller/Rewrite/ClassMethods.html +0 -242
- data/docs/code/Utopia/Controller/Rewrite/ExtractPrefixRule.html +0 -364
- data/docs/code/Utopia/Controller/Rewrite/Rewriter.html +0 -464
- data/docs/code/Utopia/Controller/Rewrite/Rule.html +0 -209
- data/docs/code/Utopia/Controller/Variables.html +0 -550
- data/docs/code/Utopia/Controllers.html +0 -244
- data/docs/code/Utopia/Exceptions.html +0 -127
- data/docs/code/Utopia/Exceptions/Handler.html +0 -526
- data/docs/code/Utopia/Exceptions/Mailer.html +0 -482
- data/docs/code/Utopia/Extensions.html +0 -117
- data/docs/code/Utopia/Extensions/ArraySplit.html +0 -183
- data/docs/code/Utopia/Extensions/DateTimeComparison.html +0 -193
- data/docs/code/Utopia/Extensions/TimeDateComparison.html +0 -193
- data/docs/code/Utopia/HTTP.html +0 -250
- data/docs/code/Utopia/HTTP/Status.html +0 -415
- data/docs/code/Utopia/Locale.html +0 -606
- data/docs/code/Utopia/Localization.html +0 -1241
- data/docs/code/Utopia/Localization/Wrapper.html +0 -459
- data/docs/code/Utopia/Logger.html +0 -205
- data/docs/code/Utopia/Logger/CompactFormatter.html +0 -335
- data/docs/code/Utopia/Path.html +0 -3310
- data/docs/code/Utopia/Path/Matcher.html +0 -518
- data/docs/code/Utopia/Path/Matcher/MatchData.html +0 -475
- data/docs/code/Utopia/Redirection.html +0 -151
- data/docs/code/Utopia/Redirection/ClientRedirect.html +0 -717
- data/docs/code/Utopia/Redirection/DirectoryIndex.html +0 -298
- data/docs/code/Utopia/Redirection/Errors.html +0 -476
- data/docs/code/Utopia/Redirection/Moved.html +0 -312
- data/docs/code/Utopia/Redirection/RequestFailure.html +0 -226
- data/docs/code/Utopia/Redirection/Rewrite.html +0 -296
- data/docs/code/Utopia/Session.html +0 -889
- data/docs/code/Utopia/Session/LazyHash.html +0 -859
- data/docs/code/Utopia/Setup.html +0 -970
- data/docs/code/Utopia/Static.html +0 -696
- data/docs/code/Utopia/Static/LocalFile.html +0 -1104
- data/docs/code/Utopia/Static/MimeTypeLoader.html +0 -541
- data/docs/code/Utopia/Static/MimeTypeLoader/ExpansionError.html +0 -124
- data/docs/code/Utopia/Tags.html +0 -115
- data/docs/code/Utopia/Tags/Environment.html +0 -314
- data/docs/code/Utopia/Tags/EnvironmentTag.html +0 -314
- data/docs/code/Utopia/Tags/Library.html +0 -340
- data/docs/code/_index.html +0 -758
- data/docs/code/class_list.html +0 -51
- data/docs/code/css/common.css +0 -1
- data/docs/code/css/full_list.css +0 -58
- data/docs/code/css/style.css +0 -496
- data/docs/code/file.README.html +0 -171
- data/docs/code/file_list.html +0 -56
- data/docs/code/frames.html +0 -17
- data/docs/code/index.html +0 -171
- data/docs/code/js/app.js +0 -292
- data/docs/code/js/full_list.js +0 -216
- data/docs/code/js/jquery.js +0 -4
- data/docs/code/materials/utopia.png +0 -0
- data/docs/code/materials/utopia.svg +0 -1
- data/docs/code/method_list.html +0 -3443
- data/docs/code/top-level-namespace.html +0 -110
- data/docs/index.html +0 -92
- data/docs/wiki.html +0 -92
- data/docs/wiki/development-environment-setup.html +0 -60
- data/docs/wiki/development-environment-setup/index.html +0 -60
- data/docs/wiki/edit.html +0 -103
- data/docs/wiki/faq/what-is-xnode.html +0 -79
- data/docs/wiki/faq/what-is-xnode/index.html +0 -79
- data/docs/wiki/javascript.html +0 -153
- data/docs/wiki/javascript/index.html +0 -153
- data/docs/wiki/middleware/content.html +0 -64
- data/docs/wiki/middleware/content/index.html +0 -64
- data/docs/wiki/middleware/controller.html +0 -104
- data/docs/wiki/middleware/controller/actions.html +0 -117
- data/docs/wiki/middleware/controller/actions/index.html +0 -117
- data/docs/wiki/middleware/controller/actions/rewrite/index.html +0 -48
- data/docs/wiki/middleware/controller/index.html +0 -104
- data/docs/wiki/middleware/controller/rewrite.html +0 -111
- data/docs/wiki/middleware/controller/rewrite/index.html +0 -111
- data/docs/wiki/middleware/localization.html +0 -59
- data/docs/wiki/middleware/localization/index.html +0 -59
- data/docs/wiki/middleware/redirection.html +0 -61
- data/docs/wiki/middleware/redirection/index.html +0 -61
- data/docs/wiki/middleware/session.html +0 -71
- data/docs/wiki/middleware/session/index.html +0 -71
- data/docs/wiki/middleware/static.html +0 -57
- data/docs/wiki/middleware/static/index.html +0 -57
- data/docs/wiki/server-setup.html +0 -118
- data/docs/wiki/server-setup/index.html +0 -118
- data/docs/wiki/testing.html +0 -59
- data/docs/wiki/testing/index.html +0 -59
- data/docs/wiki/updating-utopia.html +0 -108
- data/docs/wiki/updating-utopia/index.html +0 -108
- data/docs/wiki/your-first-page.html +0 -80
- data/docs/wiki/your-first-page/index.html +0 -80
- data/documentation/.rspec +0 -4
- data/documentation/.yarnrc +0 -1
- data/documentation/Gemfile +0 -19
- data/documentation/Guardfile +0 -9
- data/documentation/Rakefile +0 -9
- data/documentation/config.ru +0 -41
- data/documentation/config/README.md +0 -7
- data/documentation/config/environment.rb +0 -12
- data/documentation/lib/readme.txt +0 -1
- data/documentation/pages/_editor.xnode +0 -64
- data/documentation/pages/_heading.xnode +0 -2
- data/documentation/pages/_page.xnode +0 -40
- data/documentation/pages/errors/exception.xnode +0 -5
- data/documentation/pages/errors/file-not-found.xnode +0 -5
- data/documentation/pages/links.yaml +0 -2
- data/documentation/pages/wiki/_listing.xnode +0 -32
- data/documentation/pages/wiki/_navigation.xnode +0 -15
- data/documentation/pages/wiki/content.md +0 -35
- data/documentation/pages/wiki/controller.rb +0 -48
- data/documentation/pages/wiki/development-environment-setup/content.md +0 -16
- data/documentation/pages/wiki/edit.xnode +0 -10
- data/documentation/pages/wiki/faq/what-is-xnode/content.md +0 -37
- data/documentation/pages/wiki/javascript/content.md +0 -75
- data/documentation/pages/wiki/links.yaml +0 -6
- data/documentation/pages/wiki/middleware/content/content.md +0 -21
- data/documentation/pages/wiki/middleware/controller/actions/content.md +0 -76
- data/documentation/pages/wiki/middleware/controller/content.md +0 -62
- data/documentation/pages/wiki/middleware/controller/links.yaml +0 -4
- data/documentation/pages/wiki/middleware/controller/rewrite/content.md +0 -69
- data/documentation/pages/wiki/middleware/localization/content.md +0 -16
- data/documentation/pages/wiki/middleware/redirection/content.md +0 -17
- data/documentation/pages/wiki/middleware/session/content.md +0 -29
- data/documentation/pages/wiki/middleware/static/content.md +0 -13
- data/documentation/pages/wiki/server-setup/content.md +0 -52
- data/documentation/pages/wiki/show.xnode +0 -12
- data/documentation/pages/wiki/testing/content.md +0 -15
- data/documentation/pages/wiki/updating-utopia/content.md +0 -63
- data/documentation/pages/wiki/your-first-page/content.md +0 -38
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.apache.css +0 -6
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.applescript.css +0 -5
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.assembly.css +0 -8
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.bash-script.css +0 -6
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.bash.css +0 -10
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.clang.css +0 -3
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.css.css +0 -14
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.diff.css +0 -16
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.html.css +0 -5
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.ocaml.css +0 -3
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.protobuf.css +0 -2
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.python.css +0 -6
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.ruby.css +0 -2
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.brush.xml.css +0 -18
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.core.css +0 -62
- data/documentation/public/_components/jquery-syntax/base/jquery.syntax.editor.css +0 -6
- data/documentation/public/_components/jquery-syntax/base/theme.js +0 -1
- data/documentation/public/_components/jquery-syntax/bright/jquery.syntax.core.css +0 -27
- data/documentation/public/_components/jquery-syntax/bright/theme.js +0 -1
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.apache.js +0 -41
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.applescript.js +0 -57
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.assembly.js +0 -37
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.bash-script.js +0 -67
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.bash.js +0 -33
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.basic.js +0 -51
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.clang.js +0 -89
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.csharp.js +0 -47
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.css.js +0 -80
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.diff.js +0 -24
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.go.js +0 -47
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.haskell.js +0 -45
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.html.js +0 -66
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.io.js +0 -45
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.java.js +0 -45
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.javascript.js +0 -40
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.kai.js +0 -29
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.lisp.js +0 -34
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.lua.js +0 -44
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.nginx.js +0 -31
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ocaml.js +0 -73
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ooc.js +0 -46
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.pascal.js +0 -51
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.perl5.js +0 -52
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.php-script.js +0 -48
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.php.js +0 -15
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.plain.js +0 -10
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.protobuf.js +0 -43
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.python.js +0 -44
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.ruby.js +0 -77
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.scala.js +0 -44
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.smalltalk.js +0 -29
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.sql.js +0 -31
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.super-collider.js +0 -57
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.swift.js +0 -55
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.trenni.js +0 -35
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.xml.js +0 -50
- data/documentation/public/_components/jquery-syntax/jquery.syntax.brush.yaml.js +0 -29
- data/documentation/public/_components/jquery-syntax/jquery.syntax.cache.js +0 -65
- data/documentation/public/_components/jquery-syntax/jquery.syntax.core.js +0 -1098
- data/documentation/public/_components/jquery-syntax/jquery.syntax.editor.js +0 -291
- data/documentation/public/_components/jquery-syntax/jquery.syntax.js +0 -258
- data/documentation/public/_components/jquery-syntax/jquery.syntax.min.js +0 -13
- data/documentation/public/_components/jquery-syntax/paper/jquery.syntax.core.css +0 -31
- data/documentation/public/_components/jquery-syntax/paper/theme.js +0 -1
- data/documentation/public/_components/jquery/core.js +0 -482
- data/documentation/public/_components/jquery/jquery.js +0 -10220
- data/documentation/public/_components/jquery/jquery.min.js +0 -4
- data/documentation/public/_components/jquery/jquery.min.map +0 -1
- data/documentation/public/_components/jquery/jquery.slim.js +0 -8107
- data/documentation/public/_components/jquery/jquery.slim.min.js +0 -4
- data/documentation/public/_components/jquery/jquery.slim.min.map +0 -1
- data/documentation/public/_static +0 -1
- data/documentation/public/materials +0 -1
- data/documentation/spec/website_context.rb +0 -12
- data/documentation/spec/website_spec.rb +0 -16
- data/documentation/tasks +0 -1
- data/materials/utopia.png +0 -0
- data/materials/utopia.svg +0 -1
- data/setup/site/.yarnrc +0 -1
- data/spec/mock_node.rb +0 -16
- data/spec/spec_helper.rb +0 -13
- data/spec/utopia/command_spec.rb +0 -164
- data/spec/utopia/content/document_spec.rb +0 -60
- data/spec/utopia/content/link_spec.rb +0 -47
- data/spec/utopia/content/links/foo/index.xnode +0 -0
- data/spec/utopia/content/links/foo/links.yaml +0 -2
- data/spec/utopia/content/links/foo/test.de.xnode +0 -0
- data/spec/utopia/content/links/foo/test.en.xnode +0 -0
- data/spec/utopia/content/links/links.yaml +0 -9
- data/spec/utopia/content/links/welcome.xnode +0 -0
- data/spec/utopia/content/links_spec.rb +0 -101
- data/spec/utopia/content/localized/five/index.en.xnode +0 -0
- data/spec/utopia/content/localized/four/index.en.xnode +0 -0
- data/spec/utopia/content/localized/four/index.zh.xnode +0 -0
- data/spec/utopia/content/localized/four/links.yaml +0 -4
- data/spec/utopia/content/localized/links.yaml +0 -16
- data/spec/utopia/content/localized/one.xnode +0 -0
- data/spec/utopia/content/localized/three/index.xnode +0 -0
- data/spec/utopia/content/localized/two.en.xnode +0 -0
- data/spec/utopia/content/localized/two.zh.xnode +0 -0
- data/spec/utopia/content/markup_spec.rb +0 -96
- data/spec/utopia/content/namespace_spec.rb +0 -45
- data/spec/utopia/content/node/lookup/content.xnode +0 -1
- data/spec/utopia/content/node/lookup/index.xnode +0 -1
- data/spec/utopia/content/node/ordered/first.xnode +0 -0
- data/spec/utopia/content/node/ordered/index.xnode +0 -0
- data/spec/utopia/content/node/ordered/links.yaml +0 -4
- data/spec/utopia/content/node/ordered/second.xnode +0 -0
- data/spec/utopia/content/node/related/foo.en.xnode +0 -0
- data/spec/utopia/content/node/related/foo.ja.xnode +0 -0
- data/spec/utopia/content/node/related/links.yaml +0 -4
- data/spec/utopia/content/node_spec.rb +0 -97
- data/spec/utopia/content/response_spec.rb +0 -54
- data/spec/utopia/content/tags_spec.rb +0 -82
- data/spec/utopia/content_spec.rb +0 -100
- data/spec/utopia/content_spec.ru +0 -6
- data/spec/utopia/content_spec/_heading.xnode +0 -1
- data/spec/utopia/content_spec/content/_show-value.xnode +0 -1
- data/spec/utopia/content_spec/content/links.yaml +0 -2
- data/spec/utopia/content_spec/content/test-partial.xnode +0 -1
- data/spec/utopia/content_spec/index.xnode +0 -1
- data/spec/utopia/content_spec/node/index.xnode +0 -1
- data/spec/utopia/content_spec/test.xnode +0 -10
- data/spec/utopia/controller/actions_spec.rb +0 -62
- data/spec/utopia/controller/middleware_spec.rb +0 -88
- data/spec/utopia/controller/middleware_spec.ru +0 -6
- data/spec/utopia/controller/middleware_spec/controller/controller.rb +0 -27
- data/spec/utopia/controller/middleware_spec/controller/index.xnode +0 -1
- data/spec/utopia/controller/middleware_spec/controller/nested/controller.rb +0 -7
- data/spec/utopia/controller/middleware_spec/empty/controller.rb +0 -0
- data/spec/utopia/controller/middleware_spec/redirect/controller.rb +0 -12
- data/spec/utopia/controller/middleware_spec/redirect/test/controller.rb +0 -9
- data/spec/utopia/controller/respond_spec.rb +0 -174
- data/spec/utopia/controller/respond_spec.ru +0 -12
- data/spec/utopia/controller/respond_spec/api/controller.rb +0 -28
- data/spec/utopia/controller/respond_spec/errors/controller.rb +0 -14
- data/spec/utopia/controller/respond_spec/errors/file-not-found.xnode +0 -8
- data/spec/utopia/controller/respond_spec/html/controller.rb +0 -11
- data/spec/utopia/controller/respond_spec/rewrite/controller.rb +0 -13
- data/spec/utopia/controller/rewrite_spec.rb +0 -80
- data/spec/utopia/controller/sequence_spec.rb +0 -135
- data/spec/utopia/controller/variables_spec.rb +0 -59
- data/spec/utopia/controller/websocket_spec.rb +0 -68
- data/spec/utopia/controller/websocket_spec.ru +0 -5
- data/spec/utopia/controller/websocket_spec/server/controller.rb +0 -11
- data/spec/utopia/exceptions/handler_spec.rb +0 -47
- data/spec/utopia/exceptions/handler_spec.ru +0 -8
- data/spec/utopia/exceptions/handler_spec/controller.rb +0 -19
- data/spec/utopia/exceptions/mailer_spec.rb +0 -43
- data/spec/utopia/exceptions/mailer_spec.ru +0 -10
- data/spec/utopia/extensions_spec.rb +0 -73
- data/spec/utopia/http/status_spec.rb +0 -44
- data/spec/utopia/locale_spec.rb +0 -58
- data/spec/utopia/localization_spec.rb +0 -92
- data/spec/utopia/localization_spec.ru +0 -15
- data/spec/utopia/localization_spec/controller.rb +0 -21
- data/spec/utopia/localization_spec/localized.de.txt +0 -1
- data/spec/utopia/localization_spec/localized.en.txt +0 -1
- data/spec/utopia/localization_spec/localized.ja.txt +0 -1
- data/spec/utopia/localization_spec/test.txt +0 -1
- data/spec/utopia/middleware_spec.rb +0 -31
- data/spec/utopia/path/matcher_spec.rb +0 -66
- data/spec/utopia/path_spec.rb +0 -162
- data/spec/utopia/performance_spec.rb +0 -92
- data/spec/utopia/performance_spec/cache/head/readme.txt +0 -1
- data/spec/utopia/performance_spec/cache/meta/readme.txt +0 -1
- data/spec/utopia/performance_spec/config.ru +0 -35
- data/spec/utopia/performance_spec/lib/readme.txt +0 -1
- data/spec/utopia/performance_spec/pages/_heading.xnode +0 -2
- data/spec/utopia/performance_spec/pages/_page.xnode +0 -26
- data/spec/utopia/performance_spec/pages/api/controller.rb +0 -8
- data/spec/utopia/performance_spec/pages/errors/exception.xnode +0 -5
- data/spec/utopia/performance_spec/pages/errors/file-not-found.xnode +0 -5
- data/spec/utopia/performance_spec/pages/links.yaml +0 -2
- data/spec/utopia/performance_spec/pages/welcome/index.xnode +0 -17
- data/spec/utopia/rack_helper.rb +0 -32
- data/spec/utopia/redirection_spec.rb +0 -77
- data/spec/utopia/redirection_spec.ru +0 -27
- data/spec/utopia/session_spec.rb +0 -189
- data/spec/utopia/session_spec.ru +0 -24
- data/spec/utopia/setup_spec.rb +0 -56
- data/spec/utopia/static_spec.rb +0 -49
- data/spec/utopia/static_spec.ru +0 -5
- data/spec/utopia/static_spec/test.txt +0 -1
- data/utopia.gemspec +0 -52
@@ -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
|
-
— 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> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../../Utopia.html" title="Utopia (module)">Utopia</a></span></span> » <span class='title'><span class='object_link'><a href="../Content.html" title="Utopia::Content (class)">Content</a></span></span>
|
41
|
-
»
|
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> ⇒ 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> ⇒ 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> ⇒ 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> ⇒ 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> ⇒ 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) ⇒ 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) ⇒ 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) ⇒ 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> ⇒ 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> ⇒ 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 = {}) ⇒ 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> ⇒ 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) ⇒ 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) ⇒ 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> ⇒ 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) ⇒ 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) ⇒ 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 = {}) ⇒ 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 = {}) ⇒ 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) ⇒ 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) ⇒ 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) ⇒ 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) ⇒ 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) ⇒ 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 = {}) ⇒ <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> ⇒ <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> ⇒ <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> ⇒ <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> ⇒ <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> ⇒ <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) ⇒ <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) ⇒ <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) ⇒ <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> ⇒ <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> ⇒ <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> ⇒ <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) ⇒ <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
|
-
—
|
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) ⇒ <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
|
-
—
|
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> ⇒ <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) ⇒ <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) ⇒ <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'><<</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 = {}) ⇒ <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 = {}) ⇒ <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) ⇒ <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("tag_begin: #{tag} is tag.self_closed?") 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) ⇒ <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) ⇒ <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'><<</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("tag_begin: #{tag} is tag.self_closed?") 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) ⇒ <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) ⇒ <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>
|